Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: boathouse2112 on August 03, 2012, 03:20:17 pm

Title: Gravity not working
Post by: boathouse2112 on August 03, 2012, 03:20:17 pm
I'm trying to write a basic gravity program that makes a sprite affected by gravity. For some reason the image doesn't show on the screen and the program insta-closes when run. It's written for axe and compiled for mirageos.
Here's the code:
Spoiler For Spoiler:
(http://i.imgur.com/QRNSB.png)
(http://i.imgur.com/uiwxk.png)
(http://i.imgur.com/isDmz.png)
(http://i.imgur.com/Un5CI.png)
(http://i.imgur.com/cdDWx.png)
btw, how do you change the for hidden on the spoiler tag?
Title: Re: Gravity not working
Post by: Deep Toaster on August 03, 2012, 03:46:10 pm
It doesn't quit immediately for me—it went into an endless loop in the While.

You probably meant to do While Y<40 and (V<2) on that line. Keep in mind that Axe's order of operations is strictly left-to-right, so what you're doing right now is essentially While (Y<40 and V)<2, which I don't think you meant to do.

As a side tip, always compile your programs for Ion unless you specifically want users to be unable to run your program from the home screen with Asm(prgmNAME). The Ion format is the most compatible: any program compiled for Ion will work in any shell supporting the Ion format, including Ion, Noshell, MirageOS, and DoorsCS (and basically every other decent calculator shell), and will also work from the home screen with Asm(.

As for the spoiler tag, use [spoiler=title][/spoiler] to generate something like this:
Spoiler For title:
Title: Re: Gravity not working
Post by: DJ Omnimaga on August 03, 2012, 04:15:35 pm
(and basically every other decent calculator shell)
Except Ion itself, in some cases <_< (see Final Fantasy v1.198)
Title: Re: Gravity not working
Post by: Hayleia on August 04, 2012, 01:10:11 am
I'm trying to write a basic gravity program that makes a sprite affected by gravity. For some reason the image doesn't show on the screen and the program insta-closes when run. It's written for axe and compiled for mirageos.
Here's the code:
Spoiler For Spoiler:
(http://i.imgur.com/QRNSB.png)
(http://i.imgur.com/uiwxk.png)
(http://i.imgur.com/isDmz.png)
(http://i.imgur.com/Un5CI.png)
(http://i.imgur.com/cdDWx.png)
btw, how do you change the for hidden on the spoiler tag?
Also, would you mind attaching the source code in 8xp, or at least write the source in text format so we can get a 8xp through some IDE instead of only putting screenshots (for the lazy ones :P) ?

(and basically every other decent calculator shell)
Except Ion itself, in some cases <_< (see Final Fantasy v1.198)
I guess it was directly written in ASM and the author missed something ???
Title: Re: Gravity not working
Post by: Yeong on August 04, 2012, 07:48:20 pm
[offtopic]
When I read this topic name, I thought about real gravity failing  XP
[/offtopic]
Title: Re: Gravity not working
Post by: thepenguin77 on August 04, 2012, 09:11:57 pm
[offtopic]
When I read this topic name, I thought about real gravity failing  XP
[/offtopic]

Me too.


@boathouse2112
Pro tip:
  Use SourceCoder (http://sc.cemetech.net/) to turn your .8xp files into text. Not only will it allow people to easily edit stuff, but you won't have to do the terrible screenshot>upload>link>repeat process that you did.