Treasure Tomb Development Diary

22 July 2007

“Agile programming” seems to be all about periodically refactoring everything in order to move ahead to the next stage and get something working in a matter of weeks.

Of course, being a hardcore hacker, I refactor everything and expect it to work in a matter of days :slight_smile: Today is a refactoring sort of day, nursing as I am another hangover from a drinking competition between myself and my pseudocoisin Amy last night. Neither of us lost but poor auntie Mel is terribly sick today. Worse luck, it’s Bob Burroughs’ 33rd birthday bash tonight in Newcastle and he’s already booked Monday off work in anticipation of incredible sickness. Bob went to school with Chaz and me back in the 80’s. Chaz went on to do arty stuff; Bob does musicy stuff. Bob might be doing some of the music and sound effects for Treasure Tomb.

Anyway, refactoring.

Not very exciting to read about unfortunately. But the gist of it is this: I realise that if the player is going to be pushing crates around, then the crates are going to need pixel based movement too. So all that code I put into the Player class is now going into an abstract base class called PixelBasedEntity and both Crate and Player will extend it. Thrilling stuff I know.

Music: Cypress Hill - Skull & Bones

23 July 2007

The refactoring continues. I’ve perhaps unwisely made the gidrahs pixelbased too now. Many headaches. Player can’t now walk through turrets which is good. Still no crate pushing or collision. Gidrahs keep getting stuck on each other. Bah. And this is after a night out with Bob. I don’t feel too good.

Chaz has done me ladders and a hole, which are “teleports” except they are instantaneous (no beamout / beamin). Not many more tiles needed now for the moonbase tileset.

I’ve been thinking about the map, which is huge. I might have to outsource bits of it to the community.

Music: Cypress Hill - Skull & Bones, Ninja Tunes Xen Cuts

24 July 2007

After what feels like the biggest refactoring operation ever, I’ve finally gotten crates to move correctly when pushed, and gidrahs to wander around without bumping into each other. Gidrahs no longer walk over each other and get stuck. One problem was that when they spawned on top of each other they couldn’t move, so now I check that the spawner has no gidrah within a square of it.

I’m in two minds as to whether to make gidrahs obey floor arrows. Might be amusing. What do you think?

I’ve tweaked the way the player aims. Now, if you hold the fire button down and you get a lock on the nearest gidrah, that gidrah will remain locked on until it is destroyed or you release the fire button. The player can no longer shoot when a ghost either. Only fair.

Oh, and we’ve got exploding crates now! Yay! Always good for some chain reaction fun. The gidrahs have gained hitpoints as well and will take several hits to kill. This makes up for the poor things being rather easier to shoot than before. Exploding crates are not replaced by the tile reset switch.

Chaz has done me an ice tile but I haven’t put it in the game yet. Also he’s monkeying with the gamma correction - I can hardly see some of the tiles and it all seems rather dark to me. It turns out Chaz’s gamma is turned up considerably more than my default Nvidia settings. We’ll see the results tomorrow.

Please test away and check out the lovely new pixel movement and crate pushing fun and gidrah pwning.

Music: Amon Tobin - Remixes and Collaborations, Amon Tobin - Foley Room, Blur - Leisure, Dandy Warhols - Odditorium or Warlords Of Mars

(Er, and there is an invisible crate reset switch nearby the turret in the room on the right - you can’t push crates onto it. Not a bug ;))

Cas :slight_smile:

Excellent! Although the change in behaviour in regards to when you begin shooting while standing still can hinder gameplay. I would prefer a gunstar-heroes / probotector style choice before where it is either one way or another.

Does this work with a controller, if so I will bring in my ps2 controllers and play it properly. My fancy keyboard design is perfect for typing but doesn’t work so well for gaming

It works with my Saitek. And you’re right, there’s not really much use in the pivot function now the gun aims for you, so I think that will go.

Cas :slight_smile:

One question, will you be implementing a leader board, like where you can see the highest scores online :stuck_out_tongue: ::slight_smile:

It’s already starting to be fun :slight_smile:

I’ve one little remark about the controls though. I remember from a previous post that you added a small delay between keypresses and movement. I think I’d get rid of that myself, the controls just feel a bit laggy now.

All Cas’ games have that feature :smiley:

[quote=“erikd,post:68,topic:30245”]
I know ;D I’m currently at the top 8)

I’ll tinker with the delay - might remove it if it’s better that way. As it is though it enables you to turn and face in a different direction without moving. Currently the delay is 4 frames (65ms).

Don’t get too excited about the hiscores table coz it’ll get vaped regularly :-X

Cas :slight_smile:

Oh yeah, check your certificates; Aeon Flux and some others are not running as .jnlp’s because of differing certificates

Will do at some point. Can’t build Flux at the moment.

25 July 2007

Removed player pivoting, which is now no longer relevant with the auto-aiming feature. Changed start moving delay to 35ms (2 frames). I’ve noticed something very slightly annoying when stepping on arrows - if just one pixel of your bounding box steps on an arrow you are effectively hooked onto it but unless your dead centre is on the arrow the arrow itself doesn’t have any effect. I expect that will require a bunch of hackery and bodgery to fix but I’m leaving all that alone today to make improvements to the map editor.

Stuff done to the editor:

[] Page Up and Page Down on the tile selector screen now flip the pages as expected
[
] Holding Ctrl down and clicking in draw mode on any tile other than an action tile will instead pick up that tile to draw with.
[] Asynchronous load and save and exception handling (also for New Game - can take a few seconds on older computers and laptops to load the map!)
[
] You can now type in the name of the map you want to save and load! The maps are stored in the your user home folder unless you give them a full path. This means you can finally experiment with your own maps. The last map saved or loaded is the one that is used in the game. Don’t forget to toggle all your switches to the correct state before you save (Ctrl-click).

Had fun writing all sorts of crazy asynchronous stuff and dialog boxes and message boxes and so on. Once again it just makes you appreciate how good Swing is at this sort of stuff.

Music: Ween - Quebec, Dire Straits - Brothers in Arms, Various bits and bobs, Dr Phibes and the House Of Wax Equations - Whirlpool (yes! Took me ages to track this down)

Re-upload, or are you currently uploading at this very moment!

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
	at net.puppygames.applet.Launcher.main(Launcher.java:67)
	... 9 more

Sorry, forgot to upload it - it’s there now. My apologies in advance for the appalling dialog boxes etc.

Cas :slight_smile:

There is a bug now.

http://www.myjavaserver.com/~captainjester/treasure.gif

The switch doesn’t work in this room anymore. I cannot get out.

Whoops :slight_smile:

Cas :slight_smile:

Vacation? :wink:

Yup. Back to work on Thursday.

Cas :slight_smile:

16 August 2007

Normal service is resumed!

While I was away on holiday Chaz has done a lot of the nice little tweaks and finishing touches to bits of the game to make it look more “finished”. We’ve now got proper player lasers, enemy lasers, particle effects, gidrahs, obstacle tiles, and a new improved HUD. Unfortunately he’s not done lava and toxic waste yet.

I put ice in this afternoon. Slightly fiddly but all working fine, even with arrows laid on top of it. Ice prevents the player from changing direction once he’s started moving over it. I should be able to come up with a few good puzzles based on ice and arrows.

I’ve been thinking about the design of the game a little, and in particular the level layout and concept. I have a horrible feeling that a massive 1024x1024 map is just too bloody big for me to cope with doing. I think what I’m going to do is split the map up after all, into much smaller chunks, accessible from a “hub” level. The hub will have eight portals in it. Each portal teleports you into a particular world. Every time you enter a world, you’ll get the next map along in that world, and its difficulty increases by one point. Of course to exit a world, you need to find the exit each time, wherever that may be.

This “new” design is actually much more like the original Time Bandit game from which we’re derived. The merits are rather obvious though… there’s a sense of progress and achievement in nice bite-sized chunks, and I don’t get daunted by having to design a massive map. I can cut the heap requirements a bit too, not that heap requirements is an issue really. I suppose this will make it easier to make a demo out of the game too - I could either limit which portals are available, or limit the maximum progress through each world, or both, or do neither and just rely on the demo timeout.

No build just yet… have to create a “hub” map and test moonbase maps.

17 August 2007

Tweaked player death slightly - when you resurrect now, it’s with 4 shields, to prevent tediously being killed seconds after resurrection again. There’s now a countdown on the HUD (needs beautifying slightly) and a panicky sound effect too.

Also noticed a bug that made the gidrahs have too many hitpoints (again). I prefer most things to die as soon as they’re shot.

Put tooltips in the tile chooser so I can tell tiles apart a bit better.