[quote]The other font is of course Impact, which is the same as Q3A I believe.
[/quote]
Did you put the font in a texture, or do you have another cunning way to display fonts?
erikd, texture is the best way IMO… 8)
Failed completely to tackle the laser effect. Instead I put some lovely extra particle effects on the gidrah’s bullets. Avoidance tactics or what? Also did a couple of new sound effects. The player res-in sound effect nearly makes my ears bleed though so I think that’s going to have to change, and soon :-/
Got a support ticket open for the aforementioned niggle.
Oooooh! I’ve just finally read the docs for Jet and it’s tweakmaster’s heaven! I can turn off array bounds checks and null pointer checks! I can tweak the GC so it only runs in teeny bits! etc. I’ll have a go with them when I’ve finished with the score panel.
Dmitry, I haven’t so much as even noticed a single GC pause anyway - not even one solitary dropped frame - but then I’ve written the game cunningly so it does very little allocation in the first place Alien Flux runs smoove as glass 100% of the time at 60fps. The things it does allocate are relatively long-lived things, such as gidrahs* and particle emitters. I might possibly try making particles dynamically allocated too.
For my next game I’m going to experiment with doing a little bit more dynamic allocation to see if Jet can cope with it properly. The Hotspot JVMs aren’t ideal in this respect yet because the default collection policy is not to use incremental and concurrent collection, and what’s more, enabling both of these causes a fairly noticeable performance degradation.
Crunch time is upon me, as far as a crunch can go when I’m only trying to get an alpha demo out and I’m working for myself without some arsehole in a suit breathing down my neck. Right now I’m drinking a bottle of wine. Ah, life is hard.
Cas
- If you’re a reet hard bastid of course they should all be very short lived objects!
The font code I use is from SPGL (of course ). I pre-render them at development time into textures and make a note of the kerning and offsets etc. It’s a wicked bit of code even if I say so myself. The end result is as high-quality as a Java2D rendered font - and Java2D has the best font renderer this side of the Mac - but about 50x faster coz it’s piped through OpenGL.
Except I’m rendering each letter as indivual quads, using glVertexf(), which ain’t the fastest way to do it… but the number of letters on the screen is trivial compared to all the other stuff going on and just gets lost in the grand scheme of things.
Cas
The score panel lives! After much fiddling with pixel coordinates. And this is what it looks like:
http://www.shavenpuppy.com/xap/screenies/scorepanel.jpg
Enough room for 8 lives, 8 smartbombs, and 99,999,999 points… if you’re hard enough
With that out of the way I promise to tackle the new laser tonight.
I need to make emitters chain as well. This means that an emitter can replace itself with another emitter when it expires. There’s a few particle effects which need to finish with a “bang”, like fireworks; after one lot of particles for the firework we need a pop at the end, using a different lot of particles.
Cas
Coolness… 8)
Got a nice sample from the Cure (The Walk remix) for the player beamin noise - the same as in the original Xap - except now in 16 bit. Lovely. My ears no longer bleed. The beamin is now only 2 seconds long though, so you don’t get long to position yourself. Got to keep things hectic.
Put in some more powerups, although there’s no graphics yet so they’re just using the smartbomb powerup as a placeholder. Powerups appear randomly here and there on a level. They don’t move yet. I was thinking about having them waft around randomly or something. The new powerups are the laser autofire (makes it go from slow, to fast, to ultra-fast) and laser powerup (the next laser up is bluer and fatter; tha biggest laser is quite fat indeed and a lurid purplish white). There’s also a shield powerup but I haven’t really decided how it’s going to work yet. It currently just increases your maximum shields by 50% and recharges it fully, which is a bit boring, but conceivably very welcome on the later levels as it only lasts about 2 seconds - and less than that when you actually take damage.
Chaz has done a new Tringle that only needs 10 frames of animation instead of 32, which is a nice little saving. He’s working on the Z-Sphere and I-Sphere now because we’ve both gotten really bored of playtesting with the same four gidrahs every time…
…laser still mysteriously untacked…
Cas
Joined the gym today. It’s the first workout I’ve had since the evil PE teacher at school forced me to do it once a week, which means about 15 years of slovenly laziness have passed in the interim. Nearly killed me! Still, I suspect that I’ll be increasing personal energy levels somewhat over the next few months and that means I’ll be able to devote more concentration to programming. The real reason though is so I can eat as much as I like without turning into a fat bastid.
Brian and I have been experimenting trying to get A.F. to run on his swanky new ATI card. Unfortunately A.F. insists on getting a 60Hz display mode (or less), and Brian’s ATI card seems to insist that it’s only got 75Hz modes, even though we know better. It turns out that it divides its display modes into two display devices, inexplicably, and the default one, which LWJGL queries, only has the 75Hz modes in. It’s bizzarre and a bit stupid to say the least but it’s not ATI’s problem any more, it’s mine So Brian’s found a fix for it which we’re trying out tonight.
Wooo! Chaz has finished the “Z-Sphere”! When shot it splits into four little homing buggers which should keep your trigger finger happy. I suppose I’d better write the code for it!
Discovered a curious bug with the Tringles and Bubbles today. I was wondering where they’d all got to, and then I found them all huddling around the bottom left hand corner of the battlezone like a herd of special patients that have escaped from the mental hospital. I gave them a quick laser lobotomy and I’ll be investigating the brains of the corpses in a bit to try and determine the reasons for their strange behaviour.
…well, if it isn’t a new laser! Oh. It isn’t…
Cas
Chris Melissinos has offered to show Alien Flux at GDC next Thursday! All hands to the pump etc. Chaz has to get a website up for us.
Chaz has delivered the new Cube of Doom gidrah to my CVS today. Unfortunately it looks a bit like a deadly Christmas present. More work needed The code’s all done for it though, as it uses the very same code as the Tringle. It’s just a bit faster and meaner, and it takes two hits to kill it with the standard laser.
Chaz also updated the Z-Sphere with a slightly nicer graphic. It looks remarkably like four cannonballs in pink jelly.
I’ve got a to-do list as long as my arm:
[] Shields sound effect
[] Richochet particle effect & sound for when the Cube of Doom is hit
[] Z-Sphere explosions & sound effect
[] Bonus points sprite for when you rescue a Blob
[] Crosshairs instead of normal mouse pointer
[] Fix a bug where the exhaust trails don’t get removed
[] Powerups are not persisting between levels - you go back to square 1
[] Better exhaust trails needed
[] Roving Eye code
[] Help screen
[] About screen - need to plug Shaven Puppy to the punters at GDC
[] Remove registration screens for now
[] End-of-level Blob count animations (this is a long running one…)
[] Chained emitters & extra effects for res-in / explosions
[] Background graphics code that works for older 3D cards like TNT
[] New laser
[] Various fixes to debugging commands which cause the game to crash
[] Longer levels: more gidrahs, more waves
[] Shorter time between waves
[] Gunner to arrive a bit sooner
[] Tart up the title screen
[] Fix a bullet bug: bullet fires but sprites don’t appear, only the particle effect that trails it - most odd
[] Override some particle code to prevent particles going missing. Maybe just remove the code that scales down the particle effects for slow machines. Or define which ones are affected in XML.
[] Roving Eye graphics
[] New smoke graphics (it’s crap; you can tell I did it)
[] Pink jelly particles for the Z-Sphere explosion
[*] Fix a glitch with particles that makes them appear at 0,0 for 1 frame
Cas
Chaz showed me the prototype for the Roving Eye - it’s brilliant (of course)! Looks like a sort of cyborg hand made from jelly and metal. You can see there’s a jelly theme in Alien Flux now
Went to the gym today again. Knackered.
Stuff done:
[] Shields sound effect - not in the game yet though
[] Z-Sphere explosions & sound effect
[] Crosshairs instead of normal mouse pointer
[] Fix a bug where the exhaust trails don’t get removed
[*] Better exhaust trails needed
Tried some experimental work on a GLVertexBuffer class that would handle the optimal way to draw triangles for a given 3D card given a buffer of data - unextended, EXT_compiled_vertex_array, NV_vertex_array_range, NV_vertex_array_range2, ATI_object_buffer - but I’m not sure it’s worked out cleanly.
In the end I’ve just specifically coded A.F.'s two main rendering parts - the sprite engine and background renderer - to use nVidia extensions if it can and otherwise try for EXT_compiled_vertex_array. I’ve still got to write a code path that works for cards without ARB_texture_env_dot3, which means TNT, TNT2, and the older ATI range etc. I’ll do this with a simple lighting attenuation hack which will still look quite nice, just not as good.
Cas
Aaargh! Shit! Chris meant today not next Thursday! :o GDC ends on Saturday! So I rooted around for his phone number… and got a message on his answering machine saying he was away at GDC and unable to answer calls! Aaargh! Followed by another bit that gave his mobile phone number in an emergency! Hooray!
So I called him up at what turned out to be 3:30am or something for him, thinking to leave a message on his mobile while I FTP’ed Alien Flux over my suddenly very slow feeling ISDN connection. And guess what, he’s actually still awake and got no plans to sleep ;D Yes, like a naughty schoolboy, Chris is still doing his presentation slides
Well, he’s got Alien Flux now and it worked a treat on his laptop. Except for one small snag which is the laser collision detection is a bit out and you have to be rather too accurate with it. I’ve fixed it now and I’ll upload a patch to the FTP and drop him a line later.
He’s also showing, amongst a bunch of other stuff, erikd’s game, and that ancient terrain demo of mine. Hopefully my name will be sprinkled about liberally to rich industry types because my contract has just ended and I’m very shortly to be ultra-skint again
Charlotte’s had a great idea for A.F. - the “Golden Blob”. If an individual Blob survives for an entire 4 levels it becomes a Golden Blob, which will give it some special decoration - probably some twinkly stars around it or something. From that point on it’s worth 1,000 points when rescued from a Bubble instead of the usual 500, and it’s also worth 1,000 points * level number thereafter for every level it survives instead of the current 100 points * level. I might give the Blobs unique names too to add to their cutesy factor. Hover the mouse over a Blob and its name will appear next to it
Right then, Chaz is on with the emergency website, and I’ll get on with eating some pasta. Then I’ll tackle a few more bits.
Cas
No news of Chris at GDC. Sun appear to have a very low profile this year. Perhaps if things work out I’ll actually go along next year with my plethora of Java games and tout my wares to unsuspecting Californians. Of course I might be living inside a wet paper bag outside Bridgwater sewage treatment works surviving off discarded pot noodles by then because the contract market is dead as a dodo. (Go and see http://www.jobstats.co.uk for the bleak situation).
What better incentive than to get Alien Flux finished, eh?
Today I put labels in the game, a new battlezone feature. Labels are just bits of text that I can bring up on a whimsy and float about the screen. Of course I immediately abused the feature. It was originally to display bonus points when you rescue a Blob from the clutches of a Bubble (and indeed that’s what it does) - but now I’ve only gone and given the Blobs cute little individual names! Say hello to Eeny, Meeny, Miny, Mo, Weeble, Wurble, Fliffles and Bob! Hovering the nice new crosshairs that Chaz has drawn for me over a Blob now pops up a little label to tell you who it is Isn’t that sweet? So don’t shoot them, all right? Now they’ve got a soul.
And bugger me but I’ve only gone and put the new player laser in! Now rendered with merely one sprite and a line, it looks very nearly as good as the old laser but requires a vast amount less memory, a vast amount less sprites, and after fixing the bug in the collision detection routines yesterday, it requires considerably less processing time.
I’ve updated the SPGL Bresenhams class to have an iterative use now; eg. you set it up and can then call next() on it every frame to gradually plot your way from A to B. Previously you had to pass in huge integer arrays which it would populate all in one go. Apart from being a big old waste of memory it was a small but subtle performance win, as there is basically no need to work out the entire path of a moving thing in one go unless you’re drawing lines. And that’s something I leave to OpenGL.
Had a great ride for the first time today on a proper blood horse at John Honeyball’s today. What a difference to a manky old cob! It was like getting off of a crappy Kwack GT550 and onto a ZX9RC. You bikers out there will know what I mean Twitchy, nervous, very fast, and exciting. Shame it hailed and blew a gale all over us but there you go.
Stuff Done
[] Bonus points sprite for when you rescue a Blob
[] Powerups are not persisting between levels - you go back to square 1
[] Roving Eye code
[] New laser
[*] Various fixes to debugging commands which cause the game to crash
Cas
A day off.
Cas
Charlotte said my cute Blob names weren’t cute and changed them all : Chaz likes the new laser but it’s not very colourful any more, so I’ll be adding a tinge of colour to it in a bit.
I really ought to have a good long hard look at the title screen now and start thinking about renovating it. It needs Java, OpenGL, OpenAL, Jet, Sourceforge, and Eclipse logos on it to show where my affiliations lie, some copyright blurb, an About screen, a Help screen to tell you what to do, and some options.
The options screen has got to: select between 16 and 32 bit colour - 32 bit really does look a lot nicer; set the sound volume; and … er, that’s it. I don’t really see the point in redefining the keys because there are only two of them. Swapping the mouse buttons might be a handy feature though. Which reminds me - I must wire the smart bomb up to the middle button.
I’ve noticed a couple of nasty slowdowns recently since I put in the frame-rate limiting code for Brian (his monitor claims to run at 60Hz but in fact it’s doing 100Hz). Hm.
Stuff Done
[] Blob end-of-level bonus animations are in at last
[] Player’s shield now replenished on death
[] New smoke graphics, which look a lot better.
[] Longer levels: more gidrahs, more waves. More hectic, too.
[] Fix particle glitch
[] Shorter time between waves. Actually what happens is now then next wave will appear as soon as there are 4 gidrahs or less on the level rather than 2.
Cas
I made a seemingly trivial tweak to the blob end-of-level bonus animation screen, which was that after the blobs are finished rezzing out it automatically skips to the next level instead of waiting for a mouse click, and the game crashes. Rather annoyingly it crashes in a disconnected way - a Sprite in the SpriteEngine had no image, and gets an assertion error. Of course, once a Sprite has been allocated and imageless there’s no way to tell who or what allocated it and what it was meant to be drawing!
So I’ve given every Sprite an owner now, rather like SoundEffects. To allocate a Sprite you have to pass in this owner which will be displayed when the sprite is toString()ed. And so I discover it’s a cute Blob sprite, which has an animation but has not yet been ticked, so it has no image. Solution: when setAnimation() is called on the Sprite it is set to tick=-1 and then ticked immediately, which automatically does the first frame for us. Beats me why I never fell over that one before.
Looking at my to-do list, which is now only 11 items long, I fancy doing something a bit more fun tonight, so I’m going to put the screen shaking and stroboscopics back in. Both of them will probably look a bit strange on my LCD display…
Stuff Done
[] About Screen - nice scrolly message
[] Screen shake
Cas
Today was my mum’s 50th birthday, so I rode 350 miles to go and visit her in Durham. The 1150GS suffers from pretty bad turbulence past the screen so I was pretty knackered by the time I got there. 5 hours of having your head shaken by a rottweiler is a tiring experience. Several days off ensue.
Cas
Chaz has redone some of the graphics whilst I’ve been away. The smartbomb now looks a bit less wobbly, and the cute furry blobs are even cuter and furrier. He added a glow which unfortunately makes them look like I’ve got vaseline smeared on my monitor, so that’s got to go, I think.
Smoke’s also been redone by Chaz and it looks really good, but unfortunately it’s twice as big so it uses four times the fill-rate and we’re getting a bit of slowdown when the player explodes (which generates more smoke than anything else). Might have to either shrink it or reduce the amount of smoke.
Cas
Took the game round to the in-laws to test it out on my brother in law
The Options screen is now in. Currently this lets you adjust the sound volume using a slider and it’s got two checkboxes, one to use 32-bit colour for those of you who have faster graphics cards and one to use bump mapping. Bump mapping is only available on newer (GeForce) cards and will automatically fall back to plain lighting attenuation if the ARB_texture_env_dot3 extension is not available.
It was a right bugger getting the 16/32 bit option in. In order to change display depths you basically have to unload everything you’ve loaded like animations and textures etc, close LWJGL down, recreate the display, and load everything back in again. It was a time of access violations, JVM crashes, and general frustration. I could have gotten all clever and tried to get away with replacing only those bits affected by GL being destroyed but it got fiddly, and I’m not prepared to spend another week on it, especially for a checkbox that might get used only once or twice ever. Got it working at 2am.
Cas
I released A.F. into the wild last night, to a select few unfortunates on the forum trying out that daft chat client and some of the hardcore shooters at Llamasoft.
There’s a few overwhelming bits of feedback:
-
It doesn’t seem to work on Win98SE. This appears to be a LWJGL problem, as the code is pretty much definitely sound on Win2K and WinXP so there’s some funny OS specific weirdness going on with display mode selection.
-
It’s far too difficult! I suspected as much. I, of course, am really good at it. I either have to tone down the difficulty or add a training level or something. Once you’ve played it about 20 times you suddenly get the hang of flying the ship and it all comes together.
-
It seems to be popular ;D
In the end I decided on rather than doing a pure training level, the first level of the game only consists of four waves of Bubbles, and the Jellies they produce move at minimum speed. I might even slow the Bubbles down a bit too. Actually Charlotte decided that was what we should do. Charlotte also thinks I should slow the Jellies down for the whole of the demo. Not sure about that. Maybe I’ll ramp the difficulty more carefully.
Another problem is that the 16/32bit switch seems to fail when compiled with Jet. The game crashes, but when it’s restarted at least it’s changed display modes.
If anybody’s got any bright ideas by the way, I’m all ears.
Stuff done
[] Fixed sprite Y-sort bug. It was the wrong way round and no-one noticed…
[] Explosion particles bug. Some of the particles just stayed still and never moved
[] Blob name alignment was offset to the right. It didn’t work so now it’s in the middle again.
[] Blob names would sometimes dissappear and not come back.
[] Smartbomb explosion radius has been shrunk to 450 pixels.
[] The training level
[] The Blob Powerup now spawns a Blob when you pick it up
[] Golden Blobs are now implemented. If a Blob survives 5 levels it’s suddenly worth 10x more points. So keep it alive!
[] A level strap line now scrolls up the screen at the start of the level. A nice little touch.
[] Res-in speed for Blobs on the end-of-level screen has been speeded up.
[*] Fixed a bug where if you simultaneously died and killed the last alien we’d get an assertion error and the game would crash.
The To-Do list, however, never seems to get any shorter:
[] Fix sound problems on level begin
[] Chained emitters & extra effects for explosions
[] Bonus colours are shit
[] Sounds for end-of-level needed
[] More colourful lasers
[] Options screen needs redefine keys thingy
[] 2 seconds invulnerability on respawn
[] Scroll around with the mouse during player res-in
[] Reduce animation frame count on a few things to save some space
[] Cubes of Doom need their new Borg-style laser
[] Help screen
[] Cool targeting computer effect when a Bubble attacks a Blob
[] Homing Rockets powerup
[] Whizzing Orbs powerup
[] Make a few more powerups appear - they’re a bit rare right now
[] Golden Blob sound effects
[] Golden Blob sparkly halo
[] Non-bumpmapped renderer
[] Fix Win98 woes
[] The Boss Gidrah
[*] Tart up the title screen a bit
Cas
hey cas good news ;D
Fix Win98 woes
done =)
it’s working now
add this line to your readme:
“detonator 30.82 or higher required” :>
[i modified the resolutions of that driver too (copy&paste) therefore i think that wasnt the issue before.]
well i still dont know why the lwjgl examples worked with the older drivers but your app didnt :]
oh and it still says: “This application requires a greater alpha depth.”
-the speed of the game is surprisingly high (around 60fps i think)
-sounds r great
-sprites r sweet - gg Chaz
-there is a (filled) rectangle (quad) around the buttons on the title screen, wich changes it’s colors… dunno but it looks like it wasnt supposed to be there or to look like that ._o
-add a swap buttons option
-accel=lmb, fire=rmb, smartbomb=space… that’s it or have i missed something? (just played again… shield=shift - first time i survived level 1) :>
-it’s quite hard especially cuz the enemys fire on the place where u’ll respawn… the mentioned “2 seconds invulnerability on respawn” should do the trick
hmm… maybe it’s a good idea to add some hinting arrows, wich shows where a “furball” got “eaten” by a bubble (if it’s not on the screen)
and i guess it would look nice if the shadows (of all objects) get shifted accordingly to the position of your ship