Background shifting and Parallax scrolling

Hey there,
I’ve been working on the Background module in Skywalk : I added the ability of background shifting ( movement), and parallax scrolling.
Parallax scrolling for those who do not know about it, is the movement of layers from the background at different speeds, due to their distance from the observer. Parallax scrolling can be seen in real life as well : for example when travelling a road, you notice that its sidewalks and asphalt ground move at a higher speed than the mountains or the scenery in the background ( which move relatively slowly). I noticed that most programmers, when attempting to implement this kind of scrolling, tend to give layers different pre-defined speeds, this did not seem proper to me, I wanted to give each layer a height from the ship, and let the game engine automatically calculate the speed of the layer based on the speed of the ship. So I came up with the following formula ( I used Thalés theorem to retrieve it ) :

layerScrollingSpeed = (((maxHeight – heightFromShip) / maxLayerLevels) * shipScrollingSpeed)

Where maxHeight is a constant defining possible usable layer levels, meaning that heightFromShip must range from 0 ( layerScrollingSpeed == shipScrollingSpeed) to maxHeight ( layerScrollingSpeed == 0), this can be verified in the formula above by giving heightFromShip the value maxLayerLevels and then 0. Think of it as the height at which the layer will be so distant that it will seem like not moving.
So the game in its actual state looks like that :

Hope you like it !

Actual lines of code : 4112


Skywalk’s artist : Otman Elkantaoui

Hello everyone,
I’ll start by talking about changes that occured in the game : I have added audio support to the gameplay, now it seems much more alive and responsive. I also exploited the utility of the Identity Maker by designing some new enemies’ paths. I programmed a new enemy’s behaviour, the Aimed Rushed enemy : unlike the normal Rushed enemy, this one can rush into the player at any direction ( the normal Rushed only rushes if the player is in front of the enemy). Here’s a video featuring the new version of the game :

Well, as you can see, no ‘major’ changes have been applied to the game, but let me tell you that the best thing ever since I started the development has happened : I recruited a new member to the development team. His name is Otman Elkantaoui (, and he’s a damn skillful artist, we live in the same town, and I’m so relieved I got engaged with someone having this much talent in art, I can finally focus on the design and programming of the game, and leave any visual-related aspects of the game to Otman. Here’s a concept art he did for Amalay’s ( the protagonist) ship :
Amalay's ship for Skywalk

The Identity Maker

Hey there !
Came up with an interesting feature during this week of holidays. I finally created the Identity Maker, which is a a software that enables making and editing Identities. This means that creating identities from a text file is no longer needed, the software I made provides a graphical way to do it, it can be considered as an enemy ‘editor’. Again, the identity do not specify the behaviour of the enemy, but rather how it moves and how it looks like. Behaviours are hard coded in the game engine, and as for now I can’t think of any other way without complicating things.
Well, the software itself do not add something new to the game, however, what’s interesting is what the Identity Maker can provide in the future ( when I will be sitting designing enemies and levels), that’s where the software will feature its utility. Here’s a screenshot :

Identity Maker v1.0

( the size of the window is 1280×680)
The editor basically consists of the following :

  • The Grid :
    A 2D space that simulates the game window: the inner green rectangle represents the game window ( which is natively 300×300 pixel size ( without scaling)), the other remaining space around is off-screen space, which also usable ( theoritically infinte size). The user can create dispalcement targets using the left mouse button, delete them using the right button, and select them using the middle one.
  • Some options related to the Grid :
    Show DT Indices : show the indices of each displacement target
    Show DTs : show the visual representation of a displacement target on the Grid ( usually circles, as shown in the screenshot)
    Show Links : show lines linking the whole movement pattern
    Show Enemy Preview : generates an enemy based on the inputted properties and show it in the Grid ( as a preview of how enemies with the created Identity will move and look like)
  • Settings of a single dispalcement target :
    The position of the displacement target
    The speed at the displacement target
    isFireSpot ( boolean) : whether the enemy has to shoot at that displacement target ( the displacement target where this boolean is true gets an orange ‘F’ letter in its representation on the Grid ( as shown in the screenshot))
    isDeletionSpot ( boolean) : the enemy disappears upon reaching this displacement target ( the enemy fulfilled his duty and is now ready to retreat !). I always specify the deletion spot outside of the window ( in the off-screen space) so that the player do not notice the enemy’s disappearance ( in the Grid, it’s represented as a square with a blue ‘E’ letter ( stands for End))
    isRelative ( boolean) : nothing exciting here, it’s related to the game engine…
  • Main properties of the enemy :
    The enemy’s spritesheet filepath
    Its health
    How much damage does he inflict.
  • Save Button :
    Save the identity in the hard disk under the specified name. We can then copy the file in the Assets directory of the game, and load an enemy with that identity, et voilà, the enemy now uses the identity we created.

There’s a bunch of other things I still want to add in the Identity Maker, but I’ll leave it as it is for now. I’m satisfied with the result done so far, so I’ll move to other parts of the game engine, probably the Command List editor ( will enable making levels…)
I’ve already prepared a load of enemies’ behaviours designs on paper, so as soon as I finish off with fundamental game engine utilities ( looking at you Command List editor), I will head towards the game content, and will eventually start making the Skywalk I see in my mind.

What’s new

Hello everyone, I figured out that releasing an update each time I add a new feature is rather hard, and on top of that spoils the game feel. Instead, I will add posts on the blog featuring Skywalk’s progress, and will upload the up-to-date release whenever I feel like it’s time to. So here’s what I’ve been working on the past weeks :

Enemies’ Identities :

Identities are data files containing information about the enemy, such as its health, damage per hit, damage at contact, movement pattern, and the file path of its texture.
Enemies’ behaviours and AIs, however, are hard coded in the Game Engine, not in the Identity File. It means that the Identity file do not specify the nature of the enemy, but rather how it moves and how it looks like.
A single Identity can be assigned to multiple enemies with different or similar behaviours, this will result in enemies that look the same and move according to the same pattern.

Identities were already implemented in the game engine, the new feature I added however, is the ability to write an Identity in the form of a text file, and feed it to the game engine. I’ve set up this functionnality in order to separate the game engine from the game content, that means if I wanted for example to implement a new enemy in the game, I wouldn’t have to hard code its movement and such in the game engine and compile it all over again.

Movement Pattern Smoothing :
Smoothing Algorithm
The movement pattern is an array of positions used by the enemy as targets in its movement. It is fed to the enemy by the mean of its Identity at the creation. It also contains speed at each position and whether the enemy has to fire or to disappear at a position, and other properties.

What I’ve newly added however is an algorithm that makes the movement pattern smoother, it takes all the positions and generates new derived ones that represent a smoother version of the movement pattern.
This was done in order to minimize the work I will have to do when creating enemies. I will only need to specify a small amount of positions that represent the global movement of the enemy, the smoothing algorithm will then work on those positions to make the enemy move more smoothly.

The smoothing algorithm I made uses the concept of recursion, where the deeper the recursion, the more accurate the curve gets.

Dash Visual Effect :

The visual representation of Dashing in previous versions was rather dull, and didn’t represent a speed power-up at all. So I implemented a classic visual effect of Dashing, which is a set of silhouettes, used by many games such as Megaman ( both X and Zero), Boktai, Hyper Light Drifter, Castlevania ( backward dashing), Metroid ( Speed-up):
Hyper Light Drifet Dashing Megaman Zero Dashing Megaman Zero Dashing 2

So here’s how it looks now ( Click on the image):
Skywalk Dashing

The Rushed Enemy :

I programmed a new enemy behaviour, in order to evaluate the polymorphic nature of the game engine, that is, the ability to add and support multiple enemies’ behaviours. So here’s the Rushed Enemy, I’ll let the GIF screencapture below describe its behaviour :
Rushed Enemy

Clean and Bug-free :

The game engine finally works properly with no bugs submitted so far, what a relief !
The Collision detection code works properly, and the enemies, the player, and the bullets get managed the right way ( creation -> update -> drawing -> deletion). I recently had run-time issues related to accessing out of program’s memory range. It took me like a week to find and solve the problem ( as it turned out, that was more than a single problem).

I will be working Inchaalah on more features, including a Command List module that will enable level creation   ( similar to a script), more enemies behaviours, camera module ( background shifting…), an Identity Maker ( sofware that enables making and editing Identities), and more.
Hope you’re as excited as I am !  Sayonara !

Second Release

Overview 1 Overview 2

Hello everyone,
I came up with a new release of my upcoming video game Skywalk.
This time I added these few things :

  • Enemy’s firing ability.
  • Enemy’s displacement according to a predefined movement pattern.
  • Collision Detection between the player’s bullets and the enemy’s body.
  • Collision Detection between the enemy’s bullets and the player’s body.
  • Collision Detection between the player’s body and the enemy’s body.
  • Some basic scripting through a class ( will be converted later to a text file) : loading the player, backgrounds and enemies.
  • Basic visual effects such as bullets impact, sprites highlighting, and random inaccurate firing.

I will try to implement in the next release one of the most fundamental gameplay mechanics in Skywalk besides Firing and Dashing : the Shield and Counter-attack functionnality.

Code Statistics :
(even though I don’t appreciate the Lines of code as a way to ‘measure’ projects, I find it sometimes helpful to determine projects complexity and progress, so here it is)

Actual lines of code : 2313
Added lines of code since previous release : 924

But as it is said :
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
-Bill Gates


First release

First Release ScreenshotHere’s a minimal version of the game, this is not even a prototype, since the player mechanics are still not complete, collision detection and health management aren’t done yet, enemies are still dumb since all I taught them to do is moving according to predefined path ( lack of firing AI and stuff) …
The design document describes the game as a more flourishing game, so please consider the following an insight on what I’ve been doing the previous week, not how the game will look like in the future.

-If a message similar to “MSVCRxxxx.dll is missing”, try to download and install the Visual C++ Reditributable from this link :
-If a message similar to “xxxx.png is corrupted or doesn’t exist in the Assets directory”, then make sure you didn’t make changes to the Assets files, including their names. (Background.png – Bullet.png – Player.png – Enemy.png – FireBurst SpriteSheet.png – Porsche 911.ttf)

Controls :
Arrow keys : Movement
F               : Fire
D               : Dash