xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM WIP Beta forum => Topic started by: BenJeremy on February 22, 2004, 01:36:00 PM

Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 01:36:00 PM
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


Title: Bad News For Geniusalz!
Post by: flattspott on February 22, 2004, 01:42:00 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.
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 01:44:00 PM
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....
Title: Bad News For Geniusalz!
Post by: geniusalz on February 22, 2004, 01:50:00 PM
I read the title, and I was like WTF?
And then I read inside, and I'm like w00t laugh.gif
Title: Bad News For Geniusalz!
Post by: flattspott on February 22, 2004, 01:51:00 PM
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.
Title: Bad News For Geniusalz!
Post by: Yuyu on February 22, 2004, 01:54:00 PM
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
Title: Bad News For Geniusalz!
Post by: flattspott on February 22, 2004, 01:54:00 PM
And is this how we're to use the HandleType

SetFunc whatisit HandleType MyDialog
and
SetFunc whatisit HandleType TestXML
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 02:00:00 PM
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


Title: Bad News For Geniusalz!
Post by: flattspott on February 22, 2004, 02:03:00 PM
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.

This post has been edited by flattspott: Feb 22 2004, 10:04 PM
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 02:06:00 PM
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.
Title: Bad News For Geniusalz!
Post by: geniusalz on February 22, 2004, 02:11:00 PM
Now i just need someone to design a kickass background.  flex, kf, boomboom, Anyone wanna volunteer?
Here's a screenshot of the layout
(IMG:http://individual.utoronto.ca/mueez/mxmskinner/tetris.png)



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.

This post has been edited by geniusalz: Feb 22 2004, 10:32 PM
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 02:56:00 PM
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

Title: Bad News For Geniusalz!
Post by: geniusalz on February 22, 2004, 03:01:00 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.
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 22, 2004, 03:08:00 PM
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.
Title: Bad News For Geniusalz!
Post by: geniusalz on February 22, 2004, 09:06:00 PM
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
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 02:09:00 AM
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
Title: Bad News For Geniusalz!
Post by: koldfuzion on February 23, 2004, 07:28:00 AM
(IMG:http://www.allxboxskins.com/temp/Tetriss.jpg)

Full Image (262k)

This post has been edited by koldfuzion: Feb 23 2004, 04:23 PM
Title: Bad News For Geniusalz!
Post by: Yuyu on February 23, 2004, 08:01:00 AM
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...
Title: Bad News For Geniusalz!
Post by: flattspott on February 23, 2004, 09:25:00 AM
Well wmv work in the dialogs smile.gif
Title: Bad News For Geniusalz!
Post by: geniusalz on February 23, 2004, 01:47:00 PM
QUOTE (koldfuzion @ Feb 23 2004, 12:21 PM)
user posted image

http://www.allxboxskins.com/temp/Tetris.jpg

Awesome! pop.gif
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 03:29:00 PM
I'll be adding sound shortly. wink.gif
Title: Bad News For Geniusalz!
Post by: flattspott on February 23, 2004, 03:42:00 PM
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.
Title: Bad News For Geniusalz!
Post by: Yuyu on February 23, 2004, 04:23:00 PM
QUOTE (BenJeremy @ Feb 23 2004, 07:22 PM)
I'll be adding sound shortly. wink.gif

BJ, you the man.... cool.gif
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 04:26:00 PM
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.
Title: Bad News For Geniusalz!
Post by: geniusalz on February 23, 2004, 04:27:00 PM
Oooooo Skinnable tetris smile.gif
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 04:34:00 PM
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
Title: Bad News For Geniusalz!
Post by: Yuyu on February 23, 2004, 04:54:00 PM
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...
Title: Bad News For Geniusalz!
Post by: flattspott on February 23, 2004, 05:26:00 PM
Oh yeah a Locked mode will be cool too. (Were you can't rotate the pieces)
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 06:12:00 PM
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.
Title: Bad News For Geniusalz!
Post by: geniusalz on February 23, 2004, 06:21:00 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
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 23, 2004, 06:32:00 PM
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.

Title: Bad News For Geniusalz!
Post by: geniusalz on February 23, 2004, 06:41:00 PM
If the new http protocol is done, project content manager can be started smile.gif
Title: Bad News For Geniusalz!
Post by: flattspott on February 23, 2004, 06:51:00 PM
Awesome BJ smile.gif
Title: Bad News For Geniusalz!
Post by: Yuyu on February 23, 2004, 08:09:00 PM
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...
Title: Bad News For Geniusalz!
Post by: geniusalz on February 24, 2004, 05:10:00 PM
Tried it with a pic for each block, and the response is too slow, unplayable, especially when the board is full.
Title: Bad News For Geniusalz!
Post by: BenJeremy on February 28, 2004, 10:07:00 AM
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!!
Title: Bad News For Geniusalz!
Post by: geniusalz on February 28, 2004, 10:23:00 AM
Thanks for taking the time to debug.  You'll see it soon (little busy) smile.gif
Title: Bad News For Geniusalz!
Post by: boomboom on March 03, 2004, 08:57:00 PM
geniusalz, have you tried using four lines (lighter, darker colors) to give it a 3d effect?