Advice for Mac code

Good morning.

I am a 56 year old Brit who has done some programming over many years - BBC BASIC back in the day. Some Pascal and then later Visual Basic. Also written quite a lot of macros in Excel and done some Java courses.

What I’d like to do is be able to create a game that can be played on a Mac. Ideally stand alone but could be browser based.

What do people suggest I look at to learn to be able to do this please?

Many thanks

if it could be browser based, you will need web development, and you can follow the freecodecamp curriculum.

I have honestly no idea what a desktop app needs, so there I can’t be of help

Thankyou for the reply. Sorry to be tick but which language is that? Python?, Java? Something else. There are lots of different courses. Would you mind being a bit more specific please?

the freecodecamp curriculum teaches the web MERN stack, Mongo, Express, React, Node - it’s all JavaScript (it’s the language of the web as it’s the only programming language that the browser can understand), and then recently added there is some coverage for Python.

JavaScript is not the only web dev language, there are other languages that are used, some have frameworks for the frontend too, but the browser still know only JavaScript so it needs to be translated to JavaScript anyway. Server-side there is a much wider range of languages possible - if your game would need to be able to save progress and have user accounts, it needs to have a backend too, if instead you are satisfied with not having progress shared on multiple devices and/or just relying on local storage for progress you could also have just a front-end.


What kind of game? There are lots of options here, it would help to narrow down what you’re wanting to do.

A dice game similar to Yahtzee if you know that. Basically 5 die and you have 3 throws to make scoring combinations. I’d have the computer play against human. So I need to be able to draw the game space, animate (maybe) rolling dice and so on.

There is a link sent from Quincy Larson’s 5 links worth your time mail

Code Video Games

So with that, you can write the logic for the game with anything, using objects and functions that act on those objects. So it may be a good idea to take one of the languages you’ve experience in and try to write out that logic. The reason I’d try to do that first is that you want to be able to play against the computer, and you need to figure out a way for the computer to be able to be a reasonable opponent. So to do that you probably want a working game just in code, no graphics or anything. The computer can just play randomly, but it is likely that you want them to be fun to play against, for them to be able to play tactically. That’s the hard bit, but it doesn’t need a special framework or graphics, it just needs a lot of thought.

The actual overall game application, the window that will open, the UI, the graphics, in a sense they are just window dressing. In reality they’re quite a bit more than that, but they are going to run and respond to the logic.

For that, there are a lot of really good game frameworks that will help you enormously. They’ll give you the structure, they’ll contain the functionality for application windows, they’ll let you easily add graphics, etc. I’m sure other people can suggest others, but for starting out Löve (Lua) and PyGame (Python) are really good. Godot is excellent. JavaScript is useful for game frameworks because it’s native to the browser so it’s easy to make web based games - Phaser is good and there’s a new framework called Kaboom which looks really good as well. Note I’m mentioning stuff that doesn’t use the languages you’ve mentioned – going back to the logic part, you’d need to translate it to whichever language the framework used (or find a Java or a Pascal or whatever framework).

1 Like