Jump to content


Photo

Mxm Wip Releases


  • Please log in to reply
701 replies to this topic

#661 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 07:55 PM

Well guys it seems like I am way out of the loop since I last tried a WIP. Lots of new stuff.

smile.gif

Anywho between work and being tired/lazy I havent really been interested in scripting lately.

However I decided I will put some serious effort into perfecting all my scripts and finishing half-assed ones too.

First up is LightsOut. I want to replace the crappy solutions stuff with macros where you'll be able to watch the game solve itself.

Now I have some other ideas for XSM type scripts but I have no idea how I am suppose to call subscripts from the XSM module. As an example the Tetris one. How would I call the menu script ?

#662 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 08:02 PM

QUOTE (flattspott @ Jul 25 2004, 03:58 PM)
Well guys it seems like I am way out of the loop since I last tried a WIP. Lots of new stuff.

smile.gif

Anywho between work and being tired/lazy I havent really been interested in scripting lately.

However I decided I will put some serious effort into perfecting all my scripts and finishing half-assed ones too.

First up is LightsOut. I want to replace the crappy solutions stuff with macros where you'll be able to watch the game solve itself.

Now I have some other ideas for XSM type scripts but I have no idea how I am suppose to call subscripts from the XSM module. As an example the Tetris one. How would I call the menu script ?

CODE

<XSM>
<Title>XSM Test</Title>
<MinimumBuild>1230</MinimumBuild>
<Description>This is a test of the XSM functionality</Description>
<GUID>{65BD716E-DC1A-4d07-9FCD-0C2FFE3B78FE}</GUID>
<Class>Popup</Class>
<Category>Test Procedure</Category>
<script>MsgBox "This was a Plug-n-Play test!"
CallScript TestSub
</Script>
<SubScripts>
<script name="TestSub">
MsgBox "SubScript Test Succeeded!"
</Script>
</SubScripts>
</XSM>


Here's an example.

Don't forget MinimumBuild now... or it won't get installed.

#663 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 08:07 PM

oh yeah

Icon <Handle> <IconNumber>

Is the number part basically for the internal icon set?

And how would I use global variables in expressions between multiple scripts inside of one XSM module?

#664 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 08:12 PM

Ok cool , so basically any CallScript will look inside the XSM module for the script among other things.



#665 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 08:46 PM

I think I got it now

CODE
<XSM>
<Title>Align</Title>
<MinimumBuild>1231</MinimumBuild>
<Description>This is a test of the XSM functionality</Description>
<GUID>{0000716E-DC1A-4d17-9F11-0111FE3B78FE}</GUID>
<Class>Popup</Class>
<Category>Test Procedure</Category>
<script>
CallScript Alignment 5 5 20
MsgBox "ScreenX is %_ScreenCenterX% ScreenY is %_ScreenCenterY%"
CallScript Alignment 10 10 36
MsgBox "ScreenX is %_ScreenCenterX% ScreenY is %_ScreenCenterY%"
</Script>

<SubScripts>

<script Name="Alignment">
Set Columns %1%
Set Rows %2%
Set Size %3%
Set ScreenLeft 0
Set ScreenTop 0
Set ScreenWidth 640
Set ScreenHeight 480
Set _ScreenCenterX %((ScreenWidth-(Columns*Size))/2)%
Set _ScreenCenterY %((ScreenHeight-(Rows*Size))/2)%
</Script>

<script Name="Null">

</Script>

</SubScripts>

</XSM>


What I am doing is trying to simplifly aligning grid based games, Lightsout Concentration etc to be centered on screen.

Now I just have to use "CallScript Alignment 5 5 20" to get the screen centering done.

This I can drop this subscript into other Games too.

#666 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 25 July 2004 - 08:53 PM

QUOTE (flattspott @ Jul 25 2004, 04:10 PM)
oh yeah

Icon <Handle> <IconNumber>

Is the number part basically for the internal icon set?

And how would I use global variables in expressions between multiple scripts inside of one XSM module?

For Icons, you need to SetIconSize <Image> <Width> <HEight> to "break up" the image into equal parts.

For example, the internal "::FileManager" image is 256x256, and has 64 icons of 32x32 in size (See the example in an earlier post). So "SetIconSize FMIcons 32 32" tells the image with handle "FMIcons" to define its icons as 32x32, so icon "0" would be the upper 32x32 block.


As for variables, remember that subscripts "inherit" local variables from the caller.

Edited by BenJeremy, 25 July 2004 - 09:00 PM.


#667 a weasel

a weasel

    X-S Senior Member

  • Members
  • PipPip
  • 197 posts
  • Location:Pheonix, AZ
  • Interests:my balls
  • Xbox Version:v1.0

Posted 26 July 2004 - 12:42 AM

yeah i figured they were just for beta testers. sorry for the noob question.



#668 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 26 July 2004 - 09:46 AM

QUOTE (BenJeremy @ Jul 26 2004, 12:05 AM)
Don't forget MinimumBuild now... or it won't get installed.

No wonder my tetris zsm doesn't work..
*off to fix it.


QUOTE
As for variables, remember that subscripts "inherit" local variables from the caller.


Does it work the other way round as well, with changes to variables in the subscript being reflected in the main script?

And in my XSM, I'm using this:
<script>
SetFunc ScriptPath FNPath %0%
Callfile %ScriptPath%\tetris.xas
</Script>

Does this have any advantages/disadvantages over putting the whole script in there? I do this so I don't have to encode special characters for xml. And will callfile work the same way as callscript (in terms of variable 'inheritance') ?

Edited by geniusalz, 26 July 2004 - 09:49 AM.


#669 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 26 July 2004 - 11:03 AM

Is anyone else having FTP issues with this WIP?

I always use the WIP's as a secondary laucher. I can FTP fine with the 0.9n0 release but not with the 1231 WIP.

Akso you said to turn off menu caching. When I did this MXM would freeze at the loading menu part.

#670 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 26 July 2004 - 12:56 PM

QUOTE (flattspott @ Jul 26 2004, 07:06 AM)
Is anyone else having FTP issues with this WIP?

I always use the WIP's as a secondary laucher. I can FTP fine with the 0.9n0 release but not with the 1231 WIP.

Akso you said to turn off menu caching. When I did this MXM would freeze at the loading menu part.

I've transferred files between PC and Xbox, as well as Xbox-to-Xbox with this build - no problems.

As for the freeze, there was a problem with 1230 - some titles have invalid characters that the Xbox libs didn't like - but I changed a cmpiler option to ignore them in 1231.

What happens when you run the MsgLogger version?

#671 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 26 July 2004 - 12:59 PM

QUOTE (geniusalz @ Jul 26 2004, 05:49 AM)
No wonder my tetris zsm doesn't work..
*off to fix it.




Does it work the other way round as well, with changes to variables in the subscript being reflected in the main script?

And in my XSM, I'm using this:
<script>
SetFunc ScriptPath FNPath %0%
Callfile %ScriptPath%\tetris.xas
</Script>

Does this have any advantages/disadvantages over putting the whole script in there? I do this so I don't have to encode special characters for xml. And will callfile work the same way as callscript (in terms of variable 'inheritance') ?

CallFile should work the same way... as for the symbols, I believe, since it uses a "trace" back up the chain of called scripts, if the variable is already defined in a script, changing in a subscript MAY affect the one in a level above. I need to look at that (or perhaps offer a means to switch between them). I need to look into this.

#672 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 26 July 2004 - 03:47 PM

Could someone explain the BeginDrawTarget stuff? Like what is the difference between it and the standard BeginDraw. And maybe an example of what it allows me to that can't be done using BeginDraw.

#673 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 26 July 2004 - 07:39 PM

QUOTE (flattspott @ Jul 26 2004, 07:50 PM)
Could someone explain the BeginDrawTarget stuff? Like what is the difference between it and the standard BeginDraw. And maybe an example of what it allows me to that can't be done using BeginDraw.

It lets you run tetris at 60fps instead of the normal 10-15 fps tongue.gif

To use it:

Use a CreateBlankImage <handle> <width> <height>

Use BeginDrawTarget <handle> [UseCurrent] - UseCurrent creates a transparent image instead of a black image

Draw anything here as you would draw to the screen.

Then goes EndDraw

You can save the image you drew, using SaveImage <handle> <path>

Then in a normal begindraw, you can use
Image <handle> <x> <y> <width> <height>

The whole point of this being you don't have to redraw the whole screen during each refresh.

In the game of tetris, for example, I have an image for the board, and an image for the 'current piece'. The board gets redrawn only when you fix pieces in place, as opposed to redrawing each frame. This obviously saves time, because the board takes about 60-100ms to draw, and drawing every frame slows everything down. (10x20=200 sets of statements being executed in loops)

Even the pieces can be moved around without redrawing, again saving time. And I added a little bit of buttery smooth animation, once again unachievable without the image drawing stuff.

I'll be posting tetris soon, so you can have a look at it.

Edited by geniusalz, 26 July 2004 - 07:46 PM.


#674 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 27 July 2004 - 02:06 AM

Little inactive. So here's something else:
Tetris RC

I might add in saving games soon, so this isn't final and shouldn't be posted anywhere. And I didn't test the zsm because my xbox isn't hooked up right now, but it shouldn't be a problem.

#675 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 27 July 2004 - 02:19 AM

404 not found. sad.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users