Blog Archive 2014
[Game Dev] Hello teacher tell me what's my lesson?
Tuesday, December 30, 23:23
A line from the old Tears for fears song "Mad world" fits well - I finished most of the tutorial code!
But first the other important info: saving and loading the game state is working fine. After finishing the loading part I started working on the tutorials.
The following requirements were to be met:
- I wanted an arbitrary list of tutorials, easily modifiable and extendable.
- Tutorials should be kind of scripted.
- They should run using the "normal" game engine.
After rereading it several times I had an idea how to implement it using GameMaker:Studio.
- The tutorials are JSON encoded files which are added to the project as "Included files". This way they can be read using standard file functions and are added to every deployment on every platform I'll create an executable for.
- I have a script to read and decode such files and use the included ds_maps and ds_lists to create the necessary GM objects to store the required data.
- Each tutorial has a Setup part and an Instructions part.
- The Setup part is used to describe the tutorial level with all its required game elements and the proper player settings. It is read by a separate script which simply creates the game elements. After reading the Setup part the level is ready to be played.
- The Instructions part is read afterwards and initially creates one Instructions object which contains the underlying ds_maps and ds_lists so that they can be destroyed easily at the end of this tutorial level.
- Each Instructions object also contains an arbitrary number of nodes in a fixed sequence (an array).
- Nodes can have different types (Info, Click), contain a text and a game map target coordinate and a list of highlightable coordinates.
- Nodes must be completed before the tutorial continues with the next one.
- An Info node just displays a dialog with it's text and waits for the dialog to close, the Click node waits until the player reached the game map target coordinates with his ships and is then completed.
- The Instructions object checks every step if the current active node is completed. This happens by calling a script. The script calls other scripts (depending on the node type) and those scripts know the completion condition of their node type.
- If the current node is not completed, nothing happens.
- If the current node is completed, the next node will be activated (the text is displayed in a dialog, target coordinates are stored and all highlightable coordinates will be used to color some game map tiles which are important for the text or the tutorial progress).
- The tutorial is finished when the last node is completed.
Below I've added an example script for a tutorial level.
There are still some missing parts (the "Next scenario" screen must know how to deal with tutorial levels), but I'll fix that over the next few days.
That's it for now, a happy new year to all of you!
"text": "Welcome, Captain, to our training center!#Here we will teach you how to control your ship#and how to defend the aliens attacking us!"
"text": "Click on the tile below your space ship",
"highlight": [ [ 5, 1 ] ]
"text": "There is a satellite on this tile!#This means a planet is close.#Planets are always surrounded by#satellites!#Now click on the tile below the satellite",
"highlight": [ [ 5 ,2 ] ]
"text": "Planets can be searched. Very often they hide credits (money)#or bonusses that help you with your mission!#Click again until you've completely searched the planet",
"highlight": [ [ 5 ,2 ] ]
"text": "Aliens attack our sectors through vortexes!#Find your way to the highlighted vortex!",
"highlight": [ [ 0, 4 ] ]
"text": "You've discovered the vortex.#The aliens will attack the closest planet#from a vortex first.#Use your remaining moves to collect#followers and prepare for the battle!"
[Game Dev] Loading, loading...
Saturday, December 20, 19:30
Another long time passed but I wasn't sleeping all the time!
As usual family and job required their time and game dev time was minimal. But still I got some things done:
- The new laptop is properly setup. I'm back to game dev mode again.
- Saving the game at any time is working. Game state is written to a local file using JSON encoding.
- Loading the game is almost done - as you can see in the GIF below this topic. Just some minor things I have forgotten to initialize properly cause some little hicups. Those will surely be fixed during my christmas holidays!
- Some UI changes happened. I use borders around text to make it more readable.
- Planets now have a progress bar to visualize how many turns it takes to the next population growth.
- The Laboratory has a colored progress bar too. When it's full you'll receive a bonus for the current research area (attack, defense, population growth).
- Thanks to beta tester Benedikt I fixed some bugs and a glitch that made the game way too easy - thanks for that valuable input, Bene!
- The asset is done but I'm still waiting for my VAT id to create a developer account on the YoYo Games Marketplace and sell it...
[Game Dev] Do I get anything done?
Sometimes I really wonder how struggling life can be...
For several weeks I've been working on an asset for the YoYo Games Marketplace now. It's a part of my work in progress game They Come and could be helpful to other game developers using GameMaker:Studio.
When I reached the point where I thought "Hey, it's almost done" I wanted to create a developer account on the marketplace. But that requires a VAT number which I need to register here in Germany. First stop. Then I came up with two ideas that should go into the asset before I release it. Second stop. And finally, at the beginning of this week, my laptop died. Completely. Doesn't boot anymore and I can't access the hard drives. So I needed to get a new one. And start setting everything up again. Of course my backup on my external hard drive is two weeks old. Third stop. All my recent changes are gone.
Now I'm sitting here, procrastinating and trying to avoid to recode everything I did the last weeks. That's the reason I'm typing this. Doesn't help. Need to get back to GM:S and finish this ******* asset.
And get the VAT number. And register a developer account afterwards. Sigh.
Okay, let's start now!
[Game Dev] Another Ludum Dare ahead!
Tuesday, August 19, 20:45
This weekend it's Ludum Dare again. I'm considering giving it another try!
Just like the last time I have some real life obstacles. My wife is visiting friends over the weekend so it's just me and the two boys.
This could be "easy going" if I decide to ignore my role as a caretaking dad providing healthy, regular meals, play with them or do some real life event. And you know what? Ignoring all this responsibility, declaring a fast food, TV, PC and console weekend and get coding a game is soooo tempting ;-)
In the end I'll guess we'll end up with a good mix of good and bad and I'll try to create a simple but fun game in between.
Wish me luck!
[Game Dev] In the meantime...
Wednesday, August 13, 22:00
Are you still there? I am but infact I was gone for quite a while obviously. Nearly 3 months without any update - this hasn't happened for the last 5 years I think (I could look up the archives but meh!).
Stress load at work was hard, I didn't manage to work on They Come and update the website at the same time. So game work came first. Then it was about time for our much needed summer vacation. Enjoying the marvelous weather here in the northern part of Germany was great - the first "real" summer for years. Unfortunately it is already over and work has got me back.
What about game dev, you ask? Okay, let's have some facts:
- Updated to uiWidgets lib 1.4 (as usual that worked like a charm!),
- fixed the achievement controller,
- added screenshakes for exploding planets and the ultimate weapon of the player's ship,
- added nebula backgrounds (using huge prerendered space backgrounds and a random offset position),
- added game won screen and game won conditions,
- added game lost screen and game lost conditions,
- added start screen with different settings (game difficulty, game type, game length),
- modified credits, achievements and highscore screens,
- started work on saving the gamestate,
- fixed game controller handling to match GM:S 1.3 changes.
That's quite a lot if you consider real life and vacation in between!
After finishing saving and loading gamestates I'll start to implement the tutorial. As this is a rather complex strategy game the tutorial is required to get you started.
That's pretty much it for now, so I hope to come back with another update in the next few weeks and not months ;-)
[Game Dev] YoYoGames' Marketplace
Wednesday, August 13, 22:00
Once in a while YoYo Games do release some early access version of GameMaker:Studio. The latest EA version contained the first implementation of a Marketplace!
That was one of my favorite additions I felt was mandatory for GameMaker:Studio to attract a bigger audience and to provide game developers with some (semi) professional resources (code, art and sfx/music).
Even in it's early alpha state a bunch of artists and coders released their first assets and most of them are of high quality! I am pretty happy with what I've found and already purchased quite some assets (mainly code for graphical effects, lighting engines, shaders and such, but also some PHP/SQL online highscore solution!).
Most of these assets come with very good samples and/or documentation and they should help me to improve my games a lot!
Today was the release of the 1.4 beta version of GameMaker:Studio which means the Marketplace is available for every GM:S owner! Great times ahead!
If I find the time I want to sell my own assets, I have at least one idea for a good asset that's not available on the Marketplace yet. We'll see!
[Game Dev] Ludum Dare results are in!
Ludum Dare result are in - so what were my results for Holy Moly?
- Coolness 59%
- #366 Theme 3.47
- #469 Humor 2.55
- #487 Fun 3.09
- #753 Overall 2.97
- #843 Audio 2.16
- #858 Innovation 2.65
- #942 Mood 2.55
- #981 Graphics 2.50
This is not too bad for a first timer. A good middle place in the compo entries.
I'm a bit proud of my rankings for theme, humor and fun. And I'm aware that my graphics were not really good. So the bad ranking is okay there.
This is a good motivation to give it another go (maybe in August) and try to achieve a better result ;-)
My biggest result was finishing a playable game anyway. So even before the rating was over (or started) I had already won the competition from a personal point of view!
[Game Dev] What's up now?
Sunday, May 18, 21:30
There are different things I started or continued in the days after Ludum Dare 29.
First I needed a little break - I realized that such a coding weekend consumes a lot of energy and my game dev mojo was pretty exhausted.
An update of Holy Moly is to be expected. Several ideas jumped through my mind and fought for the pole position...
Finally I came up with the following decisions:
- change overall resolution to at least 640x480 or 960x640 and drop the low resolution approach (currently 320x240)
- switch from pixel art to vector graphics to get a more cartoony graphics style
- learn Inkscape by following the tutorials from 2D game art for programmers
- make it an Android game with virtual keys (a touch area to guide the mole)
- maybe make it a two player version for the Ouya
- add some more gizmos and make the rats smart ;-)
- add the music loops I bought last week
And that's where I am right now. And of course I might jump back and forth between Holy Moly and They Come...
[Game Dev] Ludum Dare 29 post mortem
Sunday, May 18, 21:30
I posted a short post mortem on the Ludum Dare website and I thought I should also place it here.
So this was my first Ludum Dare and here’s a short review of it:
What went right?
- First I managed to finish LD with a working, playable game! That’s already my first success. I wasn’t sure if I was able to create something worth uploading. I knew I had some family appointments and being a dad and a husband is always a guarantee for unexpected daily issues :-)
- Choosing GameMaker:Studio as my weapon of choice. I’m learning and using it for some months now so I was pretty confident what I could do with it and what not. For “Holy Moly” it was a very good choice.
- Trying out a 320×240 resolution in a 640×480 window. I always wanted to give that a try – learning the basics to create a low res game on a bigger resolution window and get it scaling. Again GM:S did the job perfectly fine here.
- Try to avoid feature creep. I was constantly tempted to add more game play elements but I resisted knowing that it wouldn’t help me to deliver something playable. I will work on my game in the future and add some ideas that popped up during the development time (fine tuning of the timers for rats and water, smarter rats, drills that can kill the mole, dynamite, rocks as obstacles that can smash you if you dig below them, more different food items).
- Choosing HTML5 for deployment. I think it’s very important for play testers to ease the access to the game. And a game playable in a browser without plugins to install or even a downloadable zip is the best way. Uploading to my webspace and integrating into my website was easy.
What went wrong?
- Graphics. I do suck at graphics or I simply don’t have enough experience in creating them. I want to improve my knowledge here. So I will try to do some exercises / tutorials for pixel art and vector art. I used the builtin graphics editor of GameMaker and TileStudio for the ground tiles. I didn’t have enough time to give PyxelEdit and AutoTileGen a try.
- One more graphics related issue: graphics style. I couldn’t decide what to use: pixel style or vector graphics. Because I wanted to experiment with the low resolution approach I went for the pixel style but as you can see in the game I’m not very good at it. Neither are my vector skills but anyway ;-)
- Music: it’s missing. I still haven’t found a good tool for me to create simple loops that sound “okay”. I considered Magix Music Maker Jam on my tablet but that isn’t able to create chip tune music which would have fit the game style. And for trackers I do have zero experience using them. And there are so many trackers where I don’t get the user interface…any recommendations are highly appreciated here!
- Sound effects: I used bfxr and Audacity but I’m not totally happy with the sound. Again I miss some theory here to know how to modify the generated sounds to my liking. For example I had a perfect sound that I wanted to last longer or to sound a bit darker and so on.
It was tiring, exhausting, disappointing at some moments but overall it was fun, energizing, highly motivating and a personal big success for me. I will join other Ludum Dares because I did get so much positive experience from it in such a short time span – and it didn’t cost me a single dime ;-)
I am aware now that I need to have a good knowledge of all tools that I plan to use during a 48h compo – it is simply a complete waste of time trying to learn a new tool in those 48 hours and expecting satisfying results on a first go…
And finally I’m totally impressed by some other entries: unbelievable what some of you guys and girls can achieve in 2 days! You are marvelous!
[Game Dev] I'm finished with Ludum Dare!
Sunday, April 27, 20:00
Whoa, what a weekend. Haven't coded that much in one go for a long time...and now I'm exhausted, tired and nearly brain dead ;-)
But I finished my entry and have just uploaded the final version and the source code and call it done.
There's no game music (sorry, Chris, I'm not that good yet) but the rest is pretty okay.
It's some 8 bit style retro game where you guide a little mole in search for worms. If you have found and eaten all worms you'll get to the next level / garden.
Every now and then you'll need fresh air and thus have to dig upwards. But be careful - the gardener has powerful boots! And a garden hose! And did I hear the sound of rats?
You can play the game in any HTML5 browser just over here: Holy Moly
Have fun, I surely did while creating it! And don't forget: this game was created just by me (all coding, all graphics, all sounds) in around 30 hours, including sleeping, eating, cooking and so on!
[Game Dev] Ludum Dare 29 is go and I am in!
Saturday, April 26, 19:30
So finally I managed to join a Ludum Dare event. Although it's happening three times a year all those last years it was either too close to Christmas, on the Easter weekend or during our summer vacation...bah!
But this time it all fit! This is the last weekend of my Easter vacation, my wife is supporting me (thanks Mäuschen, I love you!) and the theme was one of my favorite themes ("Beneath the surface").
The playable game is available here: My Ludum Dare 29 entry
At the end of the competition you will also find the complete source code of the game. It will be a GameMaker:Studio project file in a zip. Feel free to learn from the code, just don't simply copy/paste most of it and name it yours, okay? Be fair.
[Game Dev] March already gone?
Sunday, March 30, 19:15
And here is another update way too late but what to do?
Real life can be such a time killer...
...on the other hand: I do have a real life which is great. So I'll stop moaning and complaining and simply tell you what I've done game development wise over the last 7 weeks or so.
- Gamepads on Ouya (and Windows) are working perfectly now - what else to expect, hm? After some fiddling and tweaking everything fell into place and the game reacts on gamepad button clicks and you can control the cursor with the d-pad or the analog stick of your input device.
- Changed the UI font. This one was an easy change with huge effect. All buttons look much better now and the ingame HUD offers enough space now to also display the discovered alien device parts during your game play. Way better than before. Also the info screen is much more readable now and doesn't look so overwhelming.
- As already mentioned I revamped the HUD on the main game screen.
- Achievements are getting somewhere. I am currently coding the info boxes that will appear on screen when you achieved another goal - nice.
- The battle code changed a bit too. Fleets no longer move and merge to support other fleets after the first alien fleet has been destroyed. This behavior made the game too easy. Now you have to split up your fleets wisely before the aliens attack because they will stay at the planet you assigned to them!
- As usual bug fixes. Yep, it's true, even my code is not error free. But of course I'll fix a bug whenever it pops up and the final game will hopefully be nearly error free ;-)
[Game Dev] Slow progress - again...
Sunday, February 9, 17:00
Sigh, another four weeks without any progress update - that's not good...
Real life in January kept me pretty busy and I only made tiny improvements on They Come.
Here comes the list of things I've worked on:
- Fixed depth of attack path markers, now they are drawn above planets.
- Improved the position of the fleet size number, also the way destroyed ships are decreased from the fleet size number.
- Worked on gamepad controller. It's working perfectly now on Windows but unfortunately not yet on the Ouya. Using gamepad buttons to simulate mouse clicks is working correctly but the GameMaker function to position the mouse at a specified place on screen does not seem to work. I will file a bug if the developers confirm that it should work on the Ouya.
- Added particle smoke to destroyed planets. Just some eye candy ;-)
- Modified behavior of popup text. The text keeps its position for a second after creation and then starts to float upwards and become invisible.
- Added sound to lasers and ship explosions and planet explosions. The tricky part was to limit the amount of sounds playing simultaneously to avoid noise crescendo.
- Increased the delay after the battle is finished and before the game moves to the scenario overview screen.
Some new screenshots for your pleasure below.
[Game Dev] What did you achieve?
Saturday, January 4, 21:30
Indeed, I achieved achievements for They Come and much more!
Some hours of my christmas vacation were spent for the following tasks:
- Achievements added with bronze, silver, gold values, descriptions, icons, etc.
- Loading from file, saving to file and automatically adding new achievements is in.
- Also added a room for the list of achievements with a first prototype of the advanced ui list.
- Game options loading and saving is in (like volume, fullscreen, etc).
- Implementation of GamepadController started. Resolution independent, supporting Joysticks and Gamepads. This is required for an Ouya release. Currently guiding the Mouse using the gamepad is in, triggering Mouse buttons via gamepad buttons is missing yet. So the GamepadController simply uses gamepad input to control the mouse. This is sufficient to make the game playable on the Ouya.
I hope I can create and upload some video in the next days to show the improvements.
[Real life] Belated merry christmas, happy new year and so on...
Saturday, January 4, 21:00
I'm sorry for being too late but as usual Christmas time was pretty busy with family stuff (what else?) and so I didn't update my website.
This christmas was pretty cool cause me and my son bought us a new TV set and an OUYA console. A perfect present for a Dad and his son!
There are many cool games available and we even got a 10 Euro voucher to spend for our first games from Amazon! On new year's eve the second controller arrived which I ordered from Amazon UK because Amazon Germany doesn't offer single Ouya controllers yet.
I still need to test my controller with my Laptop - it should work via Bluetooth.
New year's eve went pretty smooth, nice fireworks in our street and I was in bed at 3:00 AM.
So to all of you a happy new year, lots of health, fun and adventures!
Before I forget: one new year's resolution was to finish They Come this year and earn a few bucks with it! Stay tuned and of course buy it when it's available!