### Author Topic: nTileWorld (a Chips Challenge port)  (Read 20852 times)

0 Members and 1 Guest are viewing this topic.

#### ajorians

• LV4 Regular (Next: 200)
• Posts: 105
• Rating: +47/-0
##### nTileWorld (a Chips Challenge port)
« on: June 28, 2013, 09:39:08 pm »
Hey Guys,

Tile World is an open source reimplementation of Chips Challenge.  I have been working on porting it to the Nspire calculator.  It is playable!  So download the attachment and add it to your calculator.  It can be added to any folder; and then you need the 3 subfolders (with content) relative to the main program.  It'll make sense one you download this.

I did try it on a non-CX Nspire and it looked rather good!  I am not a good player of this game; so what I could use from all of you is to try the game.  I beat several of the levels; but let me know if they are all beatable!

Some differences are: I made it so you can advance/go back to previous level using the 'n' and 'p' keys without needing to beat the prior levels or typing in a password.  You can restart a level by pressing the 'r' key.  I don't have keeping track of completed levels.  And it isn't finished so there may be more as I keep working on it.

I do have some bugs that I know of.  But let me know if you find a bug.  I know when choosing the level it sometimes says the wrong ruleset for a levelset.  And pressing escape on the level selector doesn't exit; but just choose a levelset and then press escape and it'll exit.  And I know about the text display issues.  I'll do some bug fixing soon!

But all in all I think it game is coming out amazing!  So let me know what you think!

And have a great day!

#### Legimet

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +29/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #1 on: June 28, 2013, 10:46:18 pm »
I'm in the process of porting this same exact game and was going to finish it in a few days.
« Last Edit: June 28, 2013, 10:49:58 pm by Legimet »

#### ajorians

• LV4 Regular (Next: 200)
• Posts: 105
• Rating: +47/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #2 on: June 29, 2013, 08:24:28 am »
I'm in the process of porting this same exact game and was going to finish it in a few days.

I didn't know; but please keep working on yours!

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: nTileWorld (a Chips Challenge port)
« Reply #3 on: June 29, 2013, 08:25:41 am »
wow, that's looking great!
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### TIfanx1999

• ಠ_ಠ ( ͡° ͜ʖ ͡°)
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 6173
• Rating: +191/-9
##### Re: nTileWorld (a Chips Challenge port)
« Reply #4 on: June 29, 2013, 09:19:38 am »
Looks nice. What language is this done in?

#### Legimet

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +29/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #5 on: June 29, 2013, 11:59:15 am »
I'm in the process of porting this same exact game and was going to finish it in a few days.

I guess we could put together the code of both of our versions, after I finish.

Looks nice. What language is this done in?

It's in C and uses SDL.
« Last Edit: June 29, 2013, 11:59:47 am by Legimet »

#### DJ Omnimaga

• Clacualters are teh gr33t
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55935
• Rating: +3153/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: nTileWorld (a Chips Challenge port)
« Reply #6 on: June 29, 2013, 01:03:36 pm »
Wow this looks great! Glad this game is finally arriving on the Nspire. However, make sure to state that it's Chips Challenge in the title on ticalc.org, else people who are seeking for a clone of that game will miss out.

#### AlexisVieira

• LV4 Regular (Next: 200)
• Posts: 100
• Rating: +1/-1
##### Re: nTileWorld (a Chips Challenge port)
« Reply #7 on: June 29, 2013, 02:29:56 pm »
Good work

#### ajorians

• LV4 Regular (Next: 200)
• Posts: 105
• Rating: +47/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #8 on: June 29, 2013, 04:44:07 pm »
Hi Guys!

Legimet: Go ahead and use any code modifications I made!  I added a preprocessor define: NSPIRE_BUILD that I put in the code A LOT!  I also put in another one called USE_NSPIRE_FONT that when defined will use nSDL_DrawString.  I did that because then I wouldn't need the external file font.bmp.tns.  I #ifdef out so much because I didn't realize all that Tile World had.  I've been replacing the function 'exit'; which is why I have a bug when pressing Escape on the levelset menu (but I'll fix it)!

Oh and by the way one "bug" that I do want to fix is if you don't have a certain external files (or not in the correct subfolder) I think I crash; but I'd like to make an error message instead!

DJ Omnimaga: If you think it is best to called it Chips Challenge I will.  Because I used some one's source code I figured I shouldn't rename the port of their project.  BTW, the original title for Chips Challenge was Tile World.

Thanks for liking it!  And have a terrific day!

#### Legimet

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +29/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #9 on: June 29, 2013, 05:05:51 pm »
I'm trying to work on drawing the text, because nSDL_DrawString doesn't support multiline text
And I'm using ifdefs for it, because the font engine built in to Tile World makes it crash for some reason.

EDIT: No need to use NSPIRE_BUILD, _TINSPIRE is built in to nspire-gcc
Also, my version gives an error message if you don't have a certain file (using show_msgbox in libndls)
« Last Edit: June 30, 2013, 01:36:23 pm by Legimet »

#### DJ Omnimaga

• Clacualters are teh gr33t
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55935
• Rating: +3153/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: nTileWorld (a Chips Challenge port)
« Reply #10 on: July 01, 2013, 04:17:02 am »
Well I think both titles would be fine. Just maybe call it nTileWorld officially, but in the ticalc.org title field write the same thing as this topic name

#### hoffa

• LV6 Super Member (Next: 500)
• Posts: 322
• Rating: +131/-13
##### Re: nTileWorld (a Chips Challenge port)
« Reply #11 on: July 01, 2013, 06:20:30 am »
I'm trying to work on drawing the text, because nSDL_DrawString doesn't support multiline text
And I'm using ifdefs for it, because the font engine built in to Tile World makes it crash for some reason.

EDIT: No need to use NSPIRE_BUILD, _TINSPIRE is built in to nspire-gcc
Also, my version gives an error message if you don't have a certain file (using show_msgbox in libndls)
Actually you can just use the '\n' character in your string for a new line. There was a nSDL_DrawStringInRect() function before but it was just unnecessarily complexifying the code with minimal benefits.

#### ajorians

• LV4 Regular (Next: 200)
• Posts: 105
• Rating: +47/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #12 on: July 01, 2013, 06:50:56 am »
I'm trying to work on drawing the text, because nSDL_DrawString doesn't support multiline text
And I'm using ifdefs for it, because the font engine built in to Tile World makes it crash for some reason.

EDIT: No need to use NSPIRE_BUILD, _TINSPIRE is built in to nspire-gcc
Also, my version gives an error message if you don't have a certain file (using show_msgbox in libndls)

Oh yeah; I forgot about _TINSPIRE!  I'm excited to see your version!  Are you using bFLT?  I kept using the traditional loader for no good reason (other than I am comfortable with it).  Which meant I hit an issue with the creaturepoolend variable and instead of using nl_relocdata I was seeing if I could do without that variable.

Have a great day!

#### Legimet

• LV6 Super Member (Next: 500)
• Posts: 336
• Rating: +29/-0
##### Re: nTileWorld (a Chips Challenge port)
« Reply #13 on: July 01, 2013, 12:31:27 pm »
Hoffa, I'll see if I can put '\n' in the text.

I'm using bFLT, no need for nl_relocdata. And the old linker is now considered the "legacy" linker. You should use nspire-ld-bflt.

EDIT: Almost done, I think. I'll finish tomorrow, hopefully.

EDIT 2: Now it works on the Lynx ruleset but crashes on the MS ruleset. Also I have to add nSDL font support.

EDIT 3: Crashes here:
Code: [Select]
((creature**)creaturepoolend)[0] = cr;Hmm, the creaturepoolend issue has nothing to do with the legacy format, because I'm having that issue with bFLT. It's probably an OS issue, I guess

EDIT 4: The creaturepool stuff really does seem to be unnecessary, it's not used in any function except resetcreaturepool(), freecreaturepool(), allocatecreature(), and shutdown(). And I didn't understand why the creatures have to be added to the creaturepool So I just removed that stuff. Now mine works perfectly, except I'm using tworld's font support instead of nSDL's, and the bitmaps are screwed up. I'll fix that soon.

EDIT 5: Attaching zip file of what I have so far.
« Last Edit: July 09, 2013, 04:03:45 pm by Legimet »

#### DJ Omnimaga

• Clacualters are teh gr33t
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55935
• Rating: +3153/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: nTileWorld (a Chips Challenge port)
« Reply #14 on: July 03, 2013, 11:25:07 pm »
When I have some time, I'll give both versions a try. Thanks for posting this