Video Game Hints

Oh dear! I haven’t done a blog post in ages. I’m going to try to do one at the start of each month, but I feel like I’ve said something similar to that before and not really succeeded.

Anyway, in my video game that I’m programming, (called No Anglerfish, which I’ve already talked a bit about in this post) there are Sokoban type puzzles that you must solve to progress. Unfortunately it’s impossible to design a puzzle that is the same difficulty for everyone. One player might see where the “soko blocks” need to be moved right away and solve it in two minutes, another player might take ten minutes or twenty minutes or even give up entirely : (

So that’s why I decided to add hints for the puzzles. If a player is stuck on one puzzle for more than about five minutes, text will appear at the bottom of the screen saying “Press H for hint”.

Then if the player did press H it would display what they needed to press to solve the puzzle. But this was NOT a good system. First off, the hint would just be displayed as a long list of directions that the player needed to press (for example: ↓↓→→→→↑↓←←←←←↓↓↓↓↓→→↑↑↑↑↑). Second, the “hint” would be covering up the puzzle so you couldn’t solve it while looking at the hint – you had to write down the hint and then close the hint screen and then solve the puzzle. This was meant to discourage people from using the hint too often. And the third reason why this wasn’t great is that the “hints” just tell you exactly what to do! They weren’t even hints, just instructions on what to do to solve the puzzle. I don’t know but I suspect that if a player is having trouble understanding what a new puzzle mechanic does, telling them exactly what to press to solve it might not actually teach them very well how the mechanics work. In short, thumbs down to hint version 1.0.

Now after I decided to reprogramme the hint system, I had to find a better way to guide players into solving a puzzle if they were stuck (and I wanted it to be something that didn’t require me to reprogramme massive chunks of code to get it to work). I think it was my Mother’s idea to show the player an image of the puzzle almost solved if they asked for a hint. That idea was what I decided to use! Now in the new and improved hint system version 2.0, after about five minutes of being stuck on a puzzle the game will say that you can have a hint if you want it and if the player does request a hint it will show them a dark image of where the blocks need to be before the puzzle can be solved – or sometimes an image showing how a new mechanic works or anything that can guide them to the solution without making it too obvious.

Hopefully that helps them realise the trick to solving the puzzle and the player can close the hint and then win the puzzle.

And that’s the end of the post.

IBM 604

Recently I have been taking a course at Virtual High School about computers and one of the assignments was to write about an old computer from the 1940’s or 1950’s.

I decided to write about the IBM 604 Electronic Calculating Punch and here is what I wrote:

———————————————————————————————————————-

The IBM 604 ECP (International Business Machines 604 Electronic Calculating Punch) was introduced by IBM in 1948. Some parts of it were based off of the IBM 603 Electronic Multiplier which was announced in 1946 but few were made.


The IBM 604 ECP could be fed data through punch cards, perform computation such as addition, subtraction, multiplication, and division to the data, and output the results by punching them onto the same card using a type 521 card reader and punch. However, in order to change the programme and computations to be perfomed, the machine’s plugboard had to be opened and the wires had to be moved.


5000 of them where made each of which had 1250 vacuum tubes, ran at 50 kHz, and could run up to 40 programme steps (This was later upgraded to 60). They were about 2m x 2m x 1m and weighted about 640 kilos. According to a newspaper (The ‘Volkskrant’) an IBM 604 ECP was used at the Dutch Tax Authority at some time in 1956.
Later, in 1954 an all transistor version of the IBM 604 ECP was built. It used 2000 transistors but only took 5% of the power and was half the size.


Below is a diagramme of the control panel:


You can still find an IBM 604 Electronic Calculating Punch at the University of Amsterdam Computer Museum and at the American Computer Museum in Montana.

[columbia.edu/cu/computinghistory/604-board.html]
[en.wikipedia.org/wiki/IBM_604]
[en.wikipedia.org/wiki/IBM_603]
[ub.fnwi.uva.nl/computermuseum/604.html]

Modules in Python

When I programmed Factory512 all of the code was in one long file (1897 lines in fact) which meant that it took a while to scroll through. When I started my next game I did the same but by the time it was over 3000 lines I started to wonder if there was was a better way to deal with lots of code. Daddy looked it up and told me about modules. Modules allow you to have code in separate files that all run together. You just have to import the module at the start of the larger programme and then you can treat it like function (Except that that you must go into another file to see it). And it gets compiled too!(Compiled python runs faster) Yay!

The Post in Which I Explain The Post in Which Daddy Helps me With Arrays.

Several people have indicated that my last post was pretty technical, so let me see if I can explain it differently…

It’s like this: Imagine that Daddy and I are walking down the road. I have a notebook that I can write stuff in.

First Daddy and I walk past house number 64. Daddy tells me to “Write down the number of the house we just walked past”, so I write “…the number of the house we just walked past”.

Then we walk past house number 66 and Daddy tells me to “write down the number of the house we just walked past”, so again I write “…the number of the house we just walked past”.

THEN we walk past house number 68 and Daddy tells me again to “write down the number of the house we just walked past”, so then there’s a plot twist and I write “…the number of the house we just walked past”.

Finally we walk past house number 70 and Daddy asks what I’ve written down so I look at the notebook and see:

  • …the number of the house we just walked past.
  • …the number of the house we just walked past.
  • …the number of the house we just walked past.

so I look at the number of the house we just walked past and see that it’s 70. I say to Daddy “70 70 70” and he gets annoyed.

Now replace me with my computer and Daddy with me and that is what I was talking about in the last post.

The Post in Which Daddy Helps Me With Arrays.

I am making a grid based game where you have to move big blocks around and onto buttons and stuff like that. I also wanted the player to be able to undo their moves if they made a mistake, so I needed a big array that would remember the positions of the blocks and then if the player pressed the undo button, it would move the blocks (and the player) back to their earlier positions. However, the position of the block was also an array because some blocks could be odd shapes and I needed to store all of that information as well. So basically I had a huge array of all the information that ever was in a smaller array that was the position and shape of oddly shaped blocks.

It didn’t work.

I tried to fix it but it just made the code messier and I really couldn’t figure it out. I decided to do another, better and simpler version of it and that didn’t work ether. It seemed like while the actual position of the block moved, it would change bits of the array that saved previous positions, but it would only do it in specific spots. I figured out that it would only do it when I undid moves. I found the exact line that would change one list and for some reason the other one changed. I stared at that line for quite awhile until Daddy looked at it. He went online and found out that somehow instead of the code putting the data of the array at that time in the other array, it was REFERRING to the array of the current position. So instead of reading data of the array at the time when I wanted to go back to, the code was just looking at what the blocks current position is.

I fixed it by adding [:] to the right lines and it worked!…almost. I just had to write a bit more code and fix a few more glitches, and then it worked. The end.

I Wrote a Story.

Just before Christmas I finished writing a story called Norsar. It took a while to write it but then Daddy made it into a real book for me.

It’s inspired by The Hobbit and The Lord of The Rings.

Mama and Daddy fixed the spelling of some stuff for me, but didn’t change any words.

I drew the cover and map myself.

Click here to see it in the online store.

Blog and a Videogame.

Recently I have been working on my blog and making it look a bit better. I want to write more posts by myself and more often.

About a month ago I finished programming one of my longest videogames yet and Daddy posted it to a site called Itch.io for me. The game is called Factory 512 and I made it with Python 2. It’s the first platformer that I made with all my own code.

The hardest part was making gravity work properly and the player stop when they collide with solid objects. I made my own physics for the game because I wanted more control over it. I know that when the player jumps, they go up exactly 7 pixels on the first frame and the distance they go up decreases every frame after that (even into negatives) until they hit the ground (or they get to terminal velocity which is -14 pixels per frame). Not only does the programme check collisions every frame but it also checks in between frames to prevent a fast moving object from flying right through a wall or something (although sometimes it doesn’t bother if the player is in between tiles and has no chance of hitting anything).

At first the wires between the levers and gates were very thin but after people tested the game I realized that they needed to be thicker. Unfortunately I couldn’t make them light up when powered. Maybe next time I do something similar I’ll have interactive wires.

The game is about a robot escaping from a factory – for freedom and happiness! But it is very challenging.

Click here to go to Itch.io to download the game.

Next time I may or may not be talking about what I am programming now.

Bowling Alley Weiner

Before bowling yesterday it was lunch and we had extra time, so I decided I wanted a hot dog for lunch at Mario’s Bowl.  Gourmet!  I also won one of our games with a score over 100!  Two strikes in a row will do that for a guy!