Squareys.Blog();
Random Crashes? Possible Solution…

I have this problem in two of my projects where applications just crash at random moments. And if I say random, I mean random. No connection to what is going on in the rest of the application.

I am making this demo-game for vsge2D: “Blue Moon”, a project I have long ago abandoned because started with too less programming skills. Now it’s supposed to help me add new features to vsge2D.

In my last post I wrote about entities shooting bullets. There was this point where I got that working, but the game tended to crash after a random number of bullets. (It was not a certain amount of time until the crash, I checked that as well.)

That’s a quite scary moment for me as a programmer who didn’t have to deal with such a strange problem for a long time now, because my usual debugging methods don’t apply for this sort of bug. But I didn’t give up, and found the problem:

Read More

Copying Pointers does not do the job.

When shooting bullets, entities must be able to copy a bullet entity. That bullet entity is stored as a pointer in that entity, which has the ability to shoot. Okay, then let’s create a copy-constructor and create a new instance as a copy of that. 

So what’s the problem? The entity has a pointer pointing at a graphics node. Okay, then let’s create a copy-constructor for that as well. But we don’t know the specific type of this node (Node has a lot of children: SpriteNode, TextNode etc.), and therefore don’t know which copy-constructor to call.

I found a solution:

Read More

Fixed my MinGW + Allegro Problems

In the end it wasn’t even the sjlj/dw2 problem after all. I thing I had a buggy snapshot of MinGW or so, or failed when using mingw-get-inst ;P

Whatever it was, my compiler is working and I’m happy.

Problems and more Problems

So Allegro 4.3 doesn’t work. Apparently it has something to do with me having updated MinGW to 4.6.2 and having to recompile all my libraries and therefor all their dependencies and in the end noticing I wouldn’t be able to compile the MiniDirectX SDK needed for Allegro.

Why recompile? I think the reason is the new exception handling of MinGW: dw2 (Dwarf2). This makes all the code compiled with the sjlj (set-jump-long-jump) exception handling architecture incompatible and seems to produce strange results like 0 kb *.exe-Files.

Well, I guess I don’t have a choice other than installing a new Programming Library. I’m thinking about Allegro 5, SDL+GL, or SFML.

2D Game Engine

I’m back! Because of my final exams at school, I didn’t have to much time for things I actually like doing, hence this blog not getting too much attention.

I never actually had a good structure in any of my game projects. This eventually led to chaotic code, workarounds necessary to implement simple features and a lot of frustration when starting over again.

This actually was the most important reason for the failure of “PI - the Mineshooter Game” (my minecraft style project).

Now I decided to actually get some structure into my games with a simple Game Engine, starting 2D and sooner or later applying what I learned with that to 3D.

Having started recently, this is how far I got:

  • General node based structure for graphics (currently with Text-, Sprite- and Tile Map Nodes)
  • Tile based maps and a input controlled entity (yeah, that smiley thing moves when you press up/down/right/left)

Next things planned are:

  • Animated Sprite Node
  • World Collisions

Guitar Modelling Timelapse with Blender 2.62

Some updates on Zombiehunt

I imported Zombiehunt to an Eclipse IDE project, which made things sooo much easier.

Up till then, I had been using MinGW make/g++ command line and notepad.exe as an editor. Just so you realize that this is a major upgrade :P

Since my project is more than four years old now, I partially had extremely bad coding style in there. So last things I did was cleaning it a bit. For example: I renamed about  a hundred functions and variables to fit C++ naming conventions.

Fixed some collision issues and made the background grayscale when pausing game.

Pyromania - Player/Explosion Collisions

Finally explosions kill the player in Pyromania.

Destruction!

Today I worked on Pyromania, my Bomberman type game. I had bombs and explosions, but they didn’t do any harm to world or player.

Now explosions at least destroy destructible blocks (the wooden boxes):

Next thing I have in mind is getting the Explosions to kill the player ;)

Answer…

jfrangou:

squareys:

I was very busy creating a Minecraft mod in the last two days. Here are some pictures… […]

Awesome, more awesome if the cannons actually work  :P

Thank you!… and it does actually work. As you can see in the second picture, the cannons shoot Ghast-fireballs-similar entities that are influenced by something like gravity ;)

You can either right-click on the cannons or power them with Redstone.

I’m still tweeking some stuff, so I didn’t provide a download yet :)