clockworkpi

Advice for people with no hardware programming background knowledge

Hi,

I am a front-end developer who is amazed with the idea of creating your own game and play it on a retro gaming console. However I had no background knowledge in hardware programming. So my question is:

  1. what is the essential knowledge in order to access to the gameshell hardware
  2. I am learning python now, is there any other programming knowledge I should get familiar with?

During my free times, I work on a mobile game with the help of game engine(Unity), I also tried on creating 3D experience on web using js library like babylon.js. I understand those experience might not help much in terms of hardware programming, so if there is any advices I will be much appreciated.

Thank you!

3 Likes

You say you know python? Perfect, you can do game development with it using a module called “pygame”. Pygame is a python wrapper for a graphics library called SDL. This works very well for 2D game development. For getting started, just look up “python pygame tutorial” on YouTube and find a series that clicks with you. For 3D games, “pyglet” can be used (it’s a python wrapper for OpenGL), but can be a bit trickier than pygame for some.

For others that don’t know python well, the GameShell also comes with C, Lua, Node.js, and Lisp (likely the dialect Common Lisp). For Lua there is Löve2D (another SDL wrapper) and for Common Lisp you can look into the book “Land of Lisp” which teaches Common Lisp through making games (more text-based, but Lisp is valuable to learn as a developer). As for C and Node.js, the former is a bit daunting for beginners but using OpenGL is how you’d want to start and for the former just look through npm for whatever tickles your fancy in the constantly changing JavaScript ecosystem.

3 Likes

I’m having some fun with Pycharm, wading through the basics. I wasn’t aware that you could use Lisp to make games! I remember this one time Japan tried to fix the world with Prolog.Their traffic lights are red, yellow, and blue. :wink:

1 Like

Thank you for giving me the starting point!

Just one more question. As I am more familiar with javascript and I am just starting to learn python, may I ask if Node.js app works well with GameShell compare with making game using pygame?

I am sort of at the beginning of determine the learning path, and if python works better with gameshell, I think it worths to spend more times to focus on pygame regardless I am more familiar with javascript.

1 Like

There is nothing to know about the hardware apart from maybe the screen resolution. The ClockworkPi (and the GameShell) are more or less identical than your average PC running Linux. So everything you can do on your pc can be done on the ClockworkPi.

The only differences is that the ClockworkPi will be significantly slower than a today average PC, and have less memory, apart from that any thing that work on a Linux PC will work on the ClockworkPi, if it does not, then it is buggy (the software) or using some direct hardware access, which is never a good idea, or some assembly code (which is, if not done correctly, a bad idea too if there is no non assembly fallback)

So don’t use a game engine asking for too much power (not sure how Unity would work on that device) but yeah, standard linux box == all linux things would work, more of less, meaning you can use virtually all existing languages:

C, C++, (ARM) assembler, Pascal, Forth, Fortran, Cobol, PHP, Python, Perl, Ruby, Lua, Objective-C, BCPL, D, BrainFuck, Go, Rust, Java(Script), R, Algo, SmallTalk/Squeak, bash*, Haskel, Logo, TCL(with of without Tk), Pizza, REBOL. Swift, VHDL, SPL, … and many, many, many, many more

*yes yes you can draw things on a framebuffer using bash

1 Like

I’m not sure which works “better” since I haven’t made any games personally using Node.js yet. However, it’s worth noting that JavaScript is single threaded, so it will be lacking in performance in that regard if you are planning to make use of threads in something like Python. “Better” also depends on what type of game you want to make. If you want a text adventure, go with either; but if you want something 3D then JavaScript may not be the best choice.

The languages I listed were the ones listed by Clockwork that they’re including. We don’t yet have the details of what the OS experience we have packed will be, so I went with the only known variables we have if others don’t feel comfortable compiling their own languages or setting up a Linux distribution on the GameShell.

Also, my only issue with the languages you listed is Objective-C. While GNUstep allows for this, it’s also sufficiently buggy and not at all ideal for a beginner in game development on a Linux system, especially without Cocoa or GameKit that most resources on game development in that language utilize.

Well, for decades games was designed as single threaded so that’s not really a big issue there. (and even 3D games)

My list of languages is a short list of all languages that can be used under Linux, as long as the code is compiled, or you have, for interpreted languages, the code of the virtual machine, it will be really easy to make it to work.

Everything you can do on a PC under Linux will be possible on the GameShell/ClockworkPi, it is not a dedicated platform like a NES, Megadrive, or even a PS2.

The question was which was better, not which is possible. Obviously almost any retro game can be done in JavaScript, but without writing performant code there may be issues getting it playable under a single thread.

And again, we don’t know how feature full or stripped down the Clockwork OS will be, so I was advising by what we know for now is readily available out-of-the-box. While any of the others you listed are possible, setting it up can be challenging for beginners, especially on ARM architecture.

Great advice from @aewens @Godzil and @TrapaPie.
I’m trying to collect some learning resource for this. Thanks to your pointers, with a quick search give me some useful links, (please help to add more) :

For Python:

To be continued…

2 Likes

For Lua:

For LISP:

3 Likes

Humble Bundle has an interesting offer at the moment. They offer a book bundle about coding your own games! Especially the ones about Python and Pygame may be interesting for developing games that run on the GameShell.
So if you’re new to coding games this might help you get started: CYOG_bundle

3 Likes