Port games from Classic to META

Creations

Aurélien Rodot

6 months ago

The old Gamebuino Classic has plenty of games. Good news, it's super easy to port them on the new Gamebuino META!

Install the libraries

First, do the Gamebuino META Setup tutorial to install the META board and library. You DO NOT need the Gamebuino Classic library.

Now you have to install these two libraries to be able to compile the Classic's games for the META.

Download the *.zip files for each, then in Arduino click on "Sketch/Include Library/Add .ZIP Library".

Edit the classic game

No you can open a Gamebuino Classic Game and do the following modifications

A the top of the game you will find something like this (use CTRL+F to search).

Replace

#include <Gamebuino.h>
Gamebuino gb;

With

#include <Gamebuino-Compat.h>


Replace (if present)

#include <EEPROM.h>

With

#include <Gamebuino-EEPROM.h>


Remove (if present)

#include <SPI.h>

Compile for the META

  • Click on "Tools/Boards/Gamebuino META" (at the bottom of the list) to select the right device.
  • Click on "Sketch/Upload" or press "Ctrl + U" to compile and upload the program to the Gamebuino META.

Fix errors

If you get a whole bunch of error messages, don't panic. Some games might require a few more adjustments. Scroll up to find the first one and try to resolve it, then compile again. Repeat until there is no error. If you can't solve one, please post it here so we can help :)

Share the result

Now that you've been through this, you should make a new Creation. This way others can play it directly and give you some delicious upvotes :)

View full creation

STUDIOCRAFTapps

NEW 6 months ago

Studio's Advices:
While porting my project to meta, I found some problems that really slowed the process. I don't want anyone else to deal with them

- Make sure you don't use the INVERT color because it doesn't work anymore (Not sure if it works with the special library but it doesn't when 100% porting the game)
- Replace all your "int" with "uint32_t or int32_t",  "short" with "uint16_t or int16_t" and "char" (used as number) with "int8_t"
- Sometimes the conversion between floats and other number type compiles but gives an error when trying out the game

When fully porting:
- All sound related stuff don't work anymore the same way
- EEPROM has been removed
- gb.titleScreen has been removed
- You don't need to initialize gb with "Gamebuino gb;"
- ...

To find out anymore problems, simply disable all your code and enable one part of the code at the time to find out which one doesn't work.


(Those are all stupid advices) Suggest more problem that you found to help others :D

DFX2KX

NEW 6 months ago

I'm currently going through all of my old Arduino stuff preparing to build a (mostly) new PC, and if I find the source to Missile Command, I might try that. I was going to just rewrite it from scratch XD.

jicehel

NEW 6 months ago

You have to convert constantes like: gb.display.setColor(INVERT); 

I have replaced INVERT by WHITE

Sorunome

6 months ago

I didn't do that as color INVERT doesn't exist on the META, so it might not yield wanted results.

So, with the error, people can take a closer look at what is going on.

Sorunome

NEW 6 months ago

jicehel jicehel

I didn't do that as color INVERT doesn't exist on the META, so it might not yield wanted results.

So, with the error, people can take a closer look at what is going on.

jicehel

NEW 6 months ago

yes, but here, i think we could write all error finded (error finded is not necessary something to solve in auto with the library...  ;) ) and how to correct it. All things who was existing in classic that need be corrected by progrmmer. I had see something else but i haven't written.It was gb.popup(F("Slave paused"),2); which now if i don't mitake can be written  gb.popup("Slave paused",2); but correct me if i make error.


Sorunome

6 months ago

Yeah, that is correct .

We literally have #define F(x) x

Sorunome

NEW 6 months ago

jicehel jicehel

Yeah, that is correct .

We literally have #define F(x) x

You must be logged in in order to post a message on the forum

Log in