View Full Version : Astro Captain Battle Fleet
BlackShipsFillt
21-01-2010, 10:51 PM
Here's a little game I made to set up some architectures in Unity (the Game Jam is coming up)
http://www.blackshipsfillthesky.com/astrocaptain/astrocaptain.html
http://www.blackshipsfillthesky.com/astrocaptain/astrocaptainshot1 copy.png
I've uploaded the source in a Unity3D Package File . I know I suggested that I would do a tutorial but it probably won't be so much a tutorial as a working project with a little explanation and online support (yours truly)... I did intend making a simple tutorial, but I got carried away and made a game instead.
Features that this project has that are useful as examples of possible ways to get things done in Unity3d:
Sprites
Input
Sound
Saving Scores
Changing Levels
Collision testing
GUI functions
Raycasting and other handy physics tools
Particles
The Line Renderer
The Trail Renderer
Prefabing
Though I will warn you that I don't do things the official way in Unity, I like my code simple and dirty and split into as many classes as possible. Also, it may run alarmingly slow, I became obsessed with particles at some point during it's creation.
The Unity3D package can be found here: http://www.blackshipsfillthesky.com/astrocaptain/Basic Example Project (Astro Captain 22 Jan 2010) - 2.unitypackage
Instructions for building this game:
Open up Unity and start a blank project
Open the package file in your file explorer and import everything
Add the two scenes to your File->Build Settings menu. Add the MainMenu scene first, then the GamePlay scene
Go to Edit->Project Settings->Tags and add the tag "Evil"
(optional) Go to Edit->Render Settings and put Fog on and set the fog density to 0.005
Layer
(optional) It doesn't import the Layer names, but the layers are still intact... You might want to give the layers names if plan on fiddling (Edit->Project Settings->Tabs) Layer 8 = "Background" Layer 9 = "Foreground" Layer 15 = "Ships" Layer 16 = "Menu"
Let me know if this helps you, or if you need any help with it
dislekcia
22-01-2010, 12:12 AM
Whoah, that runs pretty slowly... Still, I'd like to play with the framework behind that. I really should get into Unity...
BlackShipsFillt
22-01-2010, 12:36 AM
Yeah, I may have gotten a bit loose with some of the procedures, it drops to 250fps on my computer, so either the webplayer slows it down, or I'm sitting on a beast (sadly I suspect its the latter)...
Should be easy enough to tune up though... Is it always slow, or is it when there are a lot of particles?
I'm much more comfortable optimizing for iPhone. :P
dislekcia
22-01-2010, 01:41 AM
Yeah, I may have gotten a bit loose with some of the procedures, it drops to 250fps on my computer, so either the webplayer slows it down, or I'm sitting on a beast (sadly I suspect its the latter)...
Should be easy enough to tune up though... Is it always slow, or is it when there are a lot of particles?
I'm much more comfortable optimizing for iPhone. :P
It started out super slow and then just never sped up... Took forever to kill the first three enemies.
Fengol
22-01-2010, 07:34 AM
I had a very smooth game but I clicked the Pause button at the bottom-right of the screen right at the beginning. I think that's ON by default?
Again BlackShipsFillt, you're mastery of 8bit style is impeccable, especially particles
BlackShipsFillt
22-01-2010, 10:20 AM
I had a very smooth game but I clicked the Pause button at the bottom-right of the screen right at the beginning. I think that's ON by default?
That's a little odd... Though the pause button does the same thing as the spacebar if it's giving trouble.
Again BlackShipsFillt, you're mastery of 8bit style is impeccable, especially particles
I think you give me too much credit.
So slow framerate or slow gamespeed? The game speed can be adjusted with Space or + and - . But it should be snapping to normal speed at the start of combat.
I put in a little framecounter... It is actually dropping frames when there is a lot going on. I still don't fully understand the Unity profiler (250fps what is that???)... Like I say I've been working on iPhone for a while and I get a bit power crazy when I do something for PC.
It looks like the performance problems are mostly rendering related, so reducing the number of particles (or reducing their size, like the tiny geometry wars particles) would solve that. Not a tricky thing to do once you get the code.
There are a couple reasonably pointless, but expensive, hack operations I do, like damaging guns, that could be removed.
I'll upload the project in a bit.
Fengol
22-01-2010, 10:41 AM
I know this might be a stupid question, but I'd also love to know your process for generating your ships
FuzzYspo0N
22-01-2010, 11:07 AM
IM playing on a pretty crappy card and what not, runs great.
Really cool game, though no box select and per unit dragging in fast paced mode (no pausing for me l;p) it seems slow gameplay wise. dragging each ship individually gets old, though the pause fixes that i guess.
Love it so far
BlackShipsFillt
22-01-2010, 02:35 PM
I know this might be a stupid question, but I'd also love to know your process for generating your ships
Do you mean the design or the coding? The code is all in the project files so you can have a look...
I'm busy figuring out how to make a Unity3D package for this thing
Fengol
22-01-2010, 02:47 PM
no, I mean the sprites
BlackShipsFillt
22-01-2010, 02:57 PM
The ships I've drawn in photoshop, they're only 16X16 pixels and there are a couple frames each (you can have a look inside the project to see). The ships are loosely based on Space Invaders and Star Control.
Thanks for the feedback FuzzySpoon. Yeah... I don't know if I want to take this further...
If I were to be serious about doing it:
There needs to be better selection controls like FuzzySpoon suggested...
There needs to be some narrative... even if it's just "Yikes... The Ur-Quan are attacking!!"
There needs to be exploration... ie the enemies are out there but you decide when you want to attack them, rather that waves of them coming in (or otherwise there needs to be a reason to defend yourself, like something to protect)
As well as upgrading and such... Increasing your fleet's size is cool but it's not enough... One thing I thought of that might be a LOT of fun is getting your units to join up... Shouldn't be too hard to do, just move them together and place Unity Joints between them... so by getting more ships you gradually build a SUPERGUN!
Also guns shouldn't be able to fire in every direction (this is easyish to implement). And guns shouldn't appear behind ships (there just needs to be separate SpriteManager for guns to do this)
Also if the ship building/upgrading is interesting enough then saving and sharing ships via a database would be nice.
Also read the stuff myself and Disleksia wrote on this thread http://forums.tidemedia.co.za/nag/showthread.php?t=13132 ... many of the same gameplay concepts occur in this game.
I've made a Unity package now... You can download the games source... Check the first post for the link and instructions
BlackShipsFillt
22-01-2010, 06:41 PM
Now with Bloom!!
http://www.blackshipsfillthesky.com/astrocaptain/astrocaptainshot2.png
I'm still fiddling with it though...
dislekcia
23-01-2010, 01:24 AM
After a chat to Fuzzy today in which this game came up, he explained that I'd tried to play it seriously while paused from start to finish... Doh.
Gave it another go and got to those buggers that have the yellow charge beam of death which pwned everything I had. If you were going to continue on this project, I'd suggest looking at progression and alternate support ship types, maybe even giving ships special abilities that could be mass damage or healing shields, etc. On top of your current thinking, that would rock ;)
dislekcia
23-01-2010, 01:24 AM
After a chat to Fuzzy today in which this game came up, he explained that I'd tried to play it seriously while paused from start to finish... Doh.
Gave it another go and got to those buggers that have the yellow charge beam of death which pwned everything I had. If you were going to continue on this project, I'd suggest looking at progression and alternate support ship types, maybe even giving ships special abilities that could be mass damage or healing shields, etc. On top of your current thinking, that would rock ;)
BlackShipsFillt
08-02-2010, 03:18 AM
I've been fiddling with graphics a bit, nothing has changed gameplay-wise, but I'd really appreciate it if someone could give it a try and see whether the frame-rate is okay.
http://blackshipsfillthesky.com/astrocaptain/AstroCaptainExplosion1.png
http://blackshipsfillthesky.com/astrocaptain/astrocaptain.html
There is bloom and these explosion warpy things. You can press "G" to alter the graphics when you're in the gameplay scene.
If anyone could give me feedback on how it runs that would be REALLY awesome.
Squid
08-02-2010, 09:22 AM
It runs perfectly on my machine, but I have quite a powerful PC. Turning the speed up and madly clicking to spawn new ships is awesome. Similar to a fireworks show.
BlackShipsFillt
08-02-2010, 11:24 AM
Awesome, Thanks. It says it only takes 4 milliseconds each frame on my machine (250fps) so I reckon I have a little wiggle room. I figured out how to program distortion shaders so I'm kind of going nuts (see image above).
After I've fiddled a bit more I'll be totally rebuilding the ships. I'm feeling quite excited about the potential here.
dislekcia
08-02-2010, 06:32 PM
I kept spamming bombers, framerate was fine with... oh, I dunno, THIS many?
http://img442.imageshack.us/img442/4935/ships1.jpg
Noticed that the minimap would disappear under some of the player's ships with that much jostling, presumably they get moved up on the Z plane sometimes? Also, the explosion shader messes with the interface, time to do a two pass render? One for the action, one for the interface?
Finally, I don't think you should worry about the ships just yet, I suggest working on the control scheme and what the player needs to do. At the moment it feels kinda hollow, like it doesn't matter what you do as long as you don't die by wave 3. Give us some goals and some challenges. Maybe make pausing useful by giving ships abilities, ala Baldur's Gate type plan-making?
BlackShipsFillt
08-02-2010, 08:25 PM
Oooh... That is awesome. Thanks for the feedback!
Yes. It's looking pretty now, and seems to run okay, but it lacks purpose. I have an idea of what I want for ship abilities, but it means fundamentally changing the ships themselves. Once I've got the abilities I'll make a research tree the player can spend cash on. I think this may get closer to what you'd like out of it.
Also the waves of enemies are lame, I'm going to have to build a macro map of territories the player can explore. Also the points need to be decoupled from the cash.
There may be an overarching purpose/story once I've got the bigger map (like find your way to Earth, Galactica style... OR maybe base it on StarControl1) but I've got a fair bit of coding to do first.
First step (or rather the step most challenging/fun for me) is redoing the ships. And the controls (because with the special ships come special controls).
(Does anyone remember how StarControl 1 worked... ? I remember it being genius, but only vaguely recall it's mechanisms... I know it was short and replayable unlike StarControl 2)
Nandrew
08-02-2010, 10:59 PM
Right! I tried this out, and I must say that it ain't doing too bad considering the usual performance of my lappie. I get a steady 30fps, though when I get into heavier combat with about a dozen ships, it does start dropping.
I look forward to seeing what you can do with this thing. But then again, I look forward to all of your protos anyway. :P
BlackShipsFillt
09-02-2010, 12:26 AM
Thanks!
Did you try pressing "G" to turn bloom off (although I think on some cards it won't be on to begin with)... I'm busy making it a bit more complex so it is likely to run worse... but I am beginning to feel that I should ignore slower computers and focus on awesomeness instead. (apologies in advance)
BlackShipsFillt
09-02-2010, 12:47 PM
Happiness
http://blackshipsfillthesky.com/astrocaptain/AstroCaptainExplosion2.png
Still working on those features...
froogle
10-02-2010, 12:05 AM
Hey this looks interesting. Gonna give this a try soon.
Powered by vBulletin® Version 4.2.4 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.