Welcome, new user. Please log in or register.

NunoMartinez Mon 2 Apr 18, 10:37

I've uploaded a new version that fixes a few things. Still not a game, but now when energy is less than 0 the ship explodes.

NunoMartinez Mon 2 Apr 18, 08:36

I don't know if I'll have time to finish the game, so I've uploaded it as it is now.

You'll have to compile by yourself (hasn't time to compile for Windows) but don't worry: I've added instructions at the README.txt.

NunoMartinez Sun 1 Apr 18, 20:18

I've spent some time adding properties and methods to the "Ship" object. For example, I hadn't a "Ship.ShootLaser" method so all the calculations and stuff were done in the control code. The problem would appear in the future, when I'll add AI opponents and networking game. Or may be not.

Anyway, code is a little more clear now.

At the moment I haven't more time. May be tomorrow I can add the explosion and the game-end condition.

NunoMartinez Sun 1 Apr 18, 17:45

It took some time but finally we have weapons. Well, only one: the laser beam. But it works and drains shield.

Now, make the ships explode and then I have a game.

NunoMartinez Sun 1 Apr 18, 09:22

Good morning!

We have energy and shield monitors!

NunoMartinez Sat 31 Mar 18, 21:16

I've started with physics. The idea is that when ships collided each one transmits its kinetic energy to the other. It was funny to see how it failed the first try: they became tangled and transmited their energy in an infinite loop until the CPU ALU said "enough"! (See attached image).

Finally I fixed it and now ships bounce as they should. Pretty funny.

NunoMartinez Sat 31 Mar 18, 20:52

After a walk with my dog, I have two ships wondering around the screen. Pretty nice.

Unfortunately, I have no idea how to record a GIF file to show to you. :(

NunoMartinez Sat 31 Mar 18, 15:57

Now I have two spinning ships. It took me a little more than expected because I didn't do it very object oriented at the beginning...

NunoMartinez Sat 31 Mar 18, 12:36

This may look like a small advance, and actually is, but I have a static little ship on screen. Instead of creating my own graphics I borrowed some from the famous SpriteLib. Later I can create my own.

The good news are that the system seems to initialize and load graphics. That's always good.

I must try not to add a lot of bells or I'll not be able to finish in time.

NunoMartinez Sat 31 Mar 18, 10:43

Well, here I am. I was thinking what project to resurrect and I decided to port one of the first games I made with Allegro using my game Engine and Allegro 5.

The game was named "Batalla Espacial (Space Battle)" and was an unfinished clone of 1961 "Spacewar!" (actually I was inspired by a MS-DOS version of that game). Unfortunately I haven't found my version (it should be somewhere in an old CD) but it was done in C++ reusing code from Shawn Hargreaves' "Marauder".

My plan is to redo my version: 2 player game in the same computer with lasser and torpedoes. I'm sure I won't have time to add more but later I can add network game and A.I. player, asteroids, etc.

Let's start by finding or creating some graphics...


The original: https://spacewar.oversigma.com/
Wikipedia info or the original: https://en.wikipedia.org/wiki/Spacewar! (Note: link should include the admiration sign)
The MS-DOS version: https://archive.org/details/msdos_Spacewar_1985