Help - Search - Members - Calendar
Full Version: Bad News For Geniusalz!
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM WIP Beta forum
BenJeremy
He'll now have to update Tetris AGAIN. jester.gif

WIP Build 1177 is now up.

New Function:
-- HandleType
.....Gets type of handle, 0 if not a valid handle.

New Commands:
-- Image <Handle> <X> <Y> <Width> <Height>
.....Used with BeginDraw, allows use of Images loaded with LOADIMAGE to be used in an ActionDraw List
-- LOADIMAGE <Handle> <Path>
.....Load an image. May wait up to 5 seconds for image to load from cache.
-- CLOSEIMAGE <Handle>



Now it means he can add cool background images!!


CODE


; In the startup portion of his script:

LOADIMAGE BackImage CoolBackgrndImage.jpg


; Later in the script, to use the image:

:DrawBoard
BeginDraw
IMAGE BackImage 0 0 640 480


flattspott
Sweet!

This is for normal scripts, not Dialogs right?

And is it like skinning where an image can be a video too? Cause that would be cool too if it is.
BenJeremy
QUOTE (flattspott @ Feb 22 2004, 06:35 PM)
Sweet!

This is for normal scripts, not Dialogs right?

And is it like skinning where an image can be a video too? Cause that would be cool too if it is.

Should be OK for video, but I didn't test that.

Yes, it is for scripts....
geniusalz
I read the title, and I was like WTF?
And then I read inside, and I'm like w00t laugh.gif
flattspott
Image someling like Tetris with a video behind it. That would be crazy.


I was thinking a minute ago. This ActionScripting is really remarkable. Not only have you made your own scripting language but, in a way, it's like you found a way to have multiple processes going on on the Xbox.
Yuyu
QUOTE (geniusalz @ Feb 22 2004, 05:43 PM)
I read the title, and I was like WTF?
And then I read inside, and I'm like w00t laugh.gif

YEah I though you posted it G-Dub, cause I was lookin at the main forum view and saw the title. I was wonderin "WTF, what happened to G-Dub" then I saw it was by BJ and knew it meant you had to re-write/code somethin... laugh.gif

EDIT: Forgot, awsome news, Images in Actionscripts this should be really cool, now, G-Dub, can include those awsome Russian wraparound the board pics for tetris tongue.gif
flattspott
And is this how we're to use the HandleType

SetFunc whatisit HandleType MyDialog
and
SetFunc whatisit HandleType TestXML
BenJeremy
QUOTE (flattspott @ Feb 22 2004, 06:47 PM)
And is this how we're to use the HandleType

SetFunc whatisit HandleType MyDialog
and
SetFunc whatisit HandleType TestXML

Yes....

1 == HTYPE_FILE
2 == HTYPE_UIOBJECT
3 == HTYPE_IMAGE
4 == HTYPE_XMLOBJECT


flattspott
1 == HTYPE_FILE = ????
2 == HTYPE_UIOBJECT = Dialog
3 == HTYPE_IMAGE = Image
4 == HTYPE_XMLOBJECT = XML

What kind of file needs a handle? I must of missed that one.
BenJeremy
Handles for reading and writing files, of course, but that's broken at the moment, so you can't verify those handles yet.

The other types can be checked, though.
geniusalz
Now i just need someone to design a kickass background. flex, kf, boomboom, Anyone wanna volunteer?
Here's a screenshot of the layout
user posted image



EDIT: If each block was an image, would it affect the speed significantly?

And what about permanent 'ActionDraw Lists' ?

i.e.

BeginDraw Permanent
Box 1 1 1 Black
EndDraw

Anything specified as 'permanent' will just add to the permanent drawlist. i.e. will not clear throughout the life of the script.

Anything else (non-permanent) will behave as normal.

The application to tetris would be that all pieces that are 'dropped' go into the permanent drawlist, so the whole board doesn't need to be redrawn each time anything changes. This will also be quite useful for other games as well.
BenJeremy
Well, I've mulled the idea of accessing an ActionDraw list, but I haven't come up with anything workable - yet.

As for using images, it might actually be a bit faster- but you'd need all the rotations defined, as I don't have that little mod in yet sad.gif Let me think about that, though. The images are loaded, then using them is pretty simple, since the texture to render it is always available.

Here was my image test, BTW, using Tetris with a background image:

user posted image

geniusalz
A pic for each piece wouldn't work, because then there's no way to cut out part of a block (when lines are completed)

So the only way it can work is if each little square is a pic.
BenJeremy
QUOTE (geniusalz @ Feb 22 2004, 07:54 PM)
A pic for each piece wouldn't work, because then there's no way to cut out part of a block (when lines are completed)

So the only way it can work is if each little square is a pic.

You are correct, sir!

Didn't think about that.
geniusalz
Did you change anything in the way boxes (and their borders) are rendered? Because now the boxes don't look 3D like they did. sad.gif
BenJeremy
QUOTE (geniusalz @ Feb 23 2004, 01:59 AM)
Did you change anything in the way boxes (and their borders) are rendered?  Because now the boxes don't look 3D like they did. sad.gif

Well, I cleaned up the way boxes, lines and text are rendered.

Perhaps I can add something to make it render them "anti-aliased" and off-center again. wink.gif
koldfuzion
user posted image

Full Image (262k)
Yuyu
Now if you could trigger .wma or .wav files from actionscripts.... TETRIS would be complete. I have copies of the original GameBoy TETRIS music in .wma format, if you could tigger or incorporate the .wma into the actionscript, that would be awsome...
flattspott
Well wmv work in the dialogs smile.gif
geniusalz
QUOTE (koldfuzion @ Feb 23 2004, 12:21 PM)
user posted image

Full Image (262k)

Awesome! pop.gif
BenJeremy
I'll be adding sound shortly. wink.gif
flattspott
Cool cool. Now all geniusalz need to do is add some different modes.
For example
A Normal mode where theres levels and each one has more and more lines you have to get to before you get to the next level (like the real tetris)
A Black and White mode where all the pieces are the same color

Just some ideas.
Yuyu
QUOTE (BenJeremy @ Feb 23 2004, 07:22 PM)
I'll be adding sound shortly. wink.gif

BJ, you the man.... cool.gif
BenJeremy
QUOTE (Yuyu @ Feb 23 2004, 09:16 PM)
QUOTE (BenJeremy @ Feb 23 2004, 07:22 PM)
I'll be adding sound shortly. wink.gif

BJ, you the man.... cool.gif

It might actually be a day or two, though.... today is a birthday, and I've worked a late day.
geniusalz
Oooooo Skinnable tetris smile.gif
BenJeremy
QUOTE (geniusalz @ Feb 23 2004, 09:20 PM)
Oooooo Skinnable tetris smile.gif

Yes.... you should be able to re-use handles, but keep in mind that the Action Draw list is rendered in a multitasked thread, so you either have to switch to another list without the image, or use a second handle and swap back and forth.


You could do things like change the image after so many lines (Strip Tetris, just like in the Japanese arcades...)

user posted image
Just to get things in the mood.... cool.gif
Yuyu
QUOTE (BenJeremy @ Feb 23 2004, 08:27 PM)

You could do things like change the image after so many lines (Strip Tetris, just like in the Japanese arcades...)

user posted image
Just to get things in the mood.... cool.gif

Good call Bj, very good call... NOw, the music , the imagery, the gameplay, its all there...
flattspott
Oh yeah a Locked mode will be cool too. (Were you can't rotate the pieces)
BenJeremy
Well, 1180 adds more goodies.


LoadSound <Handle> <File>
....Loads a sound resource to be played
CloseSound <Handle>
....Closes sound resource, handle is available for reuse.
PlaySound <Handle>
....Play sound from sound resource handle
LoadDialogFromXML <UIHandle> <XMLHandle> <XMLLocation>
....Load a dialog from the node indicated


I haven't tested, so use this version at your own risk. wink.gif

Should also fix that "desc" -> "descr" issue with context items.
geniusalz
QUOTE
Yes.... you should be able to re-use handles, but keep in mind that the Action Draw list is rendered in a multitasked thread, so you either have to switch to another list without the image, or use a second handle and swap back and forth.

Switch to another list without the image? uhh.gif
I get the part about the second handle


QUOTE
You could do things like change the image after so many lines (Strip Tetris, just like in the Japanese arcades...)


Ummm..... I think I'll pass dry.gif
BenJeremy
QUOTE (geniusalz @ Feb 23 2004, 11:14 PM)
QUOTE
Yes.... you should be able to re-use handles, but keep in mind that the Action Draw list is rendered in a multitasked thread, so you either have to switch to another list without the image, or use a second handle and swap back and forth.

Switch to another list without the image? uhh.gif
I get the part about the second handle


QUOTE
You could do things like change the image after so many lines (Strip Tetris, just like in the Japanese arcades...)


Ummm..... I think I'll pass dry.gif

Actually, the way I set it up, it might be OK to close the image, then load another with the same handle, because when creating the draw list, it takes the texture object and performs an "AddRef" - which means that the Draw List has a say in when the texture itself goes away. Closing the image preforms a "release" on it's part, and reuses the name and such, but the raw texture is still hanging out in the draw list, until you rebuild it.

I just tried out KF's Tetris screen, and it rocks. Just need translucency on the main board.

Now just add the sounds! wink.gif

As for the 3-D effect, give me another day to tinker around. I got stuck with a Japanese engineer who just flew out - wouldn't you know it, we get to the bench and the nasty bug we've been having problems with never showed up!! Now it looks like a hardware issue, but hopefully, I won't have to run tomorrow to the bench to find out. Um, sorry for ranting, but all that was intended to say, "I didn't get a lot fo time today, and tomorrow, I hope to have a little time to take care of more stuff"

I will also soon add ZIP/UnZip and UnRar functionality. This will be a part of the plug-and-play stuff. All plug-and-play modules will be zips.

geniusalz
If the new http protocol is done, project content manager can be started smile.gif
flattspott
Awesome BJ smile.gif
Yuyu
Here's a link to a file that was free for download on Dj Scribble's site awhile back and yes it is a free-to-distibute-as-you-want file... Its a TETRIS Rave Remix... You can play good ole Tetris with some tunes...

TETRIS TECHNO

You will need to right-click and save as...
geniusalz
Tried it with a pic for each block, and the response is too slow, unplayable, especially when the board is full.
BenJeremy
Geniusalz... I fixed the IF# block problem.

It had to do with the fact that when I encountered a non-block IF statement, while scanning the program for the ELSE or ENDIF, it didn't advance the line count, thus getting stuck looking at the same line forever. sad.gif

Fixed though.... so let's see what Tetris will look like now!!
geniusalz
Thanks for taking the time to debug. You'll see it soon (little busy) smile.gif
boomboom
geniusalz, have you tried using four lines (lighter, darker colors) to give it a 3d effect?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.