Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: gameblabla on April 23, 2015, 08:30:00 pm

Title: Cave Story for TI nspire CX
Post by: gameblabla on April 23, 2015, 08:30:00 pm
Hello everyone !
I have finally ported Cave Story to the Ti nspire after i spent 3 days working on it.
This is based on NXEngine, a complete recreation/rewrite of Cave story.

The game is now running fullspeed, yay !

If you don't know what the hell Cave Story is , visit this website (http://www.cavestory.org/).

Installation :
You can put the files anywhere on your calc.
Make sure the folder "data" is next to "cave.tns".
sprites.sif.tns, tilekey.dat.tns and stage.dat.tns are also necessarry.

Controls :
Touchpad, Clickpad : Move
Ctrl : Fire
Shift : Jump
TAB : Inventory
Del : map

You can download it in the attachments below.

Download : https://tiplanet.org/forum/archives_voir.php?id=219777 (https://tiplanet.org/forum/archives_voir.php?id=219777)
Source code : https://github.com/gameblabla/nxengine-nspire/ (https://github.com/gameblabla/nxengine-nspire/)

If if you can't run the game (not even the black box on the top left), then you don't have enough memory. Reset your calc
Title: Re: Cave Story for TI nspire CX
Post by: Ivoah on April 23, 2015, 10:00:25 pm
This is awesome! I was hoping someone would port NX-engine to the Nspire!

EDIT: Think you might be able to get this on the downloads page on cavestory.org? They already have a TI-BASIC port.
Title: Re: Cave Story for TI nspire CX
Post by: TIfanx1999 on April 23, 2015, 11:48:12 pm
Wow, what a fantastic game to port! I'll have to dig up my nspire and give this a try. ;D
Title: Re: Cave Story for TI nspire CX
Post by: Ivoah on April 24, 2015, 07:20:16 am
I could convert them to NTI but doing so would violate Cave story's license so i'm stuck.

Why would this violate the license? What is the license? Don't you just need to worry about nx-engine's license?
Title: Re: Cave Story for TI nspire CX
Post by: ordelore on April 24, 2015, 04:55:43 pm
Huzzah!
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on April 24, 2015, 10:55:05 pm
Don't you just need to worry about nx-engine's license?
NXEngine is GPL but the graphics,maps ... are proprietary and Pixel only allow normal usage and redistribution.
It's not clear if i can modify the graphics or not.

Anyways, i have converted some images to NTI and the speedup was very small.
All the paths for sprites are inside the sprites.sif file and it cannot be easily modified,
so i won't be able to convert the sprites.
I will post this version soon and change the default mapping.

Any suggestions to the default mapping ?
Right now it's not very good and i have not bothered to change them.

Anyways, hope you'll enjoy Cave Story on ti nspire, i plan to do more !
EDIT : I have uploaded a new version : This version is slightly faster and i have changed the default controls.
Download link is the same
Title: Re: Cave Story for TI nspire CX
Post by: pimathbrainiac on April 25, 2015, 10:46:19 pm
Have you considered porting using n2DLib instead of nSDL? It runs faster, especially on the Grayscale models (like mine). I love Cave Story and would love to play this.
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on April 25, 2015, 11:17:08 pm
Quote
Have you considered porting using n2DLib instead of nSDL? It runs faster, especially on the Grayscale models (like mine). I love Cave Story and would love to play this.
r u crazy

n2DLib is missing some functions i need (e.g. load an image from file) and the source code is big so it might take days,  perhaps even weeks to add n2Dlib support.
Maybe i'll do it (I love Cave story too) but for now, i can't do much.

By the way, i have fixed support for older ti nspire and i forgot some files as well.
Download link is the same, as usual.
Title: Re: Cave Story for TI nspire CX
Post by: Keoni29 on April 26, 2015, 03:37:46 am
Perhaps you could try converting the files on the calculator at first launch? That way you don't distribute modified files, but rather a converter.
Title: Re: Cave Story for TI nspire CX
Post by: pimathbrainiac on April 26, 2015, 10:41:09 am
Quote
Have you considered porting using n2DLib instead of nSDL? It runs faster, especially on the Grayscale models (like mine). I love Cave Story and would love to play this.
n2DLib is missing some functions i need (e.g. load an image from file) and the source code is big so it might take days,  perhaps even weeks to add n2Dlib support.
Maybe i'll do it (I love Cave story too) but for now, i can't do much.

I can do it, if you don't mind me modifying your source. It's actually a pretty easy conversion process, from when I used to work with nSDL.
Title: Re: Cave Story for TI nspire CX
Post by: Keoni29 on April 26, 2015, 02:09:58 pm
I cannot download from that link you gave us. It's stuck at connecting to the site.
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on April 27, 2015, 07:01:33 am
All the paths for sprites are inside the sprites.sif file and it cannot be easily modified,
Ended up finding a workaround for that and all the images are built inside the executable now.
I have released a new version and i have fixed some bugs. (the Profile is now saved in the ndless folder)

I cannot download from that link you gave us. It's stuck at connecting to the site.
Yeah, i don't know why but it didn't worked. This is fixed.

pimathbrainiac, if you want to port it to n2DLib, now you can. (simply download the source code, link in first post)
You can let SDL handle the input, you don't have to replace it.
Beware though, this will only compile with the latest Ndless toolchain from git.
Title: Re: Cave Story for TI nspire CX
Post by: Keoni29 on April 27, 2015, 04:43:48 pm
Does it run smoother now the new image format is used?
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on April 27, 2015, 10:08:35 pm
Does it run smoother now the new image format is used?
No, not really... It seems like the blitting is not very efficient.
Tried to run the game without colorkeys and it ran much faster, but it looked ugly. (nearly unplayable in fact)
I'm trying to find a good compromise. Other than that, i don't know.
Title: Re: Cave Story for TI nspire CX
Post by: Keoni29 on April 28, 2015, 06:14:38 pm
Without hardware accel blitting is never efficient.
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on May 15, 2015, 03:25:03 pm
Hey, good news everyone !
I finally found the culprit for the slowdowns.
Cave Story is now running fullspeed on the TI Nspire CX, yay !

It's attached to my first post.
You can also download it at tiplanet.

Now i can die happy
Enjoy
Title: Re: Cave Story for TI nspire CX
Post by: Matrefeytontias on May 15, 2015, 04:20:52 pm
So yeah, hum ... what caused the slowdowns ? :P
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on May 15, 2015, 08:23:19 pm
Quote
So yeah, hum ... what caused the slowdowns ? :P
For some reasons, it was calling FillRect lots of time. They were useless anyways so i removed them.
The functions in question were NXSurface::DrawRect and NXSurface::FillRect.
I don't think the game needs to draw rectangles from what i played anyways.
Title: Re: Cave Story for TI nspire CX
Post by: Hayleia on May 16, 2015, 06:32:35 am
Great port :D
(and lol, I am the 2 downloads you got on TI Planet -.-)

But could you remind us of the keys (and maybe put them in the readmes)? You mentionned Ctrl and Del on your first post but I found out that the tab key does something too (or maybe the one above it, I don't remember) and I fear I missed some.
Title: Re: Cave Story for TI nspire CX
Post by: gameblabla on May 16, 2015, 02:43:34 pm
Great port :D
(and lol, I am the 2 downloads you got on TI Planet -.-)

But could you remind us of the keys (and maybe put them in the readmes)? You mentionned Ctrl and Del on your first post but I found out that the tab key does something too (or maybe the one above it, I don't remember) and I fear I missed some.
TAB is for the inventory, i forgot to mention that.
Shift is for jumping and Del is for the map.
Fixed my first post
Title: Re: Cave Story for TI nspire CX
Post by: James Take on November 29, 2015, 03:56:49 pm
the download doesn't work ???  :banghead:
Title: Re: Cave Story for TI nspire CX
Post by: Eeems on December 29, 2015, 09:37:50 am
the download doesn't work ???  :banghead:
Is the download itself not working? Or are the files you downloaded not running properly? I just tried downloading it and I was able to get the file.
Title: Re: Cave Story for TI nspire CX
Post by: Ivoah on December 29, 2015, 11:37:25 am
the download doesn't work ???  :banghead:

Could you elaborate on that a little more? I've tried it and it works just fine on my Nspire. Are you sure you have Ndless installed?
Title: Re: Cave Story for TI nspire CX
Post by: James Take on April 01, 2016, 12:30:42 am
I got the download to work and i played the game. When I play Curly has a forcefield. I played Cave Story before and I don't remember that being a part of the battle. I would include a screenshot but I don't know how to add images to this thing yet.. Does this happen to anyone else?
Title: Re: Cave Story for TI nspire CX
Post by: kitten on May 18, 2016, 10:17:21 am
I got the download to work and i played the game. When I play Curly has a forcefield. I played Cave Story before and I don't remember that being a part of the battle. I would include a screenshot but I don't know how to add images to this thing yet.. Does this happen to anyone else?

It happens to me, too. I believe the port does not progress past this point. :(

EDIT: It has, in fact, seemed to have been fixed. One would need to completely recompile the program from the source, however.

EDIT2: Replace cave.tns on your calculator with this newer version (https://github.com/gameblabla/nxengine-nspire/raw/master/cave.tns). Curly should work. I take no credit for this fix!