Join us on Discord!
You can help CodeWalrus stay online by donating here.

[ti-84+ce] Mandragore - Tilemap-based game for the CE, made in C

Started by Adriweb, October 18, 2015, 11:25:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Adriweb

These last few days, Critor and I (well, I was just helping him a bit) have been working on a game for the TI-83 Premium CE / TI-84 Plus CE, "Mandragore", which is in fact originally a game from the 80s for computers like the C64 / ZX Spectrum / CPC etc.
In this game, you have to find your way around the map collecting things and visiting places.



Here's a Youtube Video of it in action (though not the latest version).

For better performance, the game uses the CE's LCD 8bpp mode and redraws only needed tiles. As you can see, there is no scrolling-lag as there would have been if made in pure-Basic (there is however the "standard" OS repeat-keys delay, which we'll probably fix later on).
What's "special" about this game is that it is, as far as we know, the first "big" thing written in C for the CE :) (We've had headaches working around ZDS' C language (≈ C89) compiler limitations...)
For that, Critor and I used TI-Planet's upcoming online C compiler, and its real-time multi-user editing feature proved immensly useful :D

Anwyay, it's available to download here : http://ti-pla.net/a328137
Of course, it's open-source so anyone can learn from it :) We ourselves have to thank MateoConLechuga (and possibly others?) for some 8bpp-related routines.

via https://tiplanet.org/forum/viewtopic.php?f=41&t=17421
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Dream of Omnimaga

#1
I was wondering what was the story behind this game because on Google Hangout I noticed that your sprites only used a few colors similar to ZX Spectrum colors. I now have my answer :P

I hope the upcoming online C compiler will help the TI community produce games (and of course features an easy to access English version :) )

Also this news exacerbates the need for a TI-83 Premium CE/84+CE emulator, so that we can take proper screenshots.



Good job Critor and Adriweb for porting this old game :). It reminds me of Ultima and Dragon Warrior.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Araidia

Awesome!
It's nice seeing new things for the TI84 Plus CE(since it's the only calculator I own)
  • Calculators owned: TI84+ CE

Also Known as: Soul | Enguard

Araidia

Does this require any other programs to be installed, such as CE Textlib?
  • Calculators owned: TI84+ CE

Also Known as: Soul | Enguard

Dream of Omnimaga

CE Textlib is only for BASIC programs actually, while this game uses C. I don't know if it's nostub or requires a shell, though.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Adriweb

No, it requires nothing, just launch it with Asm(
(But you can launch it with Cesium or PHASM if you want, I guess)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

p4nix

Seems that casio is much easier than TI :P You'll even have a fancy icon then instead to start it manually with Asm(
But anyway, cool stuff you are working on. I wonder how hard it is to get started with C on this calculator - programming on casio is quite easy because you already get a SDK.

* p4nix runs
  • Calculators owned: fx9860GII (SH4)

Adriweb

Quote from: p4nix on October 20, 2015, 08:27:44 PMSeems that casio is much easier than TI :P You'll even have a fancy icon then instead to start it manually with Asm(
Shells can provide you with icons too ;) (And things Noshell-like, like PHASM, make "Asm(" optional)

Quote from: p4nix on October 20, 2015, 08:27:44 PMBut anyway, cool stuff you are working on.
Thanks :)

Quote from: p4nix on October 20, 2015, 08:27:44 PMI wonder how hard it is to get started with C on this calculator - programming on casio is quite easy because you already get a SDK.
As hard as opening a page in your browser, if you use TI-Planet's online CE C compiler (when it's out) :P
It looks like this, for this code:

So... you pretty much just have to code, see warnings and/or errors as you hit the build button, and try it out on your calc :)

An easy-to-setup/use emu side-by-side for debugging would be nice, too. Maybe one day... ?
But the current TODO/WISH list has already several things to take care of (multi-files projects is a big thing in the list...)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

p4nix

Oh, forgot about that great online tool. But what would you have to do in order to do it offline?
  • Calculators owned: fx9860GII (SH4)

Adriweb

Quote from: p4nix on October 20, 2015, 08:49:36 PM
Oh, forgot about that great online tool. But what would you have to do in order to do it offline?
Basically, set up ZDS as described here.
The include file is available here: http://wikiti.brandonw.net/index.php?title=84PCE:OS:Include_File
For work on ASM/C libs, see Mateo's files (posted here and there)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Lionel Debroux

And the parts of the code not directly related to TI-Planet integration, which were derived from the resources Adriweb has linked to, will be open source.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Dream of Omnimaga

Quote from: Adriweb on October 20, 2015, 08:40:32 PM
Quote from: p4nix on October 20, 2015, 08:27:44 PMSeems that casio is much easier than TI :P You'll even have a fancy icon then instead to start it manually with Asm(
Shells can provide you with icons too ;) (And things Noshell-like, like PHASM, make "Asm(" optional)

Quote from: p4nix on October 20, 2015, 08:27:44 PMBut anyway, cool stuff you are working on.
Thanks :)

Quote from: p4nix on October 20, 2015, 08:27:44 PMI wonder how hard it is to get started with C on this calculator - programming on casio is quite easy because you already get a SDK.
As hard as opening a page in your browser, if you use TI-Planet's online CE C compiler (when it's out) :P
It looks like this, for this code:

So... you pretty much just have to code, see warnings and/or errors as you hit the build button, and try it out on your calc :)

An easy-to-setup/use emu side-by-side for debugging would be nice, too. Maybe one day... ?
But the current TODO/WISH list has already several things to take care of (multi-files projects is a big thing in the list...)
Another thing that TI has over Casio is that a Flash app with zero bytes of code in it will not take 29 KB by default  like on the Casio fx-CG20 :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

critor

Did you reach the end ? ;)
My best play is in 1086km :


I don't know if it's the shortest way.
So in order to help you and still give you some place for enhancements, here's a non optimal youtube walkthrough in 1092km :
http://www.youtube.com/watch?v=J3FktZ2nF54

The official map may help you too :

Dream of Omnimaga

I was surprised that every step represented 1 Km. I guess that's due to the map being a world map lol. I thought it took like 25-30 steps before reaching 1 km, if not more. I wonder if this game engine could be expanded into a full game?

The Reign of Legends 3 had a step counter as well, but since that game also had battles that involved grinding and lots of searching around in dungeons, the step counter would usually reach 15000 near the end (I once hacked my save file to have 99 levels and all spells from the start and still reached 10000). IIRC Final Fantasy III or VII had one too and it went very high. I can't imagine walking this much in real life for some adventure while carrying this much equipment XD
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

critor

Here's the full map of the Mandragore kingdom :


Yes, all this fits in your calculator. ;)

Powered by EzPortal