Development Log

Written and conceived by Matt Lloyd 2018


The Young Prince - 06th of October, 2018

The Young Prince

The young prince is a game I have developed so that I can play on my tablet or on my desktop but not my mobile. It is web based and purely javascript.

I reused a lot of code from other projects for this game but also wrote about 8000 lines of code from scratch.

During development I took a series of screenshots as I progressed which show the progress of the game from its beginning to its mostly concluded complete state.

I started work on it on the 17th of September and declared it mostly done as of about the 5th of October. I had a week off work which I used heavily to code and do graphics.

All the code was written by me and all the graphics were produced by me too.

There is no sound or music which I don't see as a problem because it typically grates on the ears eventually when you use short clips that repeat.

The game idea sprang forth from my previous game which was my initial entry in a game comp about mazes. The techniques I learned in building that entry which took about two weeks of an 8 week deadline were applied here.

The game graphics in the space of two weeks progressed as follows.

First off I developed a simple map and map generator.

After this was made I added rivers and roads and water. Also wastes and other little details.

The gui was built especially for this project. The gui comes in two flavours. A standard button arrangement using predrawn images. This was my initial thoughts which changed eventually.

I wrote down notes on paper over a weekend to work out a programmable gui that can be drawn easily in code. For games like this the most basic of features are needed. Typically buttons, panels and textboxes. The method I used employed some functions for rendering gradient filled boxes and so on. It's not perfect as text rendering is different size on mobile and desktop but it works quite well mostly.

This is an example of the gui as it began. From a coded gui.

I wanted initially to have towns you could walk around in with sites you could visit and walk around in. As is often the case I reduced the scope when I realised how much work it would be. The beginning of the town interface can be seen here.

Here it is fleshed out a bit more with quest text and characters. Buildings are randomly chosen during map generation for each town from a selection.

Once I was happy with the map and town interface I began working on the caves and dungeons. Code from star scavengers was used heavily. Initially it was very plain. All that mattered was whether I could have some characters walk about a map.

Eventually I had boss monsters, magic, secret passages, different floor tiles added to the initial design.

And more...

I also hand painted the title screen. The title screen was created by thinking of what I wanted it to display and then collecting a variety of reference images and combining them in my own arrangement and drawing my own design over the top of them in layers. The same process was used for star scavengers title and backdrops.

I then late last night submitted my game to the more popular portals and am waiting now to see if it gets played.

I enjoy it on my tablet and in a spare moment. There is a save routine I built which has a sneaky feature to make mobile seem more responsive.

Because mobile processors are slow and because storage commands are synchronous I had to display a saving or loading progress screen. But the way it works the screen doesn't show properly due to timing issues with the browser and storage device. If I didn't do what I did the user would think it has crashed on mobile or frozen.

So I display a progress bar to 99 and do nothing during that step and on the 99th step I save the data and it freezes for a second on the final step instead.

Also to reduce save sizes and times I only save data that has changed.

So that is the tale of the development of the young prince.

I am likely to add more creatures when I feel like it assuming I do not get side tracked on a new project....which I've already got some fresh ideas for....

Thanks for reading my development log.