Creation of a Video Game with No Knowledge: Ground Pound and Enemy Ants

enemyai
Share Button

I’ve been quietly – aside from a few tweets on the Twitter – working away on this game, but wanted to wait until I had something more significant to show. I’ve been able to accomplish a few small things up to this point, and just as my confidence level started to dip, I buckled down, did some reading, and learned how to program two things that this game needed: a ground pound move, and enemies.

First up, I started working on a ground pound move. As of now, it isn’t 100% finished, but it is in a working state. With Construct 2, I was able to program a series of events – which are not as tidy as the enemy AI you’ll see in just a bit – that will let gamers press the down key to perform a ground pound move. Basically, what I did was set the max fall speed to 1500 and set its Y position at 650. This forces the player downwards at a fast pace whenever the down key is pressed. Not as fancy as Mario’s butt stomp, but it does the trick during this early stage; you’ll see how it looks in the demonstration video below.

construct2_boxes

Another thing I wanted to achieve was a box that can be used as a platform, but also smashed into pieces when the ground pound move is used. I had to create an instance variable to achieve this effect – I’m almost positive there is a better, less buggy way to do this – that tells the game when it is appropriate to smash the boxes, and when they can be walked on. This ground pound (stomp) move opens up some cool level design possibilities, plus I have always had fun stomping stuff in other games, but it also proves that I may actually be able to do something cool with Construct 2.

Of course, the other focus of this article will be about enemy AI. First thing I had to do was create an enemy, and what better enemy than an ant? Staying true to my character’s backstory, I added ant enemies because he likes to stomp insects for fun.

enemyai

I struggled for hours with enemy AI and was only able to achieve one of two desired effects at any given time. There would be times when I could stomp and defeat the enemy, while other times the enemy could only kill me, I could never get both to work smoothly. That’s when I did some research – this part wouldn’t be at all possible without this awesome, informative article – and programmed some basic moving ants that satisfy both of my desired conditions. One thing that I added on my own was a bouncing effect that you see in some platform games. This effect can be used to reach secrets, or maybe to cross large gaps.

There’s still a bunch to do like create animations for the boxes and enemies after they’ve been stomped, some kind of health system for the player, plus other juicy effects to make the game look, and feel more like an actual game. I wanted to show off some of the things I’ve been able to accomplish thus far, hence the reason for this article and video during this phase of the game.

Once again, my confidence has increased immensely and I can start to see the game taking shape in my mind. It won’t be the next Super Mario Bros., but it may prove to be entertaining once/if it’s ever finished.

Keep Reading

1. Blogging the Creation of a Video Game with No Knowledge

2. Genre Selection and Character Creation

3. Basic Player Movement

4. Adding Coins

Mail Bag

Ask questions in the comments below and they will be answered in the next article.

Related Posts Plugin for WordPress, Blogger...