Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
25 May, 2013, 15:29:23 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: Line Runner for Nspire -  (Read 1606 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
lkj
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 14:02:43
Date Registered: 07 September, 2011, 20:05:25
Posts: 350

Topic starter
Total Post Ratings: +40

View Profile
« on: 12 February, 2012, 21:28:45 »
0

I'm writing a clone of the iphone game Line Runner. It works but I'll need to implement and improve a lot of things, for example better graphics. The CX isn't supported yet because I don't have one to test and I didn't have time to read everything about how to use the ndless functions for this.

Does anyone know why the nspire emulator gets a totally different speed if I use idle()? And even more different if I let the fast timer run? On calc it's too fast and on emulator it's so slow you can't play.

newest version

* LineRunner01.tns (8.49 KB - downloaded 25 times.)
« Last Edit: 05 July, 2012, 19:16:30 by lkj » Logged

My Nspire Ndless C projects:
lkj
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 14:02:43
Date Registered: 07 September, 2011, 20:05:25
Posts: 350

Topic starter
Total Post Ratings: +40

View Profile
« Reply #1 on: 13 February, 2012, 00:21:06 »
0

Now it should work on the CX, but I'm not sure. Am I right that I can't use the emulator to emulate a cx without boot1?

Has anyone got an idea how to make the game blur less on screens of classic nspires?

Here's also the source:

* LineRunner01.zip (23.34 KB - downloaded 19 times.)
Logged

My Nspire Ndless C projects:
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:26:24
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50235


Total Post Ratings: +2615

View Profile WWW
« Reply #2 on: 13 February, 2012, 00:50:49 »
0

The only way to make it blur less on the old Nspires is to reduce the framerate to under 15 fps. There,s no way to remove the blur itself and framerate has to be reduced to keep the game playable.

I should give this a try to see if it works.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
lkj
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 14:02:43
Date Registered: 07 September, 2011, 20:05:25
Posts: 350

Topic starter
Total Post Ratings: +40

View Profile
« Reply #3 on: 13 February, 2012, 08:02:02 »
0

I'll try to reduce the framerate when I have time.

I forgot to write what the controls are: left for jump, right for the other thing (don't know the word).
Logged

My Nspire Ndless C projects:
Lionel Debroux
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 09:11:59
Date Registered: 17 December, 2009, 09:37:25
Location: France
Posts: 1854

Total Post Ratings: +208

View Profile WWW
« Reply #4 on: 13 February, 2012, 09:08:25 »
0

Quote
Am I right that I can't use the emulator to emulate a cx without boot1?
Right, TI found it smart to make the CX (and probably CM) series' boot2 not entirely executable after decompression.
Logged

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.
ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
*
Offline Offline

Gender: Male
Last Login: Today at 13:07:49
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 766

Total Post Ratings: +151

View Profile
« Reply #5 on: 13 February, 2012, 15:16:17 »
0

lkj, you should post an animated screen shot to promote your program.

Does anyone know why the nspire emulator gets a totally different speed if I use idle()? And even more different if I let the fast timer run? On calc it's too fast and on emulator it's so slow you can't play.

idle() puts the CPU into idle mode until the next interrupt. If you change to timer's frequency, idle()'s execution time will change.
But with throttle mode on, the experience should be the same on nspire_emu and on real hardware. Maybe you should post the source code if you want someone to review the code to check what could be wrong.
Logged

ndlessly - Progress and insights on Ndless
Ndless / Hackspire - Third-party TI-Nspire development
Nick
LV9 Veteran (Next: 1337)
*********
Online Online

Gender: Male
Last Login: Today at 15:20:51
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Total Post Ratings: +158

View Profile WWW
« Reply #6 on: 13 February, 2012, 20:24:30 »
0

it's not finished right? it only shows 3 blocks to jump over, and 1 to get under... then there's nothing

oh, and there's an error each time i exit the program, here's a pic: (cx cas)


and maybe it might be more useful to use up and down instread of left and right, it will be more intuïtive..
Logged

jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 07:58:57
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 610


Total Post Ratings: +11

View Profile
« Reply #7 on: 13 February, 2012, 23:21:38 »
0

ill have to try this soon... 200th post!
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
lkj
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 14:02:43
Date Registered: 07 September, 2011, 20:05:25
Posts: 350

Topic starter
Total Post Ratings: +40

View Profile
« Reply #8 on: 13 February, 2012, 23:45:07 »
0

Ok, new version:
  • -Up and down are also supported. Do you think I should remove left and right?
  • -I've put a lcd_incolor() at the end of the code, maybe this fixes Nick's issue
  • -The level is more varied (I think that the only 2 blocks problem was that there was only empty space for a long time after, since it was randomly generated)
  • -Changed rolling
  • -Added simple score

idle() puts the CPU into idle mode until the next interrupt. If you change to timer's frequency, idle()'s execution time will change.
But with throttle mode on, the experience should be the same on nspire_emu and on real hardware. Maybe you should post the source code if you want someone to review the code to check what could be wrong.

It was the same experience with throttle mode off, else it was far too slow. I think now it's better, but I can't test it on my calc because the batteries are empty. Is it a good idea to use set_cpu_speed(CPU_SPEED_90MHZ) to slow it down (I restore it at the end)?

The source code is included in the zip file. But it's not very well commented.

Do I have to use lcd_incolor() at the end if I have lcd_ingray() at the beginning?

Edit: It should be less blurry now since I skip half of the frames on monochrome nspires.

* LineRunner03.zip (24.68 KB - downloaded 14 times.)
« Last Edit: 14 February, 2012, 00:12:28 by lkj » Logged

My Nspire Ndless C projects:
calc84maniac
Epic z80 roflpwner
Coder Of Tomorrow
LV11 Super Veteran (Next: 3000)
*
Offline Offline

Gender: Male
Last Login: Today at 14:19:06
Date Registered: 28 August, 2008, 05:09:05
Location: Right behind you.
Posts: 2735


Total Post Ratings: +373

View Profile
« Reply #9 on: 14 February, 2012, 02:38:43 »
0

Hmm, shouldn't set_cpu_speed be deprecated on the CX or something since the values used and the method of setting are different? The set_cpu_speed is probably what causes weird problems upon exit (because CPU speed changes on the CX, unless done in a specific way, only take effect after the program exits)
Logged

"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:26:24
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50235


Total Post Ratings: +2615

View Profile WWW
« Reply #10 on: 14 February, 2012, 03:13:42 »
0

Wow the exit glitch was quite scary shocked (see video attached to post below). The game seems kinda nice so far, though. More speed like in The Impossible Game (I lost) would be nice, though.

* linerunner03.wmv (1911.8 KB - downloaded 34 times.)
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
*
Offline Offline

Gender: Male
Last Login: Today at 13:07:49
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 766

Total Post Ratings: +151

View Profile
« Reply #11 on: 14 February, 2012, 10:55:12 »
0

Do I have to use lcd_incolor() at the end if I have lcd_ingray() at the beginning?

No, it's not really needed.

Hmm, shouldn't set_cpu_speed be deprecated on the CX or something since the values used and the method of setting are different?

It's indeed deprecated.
Logged

ndlessly - Progress and insights on Ndless
Ndless / Hackspire - Third-party TI-Nspire development
lkj
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Today at 14:02:43
Date Registered: 07 September, 2011, 20:05:25
Posts: 350

Topic starter
Total Post Ratings: +40

View Profile
« Reply #12 on: 15 February, 2012, 00:41:33 »
0

I think I've fixed everything except the blur in this new version:
- removed set_cpu_speed()
- removed direct use of timers
- changed rolling again
- faster, more difficult
- getting faster when you reach certain points

* LineRunner04.zip (27.17 KB - downloaded 29 times.)
Logged

My Nspire Ndless C projects:
hellninjas
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Yesterday at 23:08:43
Date Registered: 12 May, 2011, 02:15:30
Location: USA
Posts: 616


Total Post Ratings: +17

View Profile
« Reply #13 on: 15 February, 2012, 22:33:14 »
0

Woa This will be very cool!
* hellninjas downloads
Logged

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 13:26:24
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50235


Total Post Ratings: +2615

View Profile WWW
« Reply #14 on: 16 February, 2012, 06:46:01 »
0

I don,t think you can do anything about the blur. Blame TI for that.

I wonder if you will add variable platform heights, with hills and stuff, along with holes?
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.293 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.