Sunday, 31 May 2015

Moved to GitHub

Rather than FTPing everything up, I've created a github for the files on this blog, which is in the links bar on the right and here

Game #3 : Breakout (and a preview)

Game number three is also quite uninteresting. It's probably less interesting than the previous game to be honest, and I didn't really learn anything very much from doing it.

I'm off for a couple of days, so to make things interesting for my readers (note the optimism in the plural) I've also uploaded the nearly finished Game number 4, Galaxians, a screenshot of which will be on this page somewhere dependent on the vagaries of HTML.

I am quite pleased with this one and it does have some interesting features and one huge cop out that I will write about when I get back. Not now, it's a bit late. I've been out all day.

There's also a bug in it which I have only just realised, which isn't terribly terrible but I must fix. I might do this tomorrow sometime, depends :)

A free Opal Fruit to anyone who spots the bug. Two to anyone who diagnoses why it behaves like that.

Saturday, 30 May 2015

Game # 2 : MM57100 Pong

Game number 2 is a bit more advanced, not a lot but a bit. It's a simulation of this game here - an early colour Pong. (Thanks to David Winter for this pic. If you want to know anything about Pong up to the level of "completely sad geek" visit his Pong Story site, he's also French which is why it's a French box.)

Quite simple by modern standards, with anaemic colours thanks to "Never Twice the Same Colour" standards, I would think, which tends to make TV games look like someone's sprayed mud on your set.

The real thing looks like this

It's again relatively straight forward, I've sussed timers and effects, a fair chunk of the code is setting colours of various objects and also I've used the Sine behaviour for the Hockey forwards which move independently.

The only really complicated bit, and it's not that complicated, is I don't use Physics to bounce the ball off the paddle, because it doesn't work like that, the bounce angle is derived from where it hits the paddle. So that's what event 10 is doing.

An oddity is around 14,15 and 16 where I'm testing collisions against walls to make a bong noise when it hits them. My initial thought was that you'd have an OR thing here, but it doesn't seem to work, a condition seems to want only one collision.

The CapX here

Next game is Breakout. This will be the second (and last) of "make it up as you go along", i.e. not working to either a specification, or an original. This isn't perfect - things aren't quite the right sizes and colours, and the tennis bats should be in more, but it's only a little game so it doesn't really matter much.

I'm thinking of adding Tempest to the list. I actually think it can be done.  I had this trick for a system that didn't draw lines, where you had a line graphic and rotated and scaled it to make it an arbitrary line, I think it will be possible to hack this to work.  Though perhaps not to this extent below. But basically :) I'm also not sure if there's a huge amount of point doing Space Invaders if I've already done Galaxians.

Friday, 29 May 2015

Game #1 : Squash

A very gentle introduction and only five events here, didn't take very long at all.

As you can imagine, this uses the physics engine to play the game and the 8 direction (reduced to two) to move the bat.

Only real problem I had was figuring out how to reset gravity. Physics has a default gravity of 10, which of course makes the game rather odd.

I also figured out how to draw the sprite fonts. I've got a Python script which I've used to generate different bitmap fonts before (the .FNT format) so I can probably hack that to produce bitmap fonts for Construct 2.

This was just a warm up, there was no specification or anything to work with. The next game is a proper Pong game.

This is what I plan to do ; it's based on an MM57100 chip. (See David Winter's excellent but very geeky Pong site)

This was the first colour chip, but it was only used in a couple of consoles.

Most people of a certain age will remember the Pong Consoles boom that followed the release of the AY-3-8500 GI Chip, they were everywhere for a short while, and almost everyone had one. This machine had colour, but by then people were looking at more complex chip games.

Anyway, I did promise to upload it so here it is.

Hello, world\n


I am about to start learning to develop in Construct 2 for a project I am working on.  I'm a great believer in learning by doing, so I'm going to do it by writing a series of games and learning as I go, so to speak.

I thought I'd document what I was doing as I went along, and also provide uploads so that anyone who wants to can borrow or learn from what I've learnt. I won't go through it step by step but I will endeavour to comment the code reasonably and to explain things done in an unusual way, or how I solved (hopefully) difficult problems and challenges.

The cunning plan (I always have a plan) is something like as follows.

  1. Squash - a classic "bat and ball against the wall" solo game. 
  2. Pong - a proper one. I've decided to base mine on a chip called the MM57100 which had colour so I can mess with the colour effects, and so I've got a definitive target rather than just producing "a Pong Game" - reproduce *that* pong game. I think it's a good idea when developing to aim at something specific rather than an aimless idea.
  3. Breakout - a bit vague again.
  4. Galaxians - like most of this list from the 1980s. It's a shooting game a bit like Space Invaders but in colour and the aliens swoop down.
  5. Asteroids - the vector classic
  6. Jet Pac - a Sinclair Spectrum game, a sort of collect - em -up.
  7. Frogger - another arcade classic
  8. PacMan - 35 years old recently.
  9. Berzerk - a multi room game if you don't know it, you go from room to room chasing robots. A very early proto multi room RPG sort of with no R :)
  10. Robotron - another classic, a demented single screen shoot em up. 
  11. Centipede - yet another with a very odd movement behaviour.
  12. Defender - Robotron's twin, with a scrolling screen.
  13. Pitfall , who doesn't love this classic :)
  14. Lode Runner or Space Panic (games where you run about a screen of ladders digging holes)
This list is always subject to revision, of course. Some of it may not be possible at all, immediate concerns are Defender's scanner and Centipede's "wiggling down the screen" movement. Some of it I might decide is too easy, or I might just get side tracked onto doing something else.

After that I'll probably look at some other game types. Looking at C2 itself, some things are fairly easy, for example you can do a platformer and so on fairly easily, might look at a Secret of Mana type RPG as well, maybe. It's more interesting from a learning point of view to mimic the mechanics of something specific that produce something that C2 is pretty much designed for, I think anyway. Plus I'm old :)