Transdimensional Hellspider
Linley Henzell

Hi everyone.

A while ago I finished my game Transdimensional Hellspider.

Here's the depot page and here's a thread on shmup-dev about it.

Basically, it's a cross between Spacewar! and Warning Forever. You fight a series of large boss-type enemies that evolve in response to the way you destroy them. It's also pretty hard. But fun (I think).

Interesting development challenges: writing a convincing physics model for the hellspider. Getting the hellspider to develop properly, so that none of its parts overlap even when it is flexing. Getting the player-centred display to work without looking dodgy.

Screenshots:

{"name":"messenger2.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/6\/168fc42d58e62762a5dd6f2bb97174f0.png","w":320,"h":240,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/6\/168fc42d58e62762a5dd6f2bb97174f0"}messenger2.png
{"name":"messenger1.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/f\/9f3090a88ec8d80c2f7f9609b6284ceb.png","w":320,"h":240,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/f\/9f3090a88ec8d80c2f7f9609b6284ceb"}messenger1.png

Let me know what you think!

CGamesPlay

Interesting concept, but I found it very difficult for my first two games. Is the best strategy to just get inside the spider and fire?

Anatol334

Pretty cool game, with good variety in weapons/enemies. I did have trouble adjusting to the fact that I couldn't move backwards. This meant the only strategy I could come up with was charging through the enemy, and then shooting him in the back.

Timorg

I thought this thread was a reference to Robert Gray from Steven Kings Macroverse; Todash Darkness. But I love shmup's so I am downloading in now, yay. :D

kenmasters1976

I really liked White Butterfly, so I'll sure give this one a try as soon as I can. You're like a shmup guru, huh?.

[EDIT:] Wow!, really cool game!. The ships' animations, the physics and enemies' design are all quite nice. It's a bit difficult but once you get the idea it gets a bit easier. I've only reached Hellspider H until now.

The pause at the level presentation is a bit annoying, I think.

CursedTyrant

Nice game, but hard (got to the 3rd hellspider), and the ability to fly backwards would be a big help.

kenmasters1976

Enemies do indeed adapt. That's a really nice feature and makes the game harder. Now I can't stop playing. Right now I can't beat Hellspider 0.

[EDIT:] OK, I reached M and I'm officially giving up. Anything further is just for shmup junkies. And the M Hellspider is not even half the size of the one in the first screenshot!.

So, I give up. Nice game, though. I may get the source and compile with infinite lives or invincibility...

Neil Black

Backwards movement and strafing would improve the game (in my opinion). It's frustrating to not be able to go the way I want to go. I like being maneuverable.

Timorg

I couldn't really get into the movement either. Also the 8bit colour played havoc with my win7, dual screen setup. To me the game screams dual stick controls, one for forwards, backwards and strafing. Then the other is used for rotation.

The best tactic I could come up with was moving away from it, then come at it, just off angle so I could shoot off the legs as I went past. I would really like to be able to circle around it, shooting it from behind the whole time, but it may break game dynamics.

On a plus, you really have the shmup down to a fine art. The problem with art is that it can be controversial and may not be to everyone's tastes. If you are happy with this, keep it this way.

also, Have you considered creating a framework for shmups?

GullRaDriel

And a Mouse aiming option, FTW !

kenmasters1976

I'd like to see a video of someone playing against that Hellspider in the first screenshot. I would record a video myself if I had a capable machine.

Also, I'm thinking that maybe a different upgrade path might help me so I'll probably play it again and try to get past the M Hellspider. After that one I would get another upgrade so things would probably get a bit easier.

Slartibartfast

I loved Overgod, I loved White Butterfly, I loved Excellent Bifurcation, but I don't really like Transdimensional Hellspider, it is very confusing to control and not as exciting as White Butterfly (Overgod suffers from a similar problem having difficult controls and a slow pace.)

Timorg said:

also, Have you considered creating a framework for shmups?

I have to agree that a Linley Henzell SHMUP framework sounds pretty cool :)

kenmasters1976

As I thought, taking a different upgrade path I was able to get to the Y Hellspider, once. I was going for the shield upgrades first 'cause otherwise it was really hard to survive but now I'm going for the power upgrades first and it seems to make things a bit easier.

I liked White Butterfly more, too. But this one is not bad, it's just different.

I have to agree that a Linley Henzell SHMUP framework sounds pretty cool :)

LHSHMUPF, for short?.

Trent Gamblin

Good game.. I'm terrible at it but it's nice. Are the "hellspiders" generated following some algorithm or did you somehow hand make them all? I was expecting a vertical shooter as all of your other games that I've played were like that.

kenmasters1976

I finished it!. It requires both a good upgrade path and some luck in the enemies' adaptation; if the enemies start launching the super-hard-to-avoid attacks, then you're screwed.

Once you get a fully upgraded ship the rest is plain easy. Surviving long enough to upgrade your ship is the hard part.

{"name":"601128","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/e\/7ec67a9ae44755e682c4259ff1703d04.png","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/e\/7ec67a9ae44755e682c4259ff1703d04"}601128
The screenshot palette got messed up.

Are the "hellspiders" generated following some algorithm or did you somehow hand make them all?

I guess they're hardcoded as they're always the same. It would be cool if they were randomly generated. By the way, I guess I didn't see the one in the first screenshot... maybe I was just too busy dodging bullets to pay attention.

Linley Henzell

Thanks for all of the comments and feedback! I certainly don't expect everyone to enjoy this game; it's very tricky to play and kind of punishing sometimes. I guess it's meant as a challenge.

It doesn't have mouse aiming or dual-analogue controls because I find those control methods really hard to use. I can play FPSs alright with mouse+keyboard but for some reason mouse aiming in any other perspective just doesn't work for me. The same with dual analogue. Also, I like thrust/rotation inertia-based controls and one of the challenges I set myself for this game was the fixed forwards perspective with the world seeming to rotate around the player. I might do something else like that sometime.

The pause at the level presentation is a bit annoying, I think.

True, but after the first few levels it takes quite a while to build the hellspider, mostly because it precalculates all possible flexed/relaxed states (because the calculations are too slow to do each frame when the hellspider is flexing). Sadly there's not much I can do about that.

Timorg said:

also, Have you considered creating a framework for shmups?

What's a "framework"? My coding style is a bit idiosyncratic (which is a nice way of putting it) so I'm not sure how useful this would be to anyone else.

Are the "hellspiders" generated following some algorithm or did you somehow hand make them all?

They're generated by algorithm. Basically, if you destroy a piece while it has other pieces attached to it, it will grow larger. If you destroy a piece while it doesn't have anything attached to it, it will grow another piece. It's a bit more complicated than that, but that's the basic idea. Weapons are chosen and can change according to the range and angle you destroyed the piece from.

kenmasters1976

Wow!, so they are generated!. I thought they were hardcoded. I guess I always got the same Hellspiders (maybe they weren't the same after all, just similar) 'cause I always used a similar strategy for destroying them. That also explains why I didn't see the one in the first screenshot. This makes the game even more interesting.

Now I wonder how large the Hellspiders can grow...

[EDIT:] Woah!, a small strategy change and I'm fighting huge Hellspiders by the time of the second upgrade. Really nice!.

The I Hellspider:
{"name":"601132","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/522204cdda5abf44d4d0ac1ef73252af.png","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/522204cdda5abf44d4d0ac1ef73252af"}601132
That's just level 9.

GullRaDriel

I noticed that in fullscreen, I, as kenmasters1976, have the screwed up palette thing.

It does not happen in windowed mode.

Jonatan Hedborg

Very fun little game! Could you elaborate on how the spiders are generated?

I liked the controls, but I would prefer it if it was even more inertia-based. There seems to be a lot of dampening now, which makes certain strategies impossible (accelerate next to the spider, glide past it while firing at it, for example).

Neil Black

I noticed that in fullscreen, I, as kenmasters1976, have the screwed up palette thing.

Oh yeah, forgot to mention that I've got that too. Running Windows 7 here.

kenmasters1976

That's only the screenshot palette what gets messed up for me, the game looks OK.

GullRaDriel

The fact that you think you know the problem should not forbid the author to be aware of it.

And yes, it does play in the fact that I first liked it less (in fullscreen) than the second time in windowed mode.

He must fix it ! >:(

;D

Linley Henzell

I'm not sure what's causing the palette problems. I suspect it's actually a bug with Allegro, and there's not much I can do about that (possibly nobody else notices because not many people use 8-bit colour anymore. I use it for the control it gives over transparency).

I liked the controls, but I would prefer it if it was even more inertia-based

If you get an agility upgrade, the drag decreases quite a bit.

Jonatan Hedborg said:

Could you elaborate on how the spiders are generated?

I don't remember all the details, but here's as good an explanation as I can think of right now.

As I mentioned before, if you destroy a piece while it has other pieces attached to it, it will grow larger. If you destroy a piece while it doesn't have anything attached to it, it will grow another piece (although there is a maximum of two pieces that can be attached to any other piece). However, a piece won't grow larger or develop a child piece if that would result in an overlap with any other piece. Any change to one side of the hellspider is mirrored on the other side.

The weapon that a newly developed piece will have depends on how the piece it grew from was destroyed. The weapon chosen depends on the range and angle you were at when you fired on it (averaged over however many shots it took to destroy). So destroying a piece from close range and from behind the hellspider might get you the exploding weapon. Destroying a piece from medium range and in front might get you the blue beam weapon. When a piece is destroyed directly (i.e. not as the result of a chain reaction) it can change weapons. There's a maximum number of different types of weapon a hellspider can have, and pieces of a certain type can all change at once if their weapon is not useful.

The rearmost arms can only have engines, though.

When you are at long range, all of the joints bend backwards, so that the hellspider is sort of opened up (in kenmasters1976's screenshot it looks like the player has just moved close to the hellspider and it is still in open position). In this position, all fixed weapons (the ones that don't rotate to track the player, e.g. the spinning red gun thing) point forwards and all engines point backwards to give maximum speed. At close range, all joints move forwards. Fixed weapons point wherever they end up pointing, as do engines (which can increase the amount of torque they generate, for manouevreability).

All of the maximum and minimum joint angles are precalculated for speed (this involves a lot of collision detection), so they don't change if you destroy some of the parts.

Internally, each arm of the hellspider is represented by a linked list of structures.

I hope that all made sense!

Thomas Fjellstrom

I'm not sure what's causing the palette problems. I suspect it's actually a bug with Allegro, and there's not much I can do about that

Most problems people have with Allegro's palletes is that the color components are 6bit. 0 to 63. not a full 8bit 0-255. So if you haven't taken that into account you'll see some strange stuff.

Linley Henzell

That's true, but the problem I have is that the palette array seems to get corrupted under certain rare circumstances. This has happened with several of my games so while it could be a problem in the few pieces of my code that they've had in common, I don't think it is. The only fix I can find is to put giant padding arrays around the palette array, like so:

RGB other_palet [1324];
RGB palet [256];
RGB other_palet2 [2048];

Here, palet is the real array and the others are the padding.

Sadly what works on my computer doesn't seem to work on all others, but it's better than nothing (and I love 8-bit colour so I'm going to keep using it).

kazzmir

True, but after the first few levels it takes quite a while to build the hellspider, mostly because it precalculates all possible flexed/relaxed states (because the calculations are too slow to do each frame when the hellspider is flexing). Sadly there's not much I can do about that.

Compute the next hellspider in a separate thread and let the player fly around while the computation is going on.

Jonatan Hedborg

True, but after the first few levels it takes quite a while to build the hellspider, mostly because it precalculates all possible flexed/relaxed states (because the calculations are too slow to do each frame when the hellspider is flexing). Sadly there's not much I can do about that.

Not that I've noticed a long loading time, but maybe you could do it real-time and cache the results? (Eg check to see if we've already calculated "this", and if so use it. Otherwise, calculate it and store for future use).

Tiamat

Really interesting concepts for a shmup. I was expecting something like White Butterfly, which was an awesome game btw!, but instead get my ass repeatedly handed to me by a very unforgiving enemy. I need to practice I guess. :P

That's true, but the problem I have is that the palette array seems to get corrupted under certain rare circumstances. This has happened with several of my games so while it could be a problem in the few pieces of my code that they've had in common, I don't think it is. The only fix I can find is to put giant padding arrays around the palette array, like so:

Apparently this is windows explorers fault I've come to find out. Since windows XP SP2 through Vista and windows 7, explorer will forcibly change the system palette thus corrupting any game using 8-bit colors with little more than a message to your program informing you of this. ..I believe in windows.h it's defined as "WM_YOUVE_JUST_BEEN_RAPED_BY_MICROSOFT" :D

I've got a fix for this bug, but I'll have to get back to you as I don't have the code in front of me right now since I did not write the fix. You will have to recompile the allegro source with the added code though. ..(It should probably be added to the 4.4 branch also.)

Linley Henzell
kazzmir said:

Compute the next hellspider in a separate thread and let the player fly around while the computation is going on.

This would be a good idea, but sadly threads are among the many things I don't know how to use.

Not that I've noticed a long loading time, but maybe you could do it real-time and cache the results?

Yeah, I considered that approach but rejected it for some reason. Probably laziness :)

Tiamat said:

I've got a fix for this bug, but I'll have to get back to you as I don't have the code in front of me right now since I did not write the fix.

Please do! I'd really appreciate that.

Tiamat

      case WM_QUERYNEWPALETTE:
      case WM_PALETTECHANGED:
         if ((HWND)wparam != wnd && gfx_directx_primary_surface) {
            IDirectDrawSurface2_SetPalette(gfx_directx_primary_surface->id, ddpalette);
            InvalidateRect(wnd, NULL, 1);
         }
         return 0;

Should go into the allegro/src/win32/wwnd.c file as part of the windows callback code.

Anyone feel free to apply this to the allegro 4 branch so other users don't have this problem anymore as well.

Cheers!

Linley Henzell

Thanks! I'll definitely use that code. The palette bug has been annoying me for years :)

ophelius

I'm having this problem as well. I'm using another language so I don't know how to compile C code. I'm also using Allegro 4.0. If anyone has this version compiled into a dll with the palette fix, please post the link here. That would be much appreciated. Thanks

Edit: Ok, I tried compiling this code into wwnd.c but I'm getting this error message:

"error C2065: 'gfx_directx_primary_surface' :undeclared identifier"
"error C2223: left of '->id' must point to struct/union"
"error C2065: 'ddpalette' : undeclared identifier"

I'm pretty sure I put the code in the right place inside directx_wnd_proc and sandwiched between the other cases in 'switch(message)'. I don't code in C so excuse me if I don't make sense. Thanks

Matthew Leverton

It's highly possible that the fix only works with 4.2 and 4.4 (those two versions are very similar). Version 4.0 is much older.

Tiamat

Are all the required headers included? ..You may have to add: #include "wddraw.h" to that file if it's not there already. ..Sorry, I don't have a before and after snapshot for the differences, only the after.

Hope that helps.

ophelius

I got it to work thanks to Matthew Leverton, but now I'm having other issues. Check this thread for more info:
http://www.allegro.cc/forums/thread/603939/863411#target

type568

Very very nice ideas, something literally all single player games are lacking.
Although the reality, is very much like it. Even though games tend to copy reality, they don't get in to matter of cause-effect sequences deep enough :P

Append:
So, changing strategy from spider to spider, is the "best strategy" to which these guys can't adapt?

Thread #603839. Printed from Allegro.cc