Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Learning for dummies?

Reply to topic
Author Message
  • Joined: 09 Mar 2022
  • Posts: 20
Reply with quote
Learning for dummies?
Post Posted: Fri Sep 29, 2023 1:11 pm
Hi SMS enthusiasts!

I've always wanted to make a game from scratch, it's been on my bucket list for quite some time.

At first I thought that, maybe, I could code something for the ZX Spectrum, but, as time has passed, I've asked myself "Why don't you try something for your favourite Z80 system?"

The thing is that I have ZERO knowledge. I don't know where to begin, what to read, what to try... And my career couldn't be more different from what is needed (Philology).

I know some technical aspects of the system (Color palette limitations and use in BG and sprites, how many sprites you can use, resolution...) but nothing else.

Is there something for dummies such as myself?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Fri Sep 29, 2023 1:47 pm
Have you written any code before? There’s two main ways to write for Master System: assembly and C. These are both considered “too hard” by many modern developers because they require you to think more about details than modern programming languages do, but there’s still a lot of similarities. However, if you have never programmed before, it is quite a challenge - but one that many people took on in the 80s.

If that’s all too much for you, then you can consider working on a hack, replacing assets in an original game - Alex Kidd in Miracle World being the most common, using KiddEd.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Mar 2022
  • Posts: 20
Reply with quote
Post Posted: Fri Sep 29, 2023 2:49 pm
The only "code" I've written was dabbling in Python creating some Dictionaries, Corpora, etc. for text analysis But that was more than 20 years ago and I can't remember a thing.

I'd rather create something from scratch, no matter how simple it is, instead of hacking something on Alex Kidd. Speaking of hacking, I did some graphical hacks and translations using hexadecimal editors for the "unmentionable system" more than 20 years ago aswell. I think that's where my need for creating something new for the SMS comes from.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Fri Sep 29, 2023 3:05 pm
A very long time ago I started a tutorial on assembly programming for SMS here: https://www.smspower.org/maxim/HowToProgram/Index but it has never gained a lesson 2 and many parts are missing - sprites, graphics conversion, scrolling, controllers, sound, building an interrupt handler. But it might help you to see if it’s something you want to build upon.

There’s also https://www.chibiakumas.com/z80/MasterSystemGameGear.php but to me that is incomprehensible madness.

I hope some others can point to tutorials for devkitsms and other C based options.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Fri Sep 29, 2023 3:34 pm
Hey @Akomander!

I am working on a lot of things that might be of interest, but sadly most is too rough or incomplete to share just now.

The one thing that's probably closest is a tutorial to create a very basic platform game in C using devkitsms, and if you're interested in that I can certainly publish it somewhere in draft form.

I guess helpful for myself and anyone else who might be in a position to point you in the direction of interesting projects or tutorials would be answers to the following:

1. Do you have a preference for either C or assembly? As Maxim points out, both are hard although arguably C has a shallower learning curve - meaning that you can get more done quicker, but you also tend to learn somewhat slower.
2. What hardware / OS are you working on? Mac, Windows, Linux, etc.? This has some impact on what tooling you can use and how easy it is to support, and tooling is a big part of the development experience, although I think it's fair to say that you can get going on any system with enough perseverence.
3. Do you have a strong preference for the genre of game you'd like to create? Ideally you won't, since it's easier to learn with very simple games first, progressing to more advanced concepts later.



If you're also interested in how the hardware fits together and are willing to wait a while, you might also want to follow my Retcon85 project which lets you effectively build an 8 bit console clone (starting with Master System) from scratch.



In the meantime, other interesting resources might be:

- Some of the books by Steven Hugg like this one - I haven't actually read the one linked, but quite enjoyed his Atari 2600 and NES ones and...
- ...related, his pretty incredible 8bitworkshop project which lets you write retro games in "the cloud" if that doesn't sound like the most ridiculous non sequitur.
- Pygame if you want to just get started with basic game dev but without the added hassle of getting past all the barriers retro 8 bit development throws into the mix. Me and my partner are actually working on a series of videos at the moment where she knocks up a few classic arcade games in Pygame and I think it's a really fun platform, and not without its own challenges too. A good bridge I'd say.

Let me know if you'd be interested in the devkitSMS tutorial I mentioned above.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Fri Sep 29, 2023 3:56 pm
On the topic of game programming in general I can’t recommend Jonathan Cauldwell's book enough. It’s about the ZX Spectrum, but most lessons can be easily applied to the Master System. There’s a link to it in the development section under "getting started".
  View user's profile Send private message
  • Joined: 03 Dec 2021
  • Posts: 55
Reply with quote
Post Posted: Sat Sep 30, 2023 12:16 pm
Hello! If you want to use C, what about this devkitSMS tutorial? https://www.smspower.org/forums/15888-DevkitSMSTutorial

I followed it and it works. Then you can try adapt it to make your own first game and learn. Good luck!
  View user's profile Send private message
  • Joined: 09 Mar 2022
  • Posts: 20
Reply with quote
Post Posted: Mon Oct 02, 2023 12:50 pm
Last edited by Akomander on Mon Oct 02, 2023 3:25 pm; edited 1 time in total
First and foremost, thanks to all of you for the prompt responses!

@Maxim, I'll check those even if they aren't complete

@willbritton That draft would be welcome, but I can wait if you don't feel like sharing it yet ;)
1 - My understanding is that assembly would take more advantage from the system itself but it's hellish to learn. C is easier and can be used on different systems with the appropiate changes. Being as programming illiterate as I am, I guess C would be the wiser option.
2 - I'm mostly on Windows all the time, although I have an old netbook rocking Lubuntu.
3 - Not really, I know that I'll start making shitty pong clones and the like but I'd love to make something different. For some reason, I have the feeling that an RPG would be easier to code than a platformer (no need for good inertia, jumping mechanics, etc). Besides, homebrew RPGs on the Master System are not a common sight!

I'll be sure to check the book. It looks interesting.

@Kagesan Neat, I'll check that too. I thought about starting with the Speccy as I mentioned previously (looks easier somehow) but the Master System is my favorite

@umbe1987 Now I feel dumb, I checked the whole subforum and didn't find this. Thanks!
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Mon Oct 02, 2023 2:56 pm
Don’t dismiss assembly too quickly. It's not nearly as difficult to learn as some people say. Personally, I prefer it to coding in C precisely because of its immediacy. You always know exactly what the hardware does because you’re talking to it directly.

C adds a layer of abstraction that makes it easier to implement certain ideas and processes, and maybe that’s more your cup of tea. In the end it's just a matter of what you feel most comfortable with.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Mon Oct 02, 2023 3:45 pm
Akomander wrote
My understanding is that assembly would take more advantage from the system itself but it's hellish to learn. C is easier and can be used on different systems with the appropiate changes. Being as programming illiterate as I am, I guess C would be the wiser option.


if C will be your choice, you should first of all read some beginners tutorial to learn C (such as this one, for instance). You don't need to master it to program a simple game, but you need to understand basic concepts such as data types, variables, functions and pointers.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Mon Oct 02, 2023 5:14 pm
Akomander wrote
@willbritton That draft would be welcome, but I can wait if you don't feel like sharing it yet ;)

No worries, I'll see about getting it somewhere useful for you very soon!

Akomander wrote
1 - My understanding is that assembly would take more advantage from the system itself but it's hellish to learn.

I certainly wouldn't use the word "hellish". I think for experienced programmers who came in at higher language level it feels extremely different, but since you're not an experienced programmer I think you have the advantage of having no previous yardstick to compare with!

I personally think programming in assembler is a beautiful experience - as Kagesan points out, it is talking directly to the CPU which never ceases to amuse me. (P.S. if you thought you needed a primer on how a CPU works you could check out my latest YouTube video :) the next one is about binary & hex which might also be helpful, hopefully will be released in the next week or two)

Akomander wrote

2 - I'm mostly on Windows all the time, although I have an old netbook rocking Lubuntu.

Okay. My toolchains of preference, and those referenced in the tutorial I mentioned, are Docker images which definitely work for me on MacOS, but at least one or two people here have said they also work on Windows, sadly I'm not (any longer) a Windows expert and so I don't know exactly how to set them up, but maybe others will.
I'll set the tutorial up referencing the Docker toolchain – and if you can get it working it is definitely the easiest way in my experience – but if you happen to have already installed or built either or both of WLA-DX and devkitSMS you should be able to do without.

My view is that spending time mucking around getting the toolchain sorted is a waste of valuable coding / learning time which is why I think it should be one-shot setup kind of thing ideally.

EDIT: Maxim also has a collation of buildchain tools somewhere, if I can dig out a link quicker than he can I will amend this post :)
EDIT2: here - phew!

Akomander wrote
3 - Not really, I know that I'll start making shitty pong clones and the like but I'd love to make something different. For some reason, I have the feeling that an RPG would be easier to code than a platformer (no need for good inertia, jumping mechanics, etc). Besides, homebrew RPGs on the Master System are not a common sight!

I know what you mean about Pong - it does get a bit tedious. My partner is currently having much more fun coding Space Invaders than she did with Pong or Breakout (which are essentially the same game with a few minor differences).

RPGs...I think you might be surprised by how much work they are. My issue with them is how open ended the problem space is. To do anywhere near a decent job you need to create some kind of abstract engine that separates the mechanics of your game from the content. But hey, don't let me put you off! CerezaSaturn64 is currently working on a big old clone / port of the original NES Final Fantasy to SMS and you might want to follow progress there (see other more recent posts by Cereza for some technical insights)

Kagesan wrote
C adds a layer of abstraction that makes it easier to implement certain ideas and processes, and maybe that’s more your cup of tea. In the end it's just a matter of what you feel most comfortable with.


This is definitely a difference. Language constructs (loops, functions, etc.) aside, using something like devkitSMS helps you get started super quickly, because it also provides you a library which abstracts away loads of the SMS hardware details. So if just getting some kind of working game going relatively quickly is your goal, this might be the right option. However if you really want to know how the hardware is working then you might find assembly is a better, but slower, road to travel.

One advantage of starting with devkitSMS is that you can get something simple working quickly in C, and then if you like you can try porting small chunks of it over to assembler, with or without using the devkitSMS library source code as a reference.

sverx wrote
if C will be your choice, you should first of all read some beginners tutorial to learn C (such as this one, for instance). You don't need to master it to program a simple game, but you need to understand basic concepts such as data types, variables, functions and pointers.

That is good advice, and also there are quite a few people around here who can help you with C, possible fewer than assembler, but still enough. C is curiously halfway (or less!) between the hardware and a modern high level language, so there's lots you can get wrong if you don't have the hardware in mind which can feel a little frustrating again, if you have any experience of higher level languages like Python which makes everything "easy" for you!
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Tue Oct 03, 2023 7:09 pm
willbritton wrote
Akomander wrote
@willbritton That draft would be welcome, but I can wait if you don't feel like sharing it yet ;)

No worries, I'll see about getting it somewhere useful for you very soon!


Very rough draft now up here.

I quickly copied this over from its original format in Notion, so there may be a bunch of formatting errors still. I know all the images are missing and I'll update those when I can.

The tooling instructions are still written for MacOS but see how far you can get anyway. Let me know if you need a hand.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Mar 2022
  • Posts: 20
Reply with quote
Post Posted: Thu Oct 05, 2023 2:23 pm
Thanks all for the MANY responses!

@Kagesan I already have some problems understanding some programming concepts.I feel learning assembler would make it even harder. It would be the optimal thing to do, but I think I'm 25+ years late to the party ^_^u

@sverx Thanks! I'll take a look.

@willbritton Thanks for the draft! I'll try to use Windows at first. If see many roadblocks, I may use my Lubuntu netbook as "development machine".
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!