Skip to main content

Creating the project

WORK IN PROGRESS!

This page is not quite ready for visitors yet. Please check again another time.

We've provided a quick and easy way to get started with your devkitSMS project. Assuming you've managed to install the Docker toolchain, (which includes a utility called GNU Make), you ought to be able to use our SMS game template projects on github to create your own skeleton game in a flash and have it build straight away.

Creating a new github repo remotely

  1. Go to https://github.com/retcon85/template-sms-devkitsms and click the "Use this template" button to "Create a new Repository". Give it a name that suits you, but for the purposes of this guide, we’ll call it sms-game0. You can choose whether to make your new repo public or private, it’s up to you. If you want to share you code with others, or get help with it, setting it to public can be useful. Leave “Include all branches” unselected. Don’t worry about including a Description, unless you really want to add one.
  2. Still in github, click the "Code" button and copy the HTTPS or SSH link to clone the repo. It shouldn’t matter which of HTTPS or SSH you choose at this point — both should work equally well for you.

Cloning the repo to your computer

  1. Now on your computer, open a terminal, by running the Terminal program
  2. Change to the folder you selected as your Retcon root by running cd $RETCON_HOME
  3. When you are in your project folder, type git clone followed by a space, then paste the URL you copied in step 2. Press enter to run the program.
  4. Now cd into the folder that has been created (the same as the name you gave your repo) and run code . to open VS Code. If code . doesn’t work, you’ll need to go into VS Code manually and open the folder.
  5. In VS Code now, press Shift-Cmd-X to open up the extensions tab. Search for the letter "c", and install the "C/C++: Intellisense, debugging and code browsing" extension from Microsoft
  6. Open a new terminal in VS Code by pressing Ctl-``. It should already have put you inside the same folder as your game project, but if not, just use cd` to go there.
  7. Still in the VS Code terminal, type sms export-h. You should see a message like Header files exported to ./_h folder and, if you switch back to the explorer view (Shift-Cmd-E) you should see that a new folder called _h should have appeared, with some files inside.
  8. In the VS Code terminal, cd into the newly created folder by running cd _h. Then get the full path of the folder by running the pwd command, and copying the output of that command, which should be a full folder path.
  9. Now press Cmd-, to open up the VS Code settings, and search for "c_cpp default include". You should see a setting called "Intellisense" in the results. Click it, then find the setting called "C_Cpp › Default: Include Path" and press the "Add Item" button. In the box, paste the path you copied from step 10, and press OK. You can close the settings tab now.

🎉🎉🎉 YOU HAVE NOW SET UP VS CODE WITH THE TOOLS NEEDED TO WRITE GAMES IN C 🎉🎉🎉

Building the project

  1. In your VS Code terminal, go back to the main game folder by running cd ..
  2. Now try and build the project, by running sms make from the terminal. It should print a bunch of stuff to the output, but it shouldn't print anything that looks like an error. In your explorer view, you should see that there is a new folder created called build, and inside it is a file with an .sms extension. It should have the same name as the name of your project folder, e.g. if you called your project sms-game0 then a file called sms-game0.sms should have been created inside the build folder. If you experience a problem at this point, ask for help.

Running the project

  1. If you still have Emulicious open, great. If not, run it again. The easiest way is by pressing Cmd-Space and typing "Emulicious.jar" into the Spotlight search box. Once it is found, run it from there. You could also pin Emulicious to your dock bar.
  2. In Emulicious, open the "File" menu and select "Open File...", now navigate through your folder structure to find the .sms file that was built in step 13. The file should run, and you should see a black screen. This is normal, because you haven't written any game code yet.

🎉🎉🎉 YOU ARE NOW READY TO START WRITING YOUR OWN GAME! 🎉🎉🎉