Star Cage - A top down space shooter

User projects written in or related to FreeBASIC.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia

Star Cage - A top down space shooter

Postby Lachie Dazdarian » Aug 31, 2006 9:39

Hello all! I'm not sure if you expected anything but here it is. Another game by me.

Star Cage is top down space shooter and can be played in single player or two players split screen mode. I dare to say it's not you everyday shooter since it features "Seek & Destroy" type of engine, although I was inspired by another game. You don't know what I'm talking about? It's a type of engine where your ship or whatever is always fixed, while everything else is scrolled and rotated as you move and/or turn the ship. It wasn't an easy thing to do but the challenge effected positively on me, since Star Cage happened after some 4-5 dropped ideas and I almost gave up on making anything.

You can play the game in two modes. The regular story mode where you need to pass 4 stages(plus a boss stage) filled with various alien space crafts and a special head on head mode for two human players only, where you simply need to destroy the opponent.

A note that this is an AFlib 2 game so....wee! Hello Adigun! :P

Download: (2704 KB)
No sound version: (290 KB)

Star Cage was inspired by a rather unknown(so I think) Amiga game entitled "Transplants" or something like that, and I was actually coping that game and not Seek & Destroy. The main features of Transplants were the mentioned engine, circular play field and two players split screen mode, all of which was successfully recreated. I don't remember "Transplants" well but I think its rotation routine was superior to D.J.Peters' one, used in Star Cage through AFlib 2. Still, I shouldn't complain since this game wouldn't happen without D.J.Peters' work.

Just a note that only the engine was copied from Transplants, and only conceptually. Everything else is mine, from execution to ship designs and the AI.

So this is yet another un-ambitious, medium-sized project of mine, but I'm quite happy with this one. Nothing spectacular but a lot of uncommon features, like the scroll+rotation movement, the circular play field and the split screen mode! Plus the AI that functions inside all these parameters. This part was a drag. Took me time to master the ATN, SIN and COS functions, to get the ships behave correctly on the edges of the map and to get the projectiles to spawn from the right places on the ships. I even had to create a test program to get this right. Oh, the joy.

Oh, yes. When I'm referring to the circular play field I'm talking about a play field which, for example, bumps you on the bottom of it if you pass its top. And all this is done without you feeling it. Nothing jerks and the enemy ships don't go berserk. The illusion is kept!

I didn't succeed to adjust the gameplay the way I wanted it to. Simply, some basic flow of the game forced itself on the surface and couldn't be changed.

The game is relatively balanced but I couldn't go endlessly with it. If I had beta testers perhaps the gameplay would be better. Anyway, it's a really difficult gameplay to balance. There the starting maximum and turning speed of your ship, starting shield power, the ratio of your projectile fire, the effect of the upgrades, the speed of enemy ships, the strength of their projectiles, the ratio of their projectiles, the speed of their projectiles and their life time, the number of enemy space ships per wave, the specific features of their AI modes and so on. You get my point? It's impossible to hit the right combination, if there is a right combination.

The music? Eh, sorry about that but I couldn't do better at this point. Matt2Jones and The Awakened's tutorials weren't very helpful since the basics of music composing obviously don't make you a good track composer. Yes, I can make a good tune or two but what to do with them? How to combine them with a harmony? How to combine one melody with another? How to make the transitions? So the battle music, the only real track in the game is my best possible in this moment. Anyway, it ended up sound much better that I though it could. Still, when I listen to any other track that came with Fruity Loops 6 or DarkDread's music or the music from Within A Deep Forest I want to hide in a hole and cry.

The very game engine could serve me very well in some more ambitious project. In some sort of space exploration/action game. Some things are left to be tested, like how over-screen backgrounds(space stations or planet surfaces) will look in this engine. I'll see.

Star Cage took some 2.5-3 weeks to complete but realistically could have been done much faster. This was mostly due my strangely persisted loafing periods, but it was hard to resist the calls of my chomps, calling me on the look at the peaches...and surf...and...Ok, I was really lying on my couch and watching the reruns of Gilmore Girls. Oh, the glamorous life I lead.

The package includes the source code and you are free to use it. Many parts of it might confuse you since it's filled with numerous exceptions and nitpicks. But as it is a code of a finished game and not of an engine you shouldn't expect something better. At least not from me. :P

I'm eager to hear your comments, especially from those who will finish the game. Also, I would like to hear from those who have someone to play with the head on head mode. I didn't have so I don't know how much that mode is playable/enjoyable.

And note that I couldn't get more than 33 FPS from Star Cage on my PC so the game had to be limited to this FPS value and optimized for it. In two players mode the game runs with some 22 FPS on my PC so I would like to know if you are getting the maximum from the game. Press F2 during the game to turn on the FPS counter. Also, stretch graphic mode is slower but should give a better result than Scale2X(I can't decide). Try that mode too and see how much FPS you get. I think you shouldn't have problems since I have a very old PC and an ancient video card, according to today standards(ATI 3D Rage Pro). The fact is that my video card should be able to run Star Cage with 100+ FPS in a perfect world, but obviously DirectX drivers were optimized for the hardware of later video cards. I mean, YAGL! programs run with 2 FPS on my PC. That's not normal! Once more, you should get 33 FPS in all modes. A note that if you switch to "SLOW" game speed the game will be limited to 25 FPS. This was a last minute additin since I realized that some people might complain how Star Cage is too fast. So the "SLOW" game speed if for those wimpy sissies!

As for AFlib 2. The very library helped me a lot and made my work much easier, mainly in handling the sprites. Also, I had more power over the D.J.Peters' rotation/scale routine. For example, I didn't know how to paste a rotated/scaled sprite with transparent background color without AFlib 2. But on the other hand, one could complain a lot on AFlib 2. It's really too bulky and I had to create my own .bi file to cut the size of the executable. Who wants to have a 4 MB executable? And the user shouldn't be bothered with GFX_v and GFX_h parameters. You also retrieved them incorrectly through the SCREENINFO statement and confused me. And why there is no AF2.SprBlit.Solid statement? Again, all of this might have been fixed in another version.

On the end, I would like to say that this was a really enjoyable game to make. I'm starting to understand now how challenges in coding can pump up the motivation. And I'm glad I got another game out of my system since I really feel now much more content than I was before starting Star Cage.

That would be it. Phew! I wonder if anyone read all of this. I need help.
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Postby anonymous1337 » Aug 31, 2006 10:56

I will buy your novel. Also, I'll play this game.

EDIT: Played. It was too hard. Couldn't make it past level 2. Died on the 3rd fleet
Last edited by anonymous1337 on Aug 31, 2006 15:03, edited 1 time in total.
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY

Postby Ryan » Aug 31, 2006 11:10

Lachie... this project looks awesome. I'm about to head to work at the moment but will be sure to play it this evening and get back to you!
Posts: 30
Joined: Mar 10, 2006 12:19

Postby cirux » Sep 02, 2006 9:06

Nice work on the game. I've only been playing it for about 20 minutes till I got to some of the larger ships. I like the music, especially the first intro track - I like those kinds of tracks a lot. I did read your whole post, actually all your posts as you are one of the most prolific game makers in the QB/FB scene, and am always on the look out for your new works. I'll post again when I've finished the game to let you know what I think.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Great work

Postby Frank Dodd » Sep 02, 2006 21:41

Excellent, a great piece of complete work very well done my hat goes off to you and everyone involved
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY

Postby Ryan » Sep 03, 2006 0:10

Haven't got to hear the music yet, because I played it on my brother's muted laptop (movie playing), but if it's anything like the gameplay and graphics I'm sure I'll like it. ; )

Lachie, this is an incredible game! I loved this style of game, and you have made quite the enjoyable one. Anyways, it is tough, and I did die on the second fleet, but the ship types and AI are great and fun. I'll be sure to revisit this on my desktop to play some more! (It's a little awkward using the enter key right above the arrows on a laptop for ship control.)

I found it tough, but I didn't mind.. it's a good challenge. The only improvement I would ask for would be a shield booster... = P Even if it was something at the expense of battery for a while or something. Battery/energy? Who knows. Basically, I used 500 energy recharging my shield after the first stage, so I'm curious if I'll ever be able to afford the power ups.

5/5 From me, Lachie.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia

Postby Lachie Dazdarian » Sep 06, 2006 9:44

Thanks for the comments. Really flattering. But I kinda expected more of them. I guess the community is in a lag(is that a way to say it?).

Adigun, where are you? I used you lib to make the game! Gimme some sugar! :P

I fear nobody finished the game so far. Did you read the instructions? You can theoretically finish the game without getting a shot. As a reference, you should be able to finish sector 1 with 70 % of shield power. If that is not the case, you are playing the game on a wrong way. In conclusion Ryan, you don't need a shield booster.

Anyway, check the comments from Daily Click. One guy said the game is too easy. Go figure.

Also, find somone to test head on head mode, please!
Posts: 1704
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.

Postby Sisophon2001 » Sep 06, 2006 11:15

I enjoyed it also. I played it four of five times, and ran out of shield power each time. I am not much of a game player obviously, but it is on my laptop, and I will try it again from time to time, perhaps with less recklessness. I assume the goal is to kill everybody? I don't recall reading any other goal when I clicked through the docs.

I usually use Linux these days. Does it compile for Linux?

Posts: 484
Joined: Aug 24, 2005 0:32
Location: Camuy, PR

Postby Nodtveidt » Sep 06, 2006 11:24

Pretty solid game but not really my flavour. Thumbs up. :)
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois

Postby cha0s » Sep 06, 2006 13:06

Yeah, this game rocks dude.
Posts: 619
Joined: Feb 07, 2006 15:29
Location: France / Luxemburg

Postby redcrab » Sep 07, 2006 8:56

Wooh !
When I discovered your game, I'm feeling nooby, tiny and insignificant....

Great job...
Smooth : 30 FPS
game balance : well done, the actual settings are fine
finished 1st sector
died in second sector ...

the radar view should be little changed
during rotation enemy disapear/re-appear ... (rotation may delete some pixels of the radar)
the radar rotation is a square in rotation it should be a disk ( using mask and/or transparency).

The music is quite well mapped to the game atmosphere !
(btw when your huge sfx collection will be available to download ;) )

>>> It's exactly the game quality that I would like to to create. <<<

Awesome... really awesome... nice usage of the Sprite rotation
Joshy can be very proud of it's sprite rotation.
Posts: 207
Joined: Jul 02, 2005 14:51

Postby elsairon » Sep 09, 2006 14:23

Wow nice! I died kamikaze the last ship on level 2.

Great work!
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia

Postby Lachie Dazdarian » Sep 14, 2006 7:56

Sisophon2001, I have no idea if it compiles in Linux. You have the source code. It's pretty easy to compile. Lemme know if it works.

redcrab, I agree with you on the critics. I was aware of them but just didn't think people would mind them much. Anyway, no enough for me to update the game. Perhaps one day in the future.

SSC uploaded my sound archive quite some time ago:

It's not really something great but can help. Depends what you are looking for. I just realized I used the same sound for warping in Poxie and Star Cage.'s obvious the database needs more sounds.

Anyone finished the game yet? This is not making me happy.

Perhaps you are playing it wrong. It's not that hard. If you have 55 % shield power or more at the end of a stage buy an upgrade first and then fix your shield. There is no need to fix you shield completely before going into the next sector.

I recommed you upgrade the weapon after stage 1 and then the shield(you get 100% shield power automatically!) after stage 2.


I just realized I forgot to credit relsoft's space travel effect(at least in the readme file). Sorry about that Eric.
Posts: 432
Joined: Oct 01, 2005 10:50
Location: Maryland

Postby Eclipzer » Sep 14, 2006 18:18

Lachie Dazdarian wrote:Anyone finished the game yet? This is not making me happy.

Perhaps you are playing it wrong. It's not that hard. If you have 55 % shield power or more at the end of a stage buy an upgrade first and then fix your shield. There is no need to fix you shield completely before going into the next sector.

The best games are play tested extensively. I suggest you gather a ton of feedback and modify the game accordingly. I believe I died soon after completing the first stage, and there wasn't much that made me want to come back and try again. Not trying to be harsh, just my honest experience.

Site Admin
Posts: 3280
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada

Postby coderJeff » Sep 14, 2006 18:30

I thought the game was entertaining, even exciting at times, especially to escape a swarm of ships unscathed. If anything it was too short although the end story hints that there might be more to come. :)

I finished the game in under 60 minutes (after several attempts). There's more to this game than just holding down the fire button. Different combinations of upgrades against different ships require different tactics so I think there's replay value there.

I'm the only gamer here so I didn't try out the head-to-head or cooperative modes but both look really fun.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest