Category: Game

Quake II – still a favourite

Quake II – still a favourite

Quake II screenshotOh I do play much newer games such as Far Cry 5 which I’ve completed recently but Quake II was a favourite of mine back in 1997 when I bought it. I’m more of a Quake than a Doom person. Unfortunately for me, my then PC couldn’t run it. It was only two years old as well.  But I got a new PC in 1998 and that played it just fine. I’m not saying I’m a saddo but I can play it through on the hardest level without losing a life.

The reason I mention it because of an article I came across that described the different ID Tech Game engines and the games made with each engine. All have been open sourced (Up to ID Tech 4). Quake II was written using the ID Tech 2 engine itself written in C and assembler.

For some reason the link to Quake II source code is wrong in that article but you can find it on GitHub. In one of 18 of ID Tech’s 18 repositories there.

If you are interested in downloading and trying to understand the Quake II source code, I strongly recommend you read Fabien Sangard’s walkthough of the code.

Godot and IO games

Godot and IO games

Agar.io homepageI occasionally answer (often in a somewhat ascerbic tone) questions on Quora.com, not just programming though that;’s the bulk of my answers.  Feel free to follow me there! One question today was asking whether it was better to deveIop IO games on Web or mobile first.

I’d never really looked at this category- what is an IO Game? Very loosely, its the replacement for Flash games, and unlike those, it can run on mobile or cross-platform. A typical development system for such games is Godot, an open source cross-platform development system. The main language is GDScript based loosely on Python but any programming languages that has GDNative bindings (so C++, C#, Rust, Nim, D and any others I don’t know about. ).

You get games like the multiplayer game agar.io which has an entry on Wikipedia and is cited as an example of an IO game.

 

Chess in C

Chess in C

Tom Kerrigan ChessI noticed that the Covid lockdown had made streaming of chess games very popular and did a search to see if I could find the source of one in C. The first one I found was actually C++ (cout << is a bit of a giveaway!) but I found this one by a developer called Tom Kerrigan. It runs from the command line and the exe is just 157 KB in size.

Note it is copyrighted but he has put his source code out there so if you are interested in seeing how a chess program is written this is an excellent place to start. His code also includes a lot of comments and includes an opening book.

 

The fun of game design

The fun of game design

Audience
Image by Pexels from Pixabay

My new side project is a free to play multi-player mobile game about living the life of a celebrity. It’s brutally competitive and will accommodate up to 10,000 players in one game. It scales horizontally so multiple games can be run at the same time. It’s an idea I’ve had for years and now I’m on it.

The idea is that you start moving to the big city. A city where your dreams can come true by becoming famous in some field. Whether breaking into film,  or sport, on TV, a famous writer and so on.  But first as a wannabe, you have to get a job, whether its pumping gas, waiting on or one of a dozen jobs.  And try to make your way up the greasy pole to the top of the A-List.

I have devised mechanisms for this. But there’s way more depth to the game than what I’ve said. The game is basically about decision making. Every action has consequences. If you go to this party, you might make friends with someone who can open doors that will give you more public exposure and earn celebrity points.

The game server generates events that you can attend. It’s a busy life attending openings, first nights, filming of videos, commercials, going to auditions, making guest appearances, signing books, partying, going to concerts, balls, awards ceremonies, opening fayres, launching ships, or more mundane things like product launches, endorsements, appearing in TV adverts and more.

All this has to take place in a game city. So the game server has to create a city populated with buildings, with jobs. Celebrities actually do jobs. Those books don’t write themself, or films make themself. Musicians have to record songs, go on tours. But you are also interacting with other players, helping them and helping yourself.

As a game designer and programmer I have to translate all this into code. In the past I programmed postal games. These were games where orders were sent by post, processed, results printed out and then mailed back. In this case, they’re entered on mobile and uploaded to a game server. Here a program will run at regular intervals and process a day’s activities. All those parties etc. have to be processed and the consequences determined. Did you make friends, did you get any new job offers? Have you accumulated some more celebrity points and moved up in the league table? Did you escape from being a wannabe to C-lister yet?

Then after that’s all done, the results and new decisions can be fetched onto mobiles and players decide what their next decisions will be…  That’s what I’m designing and programming. Both the game server engine and the mobile clients.

Consider entering a game jam

Consider entering a game jam

Game jamsMuch as I like creating games, game jams are not really my thing as I like to spend time polishing and making them look good and that’s not really how you want to spend your 24-72 hours.

But clearly they are for others as the GMTK Game Jam in 2020 had over 5,000 entries! Here’s a GitHub staff pick of their favourite top ten entries.

What is a game jam? Well Wikipedia helps out “A game jam is a contest where participants try to make a video game from scratch. Depending on the format, participants might work independently, or in teams. The contest duration usually ranges from 24 to 72 hours. Participants are generally programmers, game designers, artists, writers, and others in game development-related fields.”

There are probably more game jams going on than you imagine. The itch.io website has a list of forthcoming game jams plus links to past ones.

An example of a game idea

An example of a game idea

Sometimes I wake up in the middle of the night and my brain is bursting with ideas. I’ve just finished reading Shaman by Kim Stanley Robinson that’s set 30,000 years ago and came up with ideas for a tribes game very loosely based on that (Absolutely nothing to do with the plot of the book!) .  I opened up my iPhone around 3:00 a.m. and these are the notes I wrote down in the Notes app.

I opened my email (Gmail) which picks up notes from my phone automatically, so I have the notes now here in my PC.  They are as I wrote them so they are quite rough.

“Tribe game. All players start with a small village and 50 tribes people.
Can relocate, hunt, plant etc. Can raid other tribes. Can split tribes spread over land. Have children. Found religion. Use animals. New options as tribe progresses. Discover and trade gold, furs. Tribes can move to other places or settle and form villages.
Raids build up resentment between tribes. Enough resentment leads to war. But can reduce resentment by gifts of women, food, furs etc st festivals.
Can do crafts, paint, culture, spirituality, warfare, building. Each has 1-10 levels with names. Orders focus on an area.
Better food means stronger, smarter.
Periodic festivals. Tribes get together and share attributes.
Run for 1,000 years. 100 turns x 10 years. “

And that’s how they go into WikidPad. Then I start fleshing them out into a fuller multi-player game.  Of course I come up with lots of ideas and few will make it into an actual game creation but its always a good idea to keep them. In the future it may yet become a game…

And how was the book? Very good.

Geomorphing for the masses

Geomorphing for the masses

Geomorphic village by davesmapper.comThis is very clever. The website Davesmapper.com lets you create different type of geomorphic terrain maps, whether it be dungeons, city or village or even the interior of a spaceship.  You get a choice of tile sets according to what type of terrain you’ve picked. If you are artistic, you can upload your own designs. This mixing and mashing of tile sets can lead to some very odd looking cities with each tile a different style!

The view options controls lets you change how many tiles wide and high your map is, but watch out, the tiles are quite big so go above say 16 x 16 and you start to generate maps that are too big to export.  The village at the top of the post was 2100 x 2100 pixels when exported.

The terrain maps generated are very nice. If you think these look a bit rough, it’s probably my fault. To speed up this website all images are both shrunk to typically 350-450 pixels wide and compressed and some images are possibly not quite as nice looking as their uncompressed originals.

This city below shows you the type of thing with two greenish tiles and a bluish one. You can untick the tile sets that you don’t want.

Geomorphic city from davesmapper.com

Geomorphic means it’s made of tiles that are almost always square and they fit together so that doors or passageways always join up.

Back in my D & D (Dungeons and Dragons, not drunk and disorderly!) dungeon mastering days (about 1979) I use to have a set of physical geomorph tiles. They were great but sadly lost along with my D & D toolbox that had all my figures.

There are some computer games where you might use geomorphic graphics; perhaps a procedurally-generated dungeon crawler.

What is the best way to include text?

What is the best way to include text?

Words
Image by Free-Photos from Pixabay

One of the games I’m working on needs to include a 1.9 MB text file (200,000 words). Now it’s not that big a deal but using 7zip I can compress it down to 400 KB and that’s 20% of the uncompressed size. So I’m thinking of including some C# code to decompress it.

But I did wonder if there was any kind of built in decompression, so you could add it to say Resources and have it decompressed automatically when read. I haven’t seen anything like that but it would be cool if if existed.

 

Ideas for multi-player games

Ideas for multi-player games

Simple word game
Image by brainygames from Pixabay

One side-project I’m working on that uses the MonoGame library involves creating a bunch of simple multi-player games. I’ve started with that Poker game (Top Banana or Manana Banana as I’ve called it) and the next one will likely be a variation of the game Boggle but not called that and not based on a 4 x 4 grid as Boggle is. I’m not daft!

The danger with doing this and just copying existing commercial games is you might get sued or a nasty cease and desist letter/email come your way if you infringe someones copyright or (far far worse!) their trademark. If you have a bit of money, you might be able to license the game from the original designer/creator but that’s probably not at all cheap. Games like Fluxx, Acquire, Settlers of Catan and Ticket-to-Ride are favourites but not something I shall be doing until and unless I can afford to license them.

Some games like card games are in the public domain and I’ve no qualms about producing my own version. Scheduled in after It’s-Not-Boggle is one based on 3-card Brag which is very easy to play and quite fun. I’m also trying to come up with an idea based on word Searching or Sudoku but as those are primarily solo-play games and not quite so easy to do multi-player.

But I’m sure there are multi-player games, i.e. Texas Holdem Poker that are legal to create my own so if you know any I might do, add a comment!

Mobile game development progress

Mobile game development progress

Manana Banana Screenshot on AndroidDevelopment continues with the first game, which is a card game. I know the game as Top Banana, but I think that is the name of a commercial game, so for now the working title is Manana Banana. All it does currently is display the cards and backs as you can see. No photo this time, I learnt how to take snapshots on the phone (Hold down the power and Lower volume buttons at the same time) As it’s plugged in to my PC,. copying it across was not difficult.

This uses my virtual screen technology working on an 800 x 1400 virtual screen then scaling output onto the real screen which in this case on the Alps X27 Plus is 480 wide by 960 deep. As you can see I have a black rectangle at the top and the Android controls are visible at the bottom, neither of which I programmed for. I’ll get those fixed.

You play this game by clicking on the six top cards one-by-one and then tap the back of the card where you want to play that top card. So you end up with three poker hands. In this case I’d put the 7 and 9 on the top row for one pair, the two fives on the 2nd row also for a apir and the King and Jack for an Ace-high straight on the bottom row. The gap on the right will show the text of the hand so will say Pair, Pair and Ace Straight or something like that.

Next thing is making the cards clickable. That is the top six cards and the the three sets of two backs below. Once that’s done I’ll make that bit work then plug in the Jessie Chunn’s poker hand evaluation code to figure out what each hand of five cards is and more importantly give it a numeric score.

The gradient that covers the screen came from Unsplash.com.