Jump to content
  • Advertisement
  • entries
  • comments
  • views

Space combat prototype - phase 8

Sign in to follow this  


This week end has been overwhelming. Around 30 hours of work over a period of 3 days. But it was well worth it :)

The bad news is, i've missed this week end's deadline. There are a various amount of reasons for that, the main one being that i found 2 major bugs ( one in OpenAL, one in the networking ) and each required half a day to fix.

The good news is, the prototype is starting to look rather nice, or at least that's my opinion. My goal ( at least from a gameplay's point of view ) with it is to recreate the ambiance and fights of the old Lucasart game series based on Star Wars, X-Wing and Tie-Fighter. Of course, there is Newtonian physics, so it's not the same, but it's quite similar.

I've added 3D sounds and musics. For this, i used a generic interface ( ISound ) and its implementation in OpenAL ( IOpenALSound ). At the beginning i thought it'd be a 2 hours work, especially since i used OpenAL in the past ( but for smaller projects ). Unfortunately, i discovered the hard way that it was not as easy as i thought, and lost half a day on it.

The problem with OpenAL ( and my mistake for assuming it was ) is that it's not such a high-level library. I was expecting it to feed hundreds of 3D sound sources, and the library would automatically, based on the relative volume of each source, select the N closest to match what the hardware ( sound card ) is able to mix. Unfortunately, OpenAL doesn't do that for you, so after creating more than 60 sources, i started to get weird OpenAL errors, and it was impossible to create more sources. In the end, i had to implement an algorithm that scans all the virtual sound sources and map / remap them automatically to N pre-allocated "real" sources. Doesn't it sound like a lot of fun ?

I've added CutterJohn's frigate into the prototype, and played with many physical parameters, like its mass / inertia. This is a really nice ship. Very hard to control, but also very powerful ( it has MKII turrets ) and strong. But an easy target. I'm not sure if it's going to be a popular choice in game, as without assistance ( other players to defend it or to distract the turrets ), it's quickly dead.

JoeB sent in some updates for the battleship ( with better hardpoint placements, and updates in the hangar ). He also made a mine with a MKI hardpoint. In the prototype, this mine will explode when a ship comes close to it, or fire at a distance. I've yet to implement the explosions and shockwave effects..

I've finally implemented the teams concepts, so now each ship is given a team ( and mines are in the "neutral" team ). Each team knows its battleship, and a battleship won't attach you if you're in its team.

As far as networking goes, i've implement smooth interpolation for the turrets orientation, and interpolation for the orientation of ships. I think there's still a bug in that code since sometimes objects ( on the client side ) start to spin like mad, but hopefully i can easily fix it.

I've implemented the concept of "spawn zones" for each battleship, so that when a player enters in game, his ship is spawned on a docking pad inside the hangar of the battleship. Handling bounding boxes from world space back and forth to battleship's space.. lots of fun ( or lack there of.. ).

Betelgeuze did some minor work on the H.U.D that Starbrow had started. It's not perfect, but for the moment it'll do the job. The H.U.D. is the main thing to finish right now. I'm displaying a small "info" window on the bottom-right of the screen, that will contain a 3D view of the entity you've selected. You can scroll all the entities by pressed the "T" key. If you are targetted yourself, you get a back / mirror view of what's behind your ship, if the camera is in first person mode. It was easy to implement and it's quite nice..

Finally, i've fixed a bug in the network protocol. I won't enter into details, but i lost a couple hours today, and it was due to a packet that arrived out-of-order, but was not "remembered", so when another copy of that packet arrived, it was delivered again. Two messages for the price of one.. that was not expected, making the client crash.

The release date for the prototype is now Sunday 7th May, at 3 PM GMT. Unless a major accident happens, this should be the last delay, as a week should be plenty enough to implement the last features and "polish" everything. Get ready!
Sign in to follow this  


Recommended Comments

Have you thought about using FMOD for your sound? I'm using it in my game at the moment and so far it's been excellent. It handles all the mapping of voices and allows loading in of heaps of different audio types. It's a lot higher level than OpenAL and has some excellent pricing points.


Share this comment

Link to comment
Unfortunately, FMOD isn't free for commercial products. For that, one must obtain a liscense, which, at the cheapest for this sort of project, would probably be around 3000 USD.

That'll be handy to keep in mind, though - that OpenAL thing. I've had some problems, due most likely entirely to my ineptitude, but at least I won't be as stumped if I ever encounter that.


Share this comment

Link to comment
Hey, if you're not having much fun with your project right now, you should consider working on the explosions next -- or some other cool eye-candy. Always works for me :)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!