xboxscene.org forums

Pages: [1] 2 3

Author Topic: Bad News For Geniusalz!  (Read 261 times)

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« 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


Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Bad News For Geniusalz!
« Reply #1 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.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« Reply #2 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....
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Bad News For Geniusalz!
« Reply #3 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
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Bad News For Geniusalz!
« Reply #4 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.
Logged

Yuyu

  • Archived User
  • Hero Member
  • *
  • Posts: 908
Bad News For Geniusalz!
« Reply #5 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
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Bad News For Geniusalz!
« Reply #6 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
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« Reply #7 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


Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Bad News For Geniusalz!
« Reply #8 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
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« Reply #9 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.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Bad News For Geniusalz!
« Reply #10 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
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« Reply #11 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

Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Bad News For Geniusalz!
« Reply #12 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.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Bad News For Geniusalz!
« Reply #13 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.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Bad News For Geniusalz!
« Reply #14 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
Logged
Pages: [1] 2 3