* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Mandragore - Tilemap-based game for the CE, made in C  (Read 5250 times)

0 Members and 2 Guests are viewing this topic.

Offline Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 423
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
Mandragore - Tilemap-based game for the CE, made in C
« on: October 18, 2015, 11:25:47 pm »
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
« Last Edit: November 26, 2015, 12:37:58 am by DJ Omnimaga »


  • 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

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18793
  • Post Rating Ratio: +98/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
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.
« Last Edit: October 18, 2015, 11:32:23 pm by DJ Omnimaga »
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Araidia

  • Full User
  • Join Date: Sep 2015
  • Location: USA
  • Posts: 233
  • Post Rating Ratio: +0/-0
    • 3648273
  • Gender: Male
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

Offline Araidia

  • Full User
  • Join Date: Sep 2015
  • Location: USA
  • Posts: 233
  • Post Rating Ratio: +0/-0
    • 3648273
  • Gender: Male
Does this require any other programs to be installed, such as CE Textlib?
  • Calculators owned: TI84+ CE

Also Known as: Soul | Enguard

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18793
  • Post Rating Ratio: +98/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 423
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
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

Offline p4nix

  • Full User
  • Join Date: Jun 2015
  • Location: Germany
  • Posts: 430
  • Post Rating Ratio: +6/-1
  • Don't catch the ball.
    • p4nix
  • Gender: Male
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)

Offline Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 423
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
Seems 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)

But anyway, cool stuff you are working on.
Thanks :)

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.
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

Offline p4nix

  • Full User
  • Join Date: Jun 2015
  • Location: Germany
  • Posts: 430
  • Post Rating Ratio: +6/-1
  • Don't catch the ball.
    • p4nix
  • Gender: Male
Oh, forgot about that great online tool. But what would you have to do in order to do it offline?
  • Calculators owned: fx9860GII (SH4)

Offline Adriweb

  • Full User
  • Join Date: Jan 2015
  • Location: France & Canada
  • Posts: 423
  • Post Rating Ratio: +7/-1
    • Adriweb
    • @Adriweb
    • Adriweb
    • @UC-UIrbk5SuaUCvnV6SQvt-Q
    • /u/Adriweb
    • Adriweb
    • TI-Planet.org
  • Gender: Male
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

Offline Lionel Debroux

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 224
  • Post Rating Ratio: +11/-0
    • debrouxl
    • 58/5891
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.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18793
  • Post Rating Ratio: +98/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Seems 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)

But anyway, cool stuff you are working on.
Thanks :)

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.
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline critor

  • Full User
  • Join Date: Dec 2014
  • Location:
  • Posts: 190
  • Post Rating Ratio: +6/-0
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 :


The official map may help you too :
« Last Edit: October 26, 2015, 01:28:29 pm by critor »

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18793
  • Post Rating Ratio: +98/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline critor

  • Full User
  • Join Date: Dec 2014
  • Location:
  • Posts: 190
  • Post Rating Ratio: +6/-0
Re: Mandragore - Tilemap-based game for the CE, made in C
« Reply #14 on: February 26, 2016, 08:46:01 pm »
Here's the full map of the Mandragore kingdom :


Yes, all this fits in your calculator. ;)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games