All posts by astrofra

Lua remake of an Amiga cracktro

Recently, I wanted to test the Plus wrapper of Harfang on a simple project, and I found that I could try to remake an ancient Amiga cracktro I used to enjoy back in the days.

YouTube Preview Image

Starfield!
The starfield is a simple list of 3D points on which a vector is applied each frame, transformed from 3D to 2D and displayed using 2D sprites. The 3D to 2D projection works the usual way :

x2d = (a.x * zoom) / a.z
y2d = (a.y * zoom) / a.z

There’s room for an optimization, as the whole list of sprites could be drawn as a unique batch. If more performance was needed, for several thousands of stars for example, DrawSpriteAuto() would really work faster.

Music!
The venerable ProTracker module, available on the Exotica archives, was converted to the XM format and replayed easily in Harfang, using the following instruction :

al:Stream("assets/unit5.xm")

Let’s Scroll!
The scroll text, finally, was made easy to render thanks to the Plus wrapper, by blitting each glyph to the screen. The original font was grabbed from the original cracktro using a memory snapshot from the WinUAE emulator.

Each glyph is then drawn, using :

Blit2D()

This remake is not 100% accurate as the scope of this project was more focused on using the Plus wrapper than being in competition with the most excellent Flashtro project.

Here is the Win64 release :
http://fra.planet-d.net/prods/Unit-A-Interceptor-Win64.zip

Here is the source code on Github :
https://github.com/astrofra/harfang-lua-experiments/tree/master/unit-a-interceptor-remake/src

Henry V, Act V, Scene III [What’s he that wishes so?]

William Shakespeare, 1564 – 1616

King Henry to Westmoreland

What’s he that wishes so?
My cousin Westmoreland? No my fair cousin:
If we are mark’d to die, we are enow
To do our country loss; and if to live,
The fewer men, the greater share of honor.
God’s will! I pray thee, wish not one man more.
By Jove, I am not covetous for gold,
Nor care I who doth feed upon my cost;
It yearns me not if men my garments wear;
Such outward things dwell not in my desires:
But if it be a sin to covet honor,
I am the most offending soul alive.
No, faith, my coz, wish not a man from England:
God’s peace! I would not lose so great an honor
As one man more, methinks, would share from me
For the best hope I have. O, do not wish one more!
Rather proclaim it, Westmoreland, through my host,
That he which hath no stomach to this fight,
Let him depart; his passport shall be made
And crowns for convoy put into his purse:
We would not die in that man’s company
That fears his fellowship to die with us.
This day is called the feast of Crispian:
He that outlives this day, and comes safe home
Will stand a tip-toe when the day is named,
And rouse him at the name of Crispian.
He that shall live this day, and see old age,
Will yearly on the vigil feast his neighbors,
And say ‘To-morrow is Saint Crispian:’
Then will he strip his sleeve and show his scars.
And say ‘These wounds I had on Crispin’s day.’
Old men forget: yet all shall be forgot,
But he’ll remember with advantages
What feats he did that day: then shall our names,
Familiar in his mouth as household words
Harry the king, Bedford and Exeter,
Warwick and Talbot, Salisbury and Gloucester,
Be in their flowing cups freshly remember’d.
This story shall the good man teach his son;
And Crispin Crispian shall ne’er go by,
From this day to the ending of the world,
But we in it shall be remember’d;
We few, we happy few, we band of brothers;
For he to-day that sheds his blood with me
Shall be my brother; be he ne’er so vile,
This day shall gentle his condition:
And gentlemen in England now a-bed
Shall think themselves accursed they were not here,
And hold their manhoods cheap whiles any speaks
That fought with us upon Saint Crispin’s day.

YouTube Preview Image

Amiga Memories

This blog remained silent for too long. As I’ve been rather busy lately, I’ll adopt the shortest Input/Output style for this post 🙂

Amiga

 

The recent project (purely hobbyist project, that said) that occupied me during the past weeks is centered on the old computer Commodore Amiga.

The input of the video sequence below are (basically) :

– The GameStart3D game engine.
– The MaryTTS text to speech engine.
– A few 3D models borrowed to friends or made by myself.
– The following squirrel script :

The output is the video sequence below :

 

What I did is more or less an automated talking box, some sort of “Max Headroom” inside an Amiga. This sequence is automatically generated, frame by frame.

More to come … stay tuned 🙂

Astlan on Steam/Greenlight!

Please help me to push ‘Astlan’ into the selection process of Steam/Greenlight. It needs every upvote, favorite or comment from you. The more votes there are, the more a game is likely to be considered for the Steam games catalog!

Click here to visit my page on Steam and to support AstroLander.

Astlan on Greenlight.


I bet it’ll take a million of votes in order to go thru the selection process, but hey … let’s try!

Astro Lander, a development summary

This project started as a simple remake of Lunar Lander.

Lunar Lander relies on a 2D gameplay with a simple use of physics and it exactly what I was looking for. I’m going to explore in this post how it finally evolved into something bigger, iteration after iteration.

A long list of improvements.

The initial change I wanted to implement on my remake was a multi directional scrolling, to offer a larger game area.
I built rapidly a minimalist level made of cubic blocks and started to write the physics and the controls of the Lunar Lander.
I found out that the game play could be accelerated, and then I made the ship to move faster. Rapidly, the challenge evolved from “land softly” to “navigate softly and avoid the walls”.
The goal of the game would be not only to reach a specific point, but also to collect a series of items scattered across each level.

The controls.

I started to focus on the controls of the ship. A Lunar Lander is basically about controlling the ship’s reactors versus the gravity and the inertia.
But I wanted to avoid the usual problems related to the rotation of the ship. If the player is in charge of both the thrust and the roll angle, a situation might occur where the ship is upside down and the thrust direction will sum up with the gravity, thus sending the ship even faster against the nearest wall.
To suppress the frustration inducted by such a control scheme, I wrote a simple routine that always controls the rotation of the ship. The player is free to move in any direction, the physics engine handles all the collision and physical responses, the ship can translation, rotate, bump into walls, but in the end it always remain properly oriented.
In my opinion, this is a good compromise for a physics-driver action game, where the physics engine makes the game looks real but doesn’t spoil the gameplay.

The code of this routine takes only a few lines of code :


//-------------------------
function AutoAlign(item)
//-------------------------
{
local _align, _speed

// Get the current orientation
local _rot_z = ItemGetRotation(item).z
// Get the angular speed (if the ship is rotating)
local _ang_v_z = ItemGetAngularVelocity(item).z

// Magic factors applied using an empirical approach …
_align = Clamp(Abs(RadianToDegree(_rot_z)) / 180.0,0.0,1.0)
_align *= 250.0

// … that defines the strength of the torque (angular force),
// applied on the ship to stabilize it
_speed = ItemGetLinearVelocity(item).Len()
_speed = RangeAdjust(_speed, 0.25, 0.5, 0.0, 1.0)
_speed = Clamp(_speed, 0.0, 1.0)
_align *= _speed

// Applies the torque
ItemApplyTorque(item, Vector(0,0,-_rot_z – _ang_v_z).Scale(_align * ItemGetMass(item)))
}

One of my friends who works in the game industry always told me that I needed to refine the controls before doing anything else on the game. During my past attempts at making a game, I disregarded this advice, and started with the level design. I eventually understood that Romain was right.

To bring the ship in motion, the player will only need to trigger the 2 side thrusters by touching the 2 halves of the screen. Such a basic control is perfectly suitable for smartphones and tablets, allowing you to concentrate on the game without having to constantly check that your fingers are properly positioned on the screen.
With the help of Emmanuel, I was finally able to tweak the core routine that drives the ship and defines the way lateral forces are applied to it. It ended up with the exact kind of behavior I was looking for, so the level design could start, at last!

The Level design

As I knew I couldn’t spend too much time on the graphics, I headed for the simplest method I could think of to build the levels : “lego bricks”. This technique, based on blocks, presented two benefits to me :

  • it is cheap in terms of time investment, because you only need to prepare a few blocks and you’re free to work with the GameStart editor. I didn’t have to constantly exchange back-and-forth between 3dsMax and GameStart.
  • it let’s the door open to a future extension that brings a lot of value to a game : a level editor that the players can work with to assemble new levels from scratch.

It has drawbacks too, of course. It’s a bit heavier for the engine to handle a large list of split blocks, and the overall visual aspect tends to be less realistic.

What’s next ?

Now that the game is almost done, with a series of 24 different levels, all we need is to polish the final builds both for iOS and Android platforms. As soon as the game is released, I’ll be able to focus on the next big implementation : the level editor.

In the meantime, you may enjoy the gameplay video below :

Preparing a trailer for Astlan

Today, as we have planned a walk to the Aerotrain’s test site, I decided to bring my iPhone and a tripod.
The Aerotrain railway makes a perfect landscape to create a fun & intriguing trailer for my (almost finished) game ‘Astlan’.

For the record, the Aerotrain prototype was designed during the 70’s as an high-speed alternative to the regular railways. A test site running on 25km, made of a concrete rail was built in order to test this prototype (max speed recorded was around 400km/h).

Nowadays, only the concrete rail remains, making a perfect place for urban exploration.

Here are a few mockups I made of the kind of framing I want to shoot once on the site. We’ll see if the final result is close enough. Or not 🙂

Turrican 3 (title screen), a bit of (VG) archeology.

Yesterday night, a friend sent me the ASM source code of the title screen of the game Turrican 3, released by Factor5 on Amiga computers around the year 1993.

Not only the 68000 ASM source code of the title screen makes more than 5000 lines, but it contains a few evidences of where the Factor5 team got their inspiration from.

The line 31 mentions a ‘Stryfe‘ character.

I started to look into Google Image, and I quickly found the following character, featured as a Super Vilain of the Marvel universe (look at his Real Name) :

Isn’t that ‘Stryfe’ character the twin brother of the Turrican 3’s Super Vilain (and Final Boss), featured below in the title screen of the Amiga version ?

Amazing, isn’t it ? 🙂

For the record, there is a longplay of Turrican 3 Amiga :