Author Topic: [Ti-Concours]Jetpack 8x+  (Read 12837 times)

0 Members and 1 Guest are viewing this topic.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
[Ti-Concours]Jetpack 8x+
« on: April 24, 2012, 05:53:34 pm »
Hi guys !

Here is my Ti-Concours entry for the 3rd round ! Jetpack 8x+ is a port of the famous game Jetpack Joyride of the iDevices, for all the 83+/84 calculators :)

I started it something like a month ago, just at the end of the 2nd round, so I nearly finished it, even I can add a lot of features.

In this game, you are Barry, a man who stole the secret Jetpack, and you have to escape the labo alive by avoiding zappers (electric arcs), rockets and lasers.

Of course, the game is endless and you just have to run the furthest you can.

Here is the last screenshot (it's outdated !) :



I still have to increase difficulty when you run, else a good player will run and run and run and run and run ...
« Last Edit: April 24, 2012, 06:00:12 pm by Matrefeytontias »

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: [Ti-Concours]Jetpack 8x+
« Reply #1 on: April 25, 2012, 02:37:32 am »
Great one !
Is the game on-calc at the same speed as on the gif ? If so, I think you could increase the speed a little bit, or make the game scrolling faster and faster.
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: [Ti-Concours]Jetpack 8x+
« Reply #2 on: April 25, 2012, 02:49:11 am »
Just had a random thought: if it scrolls one pixel per frame and you get it to run at ~60 fps, you might be able to get away with having a monochrome background and have the scrolling act like the scanlines.  Then it might run a bit faster, only having to scroll one buffer?
Not sure how running would be done, tho..aside from maybe scrolling three pixels at a time or having the normal walk be slowed down?
« Last Edit: April 25, 2012, 02:49:36 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [Ti-Concours]Jetpack 8x+
« Reply #3 on: April 25, 2012, 04:25:05 am »
wellen,m you accidentally doiuble posted.

edit accidentally made some typos x.x
« Last Edit: April 25, 2012, 04:25:22 am by aeTIos »
I'm not a nerd but I pretend:

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #4 on: April 25, 2012, 07:06:54 am »
Yeah, I think use only the background of the back-buffer will speed it up a lot, I'll test

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #5 on: April 26, 2012, 01:37:19 pm »
Up !

I removed the back-buffer of the background image, which downsize the program of 1512 bytes and speeded it up a lot !

Here is the real last screen (I added Pause 20 at the end because the program was too fast XD ) :

« Last Edit: April 26, 2012, 01:39:39 pm by Matrefeytontias »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: [Ti-Concours]Jetpack 8x+
« Reply #6 on: April 26, 2012, 01:50:15 pm »
Just shift the back buffer and only draw the new line you've shifted in!
If you like my work: why not give me an internet?








Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [Ti-Concours]Jetpack 8x+
« Reply #7 on: April 26, 2012, 06:40:01 pm »
judging from the fact that you are shifting the buffer before updating the screen, i'm guessing you are, indeed, drawing the entire background every frame rather than just the rightmost column of pixels. if you were to swap drawing the entire background in monochrome for drawing only the rightmost column it would mean a change from 96 sprites for monochrome to 32 for greyscale.

if you're doing it that way already, though, then my mistake :P

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #8 on: April 26, 2012, 06:55:03 pm »
I can't do that, I need to use ClrDraw each frame because of particles anims and the very large amount of sprite I can't mask. So I clear the screen and rewrite the whole shifted buffer each frame.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [Ti-Concours]Jetpack 8x+
« Reply #9 on: April 26, 2012, 07:08:25 pm »
you can, indeed, do that. if you're going to keep it monochroms, just draw the background on the back buffer and copy it over, and if you want greyscale, make a couple of backup buffers with an appvar or something. it will be a LOT faster. if you're drawing the background in monochrome, it's 16 pt-on( s and a single conj( instead of 96 pt-on( s

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #10 on: April 26, 2012, 07:11:48 pm »
Oh no, I'm not using any drawing functions, just bit storage in L6, so it's really fast (I use Horizontal - and Copy(Pic1BG,L6))

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [Ti-Concours]Jetpack 8x+
« Reply #11 on: April 26, 2012, 07:15:43 pm »
wait, so do you have separate frames for every look the background can take, then?
if so, then that would be very fast, absolutely massive, and not require horizontal at all. if not, then i don't understand...

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #12 on: April 26, 2012, 07:22:31 pm »
O.O it would take 48*1512 bytes of hex :w00t:

That's not it, here is how I do :
  • I copy the two first rows of pixels at the end of the buffer
  • I shift the buffer
  • I copy the buffer to the screen
The screen is updated at the end of the frame.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [Ti-Concours]Jetpack 8x+
« Reply #13 on: April 26, 2012, 07:38:06 pm »
so you're copying with a loop that runs through the data, copying line by line? that still seems like it would be slower than the sprite commands.
« Last Edit: April 26, 2012, 07:43:50 pm by shmibs »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [Ti-Concours]Jetpack 8x+
« Reply #14 on: April 26, 2012, 07:45:37 pm »
Maybe, but the fact is I have the whole image in plain hex, and that's not the good format for sprite commands. Also, bit manipulation is really fast ...