Author Topic: Gravity not working  (Read 2611 times)

0 Members and 1 Guest are viewing this topic.

Offline boathouse2112

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +0/-0
    • View Profile
Gravity not working
« 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:





btw, how do you change the for hidden on the spoiler tag?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Gravity not working
« Reply #1 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:




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Gravity not working
« Reply #2 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)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Gravity not working
« Reply #3 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:





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 ???
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Gravity not working
« Reply #4 on: August 04, 2012, 07:48:20 pm »
[offtopic]
When I read this topic name, I thought about real gravity failing  XP
[/offtopic]
Sig wipe!

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Gravity not working
« Reply #5 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 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.
« Last Edit: August 04, 2012, 09:12:18 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112