Author Topic: Dodgin' Diamond 2X (60 FPS)  (Read 16346 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Dodgin' Diamond 2X (60 FPS)
« on: May 18, 2012, 02:11:53 pm »
This is an improved port of a SDL game (as such, it uses nSDL) called Dodgin' Diamond 2 (which has been ported to quite a few platforms EDIT: he even mentioned this port on his page 8)). Improved in this case means graphics improvements, gameplay improvements and bug fixes.

It's a vertical shooter à la SNES and has single player mode, co-op mode and high scores.

The controls are as follows:
- For player 1 you can use the whole numpad to move around (7 to go up-left, 6 to go right, etc.) and 5 is for shooting
- For player 2 the keys E,F,G,L,N,S,T,U are used to move around (the same way as player 1) and M is used for shooting
Press CTRL to pause the game.
Press I to show/hide FPS.

Here are a few screenshots:



EDIT: And a new one:


Gameplay video:

The game is attached to this post. (note that it could have been at least twice as small as its current size if I had the time to rearrange the sprite sheet)

Thanks for Pomi for some CX-related testing.
Source code is here.

Click here for latest version (0.3.0)
« Last Edit: January 30, 2013, 08:38:57 pm by hoffa »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #1 on: May 19, 2012, 07:09:55 am »
The controls are as follows:
- For player 1 you can use the whole numpad to move around (7 to go up-left, 6 to go right, etc.) and tab is for shooting
- For player 2 the keys H,I,J,O,Q,V,W,X are used to move around (the same way as player 1) and space is used for shooting
* Hayleia hides :P

Seriously, I tried this and I like it a lot :D
The graphics are awesome, the keys are perfect, the speed is great,...
The only thing that I would like to see improved is the walls on the side: they are a bit dark and it is hard to see them.

edit: Bug report
When inputting a name for the hall of fame, the game detects a key when I push the key but also when I remove my finger from the key.
« Last Edit: May 19, 2012, 09:50:00 am by Hayleia »
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 critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Dodgin' Diamond 2X
« Reply #2 on: May 19, 2012, 04:09:41 pm »
Great! :D

We made a very enthusiastic news on TI-Planet:
http://tiplanet.org/forum/viewtopic.php?p=124488#p124488
TI-Planet co-admin.

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #3 on: May 19, 2012, 10:05:00 pm »
I kinda want to try this... it looks awesome!
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #4 on: May 22, 2012, 02:22:10 pm »
Bug report:
Pushing the keys 4,2 and O at the same time returns to the menu D:
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 Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Dodgin' Diamond 2X
« Reply #5 on: May 22, 2012, 03:11:32 pm »
same bugs as hayleia (cx cas)

this is soooo great, i'm really feeling sorry for my [tab] button ö but this is so cool, nice job :)

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #6 on: May 22, 2012, 03:13:20 pm »
Thanks for the bug reports Hayleia. :)

Here's an updated version. What's new:
- Brighter walls
- Fixed bug when inputting high score name
- Changed controls a bit (see first post)

Previous high scores should still be there.

As for the 4,2,O-bug, it's very strange and I'll have a look at it (not going to point fingers, but might be a bug in Ndless; as far as the code goes that shouldn't happen, nor should nSDL mix keys up or something). The controls have been moved a bit however so it shouldn't be an issue at this point. Please do tell me if the keys are not good, remember however that it should be relatively easy to have two players playing at the same time.
« Last Edit: January 30, 2013, 02:25:04 pm by hoffa »

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #7 on: January 29, 2013, 06:24:39 pm »
Tiny update after a long pause.

Changes:
- Compiled with nSDL 1.1.1
- Changed background
- Added FPS counter (toggle with the I-key)
- Uhh... that's it

It runs at 30-40 FPS on CX, 50-60 FPS on Touchpad (but don't even bother with that one, the LCD is such a piece of shit it's only an ugly blurry mess). I haven't even bothered to optimize whatsoever.

Also a gameplay video:
EDIT: Check out the one below for a newer one

Source code available here.

Download attached.
« Last Edit: January 30, 2013, 02:25:12 pm by hoffa »

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: Dodgin' Diamond 2X
« Reply #8 on: January 29, 2013, 06:37:56 pm »
That really looks great. Nice job porting this :)

For the Touch/Clickpad you should limit framerate to 15 (or allow the option to), because historically this is the framerate at which blurriness becomes acceptable, while still running decently smooth.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #9 on: January 29, 2013, 08:01:25 pm »
That's pretty awesome O.O
I need to learn how to use sdl :P

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: Dodgin' Diamond 2X
« Reply #10 on: January 30, 2013, 01:25:12 pm »
ALRIGHTY. I've tracked down one major bottleneck in nSDL. It was quite obvious but I never thought it would be such a slow-down. Calling any function that pumps the events (SDL_PollEvent(), SDL_GetKeyState(), whatever) seriously hurts performance in speed-critical code. Nothing can really be done about it, just don't use those functions where you need speed, instead stick to keyIsPressed() and whatnot (as most people have done so far in fact).

I changed all the in-game SDL event handling code to normal ndless-style key handling, and now the game jumped to nearly 60 FPS! It's a massive improvement. I was myself already quite impressed with what we had before, updating the whole screen and having multiple layers and everything, but I never expected that I could nearly double the framerate! *.*

Here's a video so you can see, it's much more of a shoot em up now (you can see the framerate in the last part of the video):



DOWNLOAD ATTACHED.
« Last Edit: January 30, 2013, 02:31:28 pm by hoffa »

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Dodgin' Diamond 2X (60 FPS)
« Reply #11 on: January 30, 2013, 01:54:49 pm »
Wow that's awesome. I like the music feature :P I think my time to go learn C and SDL has come now :D

Some people need a high five in the face... with a chair.
~EC

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Dodgin' Diamond 2X (60 FPS)
« Reply #12 on: February 13, 2013, 09:35:48 pm »
Am I supposed to be getting 60 FPS on a Ti-Nspire CX? I only seem to be getting about 48. I have the latest version (0.3.0).
« Last Edit: February 13, 2013, 09:37:18 pm by MasterGeek »

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: Dodgin' Diamond 2X (60 FPS)
« Reply #13 on: February 13, 2013, 10:12:32 pm »
Did you use Nover first? I wouldn't be surprised if 60 FPS was in overclocked mode.

Also very nice looking, Hoffa :D
« Last Edit: February 13, 2013, 10:13:00 pm by DJ_O »

Offline MasterGeek

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +0/-0
    • View Profile
Re: Dodgin' Diamond 2X (60 FPS)
« Reply #14 on: February 16, 2013, 03:57:15 pm »
I would say that the 60 FPS is overclocked. I tried playing this game when my calculator was overclocked to 252 MHz for the CPU and 65 MHz for the AHB and I got around 57-59. When I opened the FPS meter at the start of the game ,it briefly spiked all the way up to 89 FPS.

Also, is it just me or does one of those screenshots show an FPS of 206? 0.0
« Last Edit: February 16, 2013, 04:05:27 pm by MasterGeek »