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
- 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. - 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
- MacOS
- Windows
- Linux
- Now on your computer, open a terminal, by running the Terminal program
- Change to the folder you selected as your Retcon root by running
cd $RETCON_HOME
- 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. - Now
cd
into the folder that has been created (the same as the name you gave your repo) and runcode .
to open VS Code. Ifcode .
doesn’t work, you’ll need to go into VS Code manually and open the folder. - 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 - 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. - 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. - In the VS Code terminal,
cd
into the newly created folder by runningcd _h
. Then get the full path of the folder by running thepwd
command, and copying the output of that command, which should be a full folder path. - 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.
TODO
TODO
🎉🎉🎉 YOU HAVE NOW SET UP VS CODE WITH THE TOOLS NEEDED TO WRITE GAMES IN C 🎉🎉🎉
Building the project
- MacOS
- Windows
- Linux
- In your VS Code terminal, go back to the main game folder by running
cd ..
- 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 calledbuild
, 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 projectsms-game0
then a file calledsms-game0.sms
should have been created inside thebuild
folder. If you experience a problem at this point, ask for help.
TODO
TODO
Running the project
- MacOS
- Windows
- Linux
- 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. - 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.
TODO
TODO
🎉🎉🎉 YOU ARE NOW READY TO START WRITING YOUR OWN GAME! 🎉🎉🎉