It seems I was simply over-complicating collision detection. Since I am not checking for collision with anything but the object I have locked to the camera, there’s no need for me to create collision boxes for anything but the camera.
The first step was to save the current position of the camera
OLDX# = CAMERA POSITION X() OLDY# = CAMERA POSITION Y() OLDZ# = CAMERA POSITION Z()
The next step was to move the camera when a key was pressed. After moving the camera, I checked to see if there was collision. If so, move back to the saved location.
POSITION OBJECT 4900, camera position x(),camera position y(),camera position z() IF OBJECT COLLISION (4900,0) > 0 IF OBJECT COLLISION (4900,0) < 4900 POSITION CAMERA OLDX#,OLDY#,OLDZ# ENDIF ENDIF
And we’re done!
While this works, it’s extremely crude collision detection and if time permitted, I would use sliding collision, which gives a much more fluid motion as you move along walls. The way I have it written pretty much just stops the player on collision no matter what angle they hit the wall at.
With collision now working, I decided to revisit the Chart o’ Post-Its.
Basic Move and Shoot Controls – Done. Arrow keys to move, mouse to target, LMB to shoot.
Launcher – Done.
Projectile – Done. The projectile was scrapped as shooting was accomplished by creating a cross-hair that you move with the mouse and adding visual and sound cues when the selected mob was shot and destroyed.
Dungeon/Zone – Done. The layout of the map is complete, as are the objects in the zone. Still working on the textures as the biggest challenge is maintaining a uniform look to it all.
Original Code – Done. Still all original code. The tiny size and the simplicity of what I am writing makes the trial and error process feasible for identifying errors. So far, I have been able to figure everything out with the manual and the IDE’s help system.
Final Goal – Done. When all the mobs are zapped or when all the files are corrupted (i.e. – time runs out) the game ends… abruptly and without warning. Any type of audio/visual treat for success or failure is noticeably absent. While not needed for the challenge and not on The Chart , I’m considering adding it to the “Want to Do” column so that it is scheduled if there is free time at the end to do it.
Original Models – Done. Almost everything is a block of some sort so there isn’t any amazing 3D model wizardry here.
Reasonable Story – Done. The story will be in the email when it is submitted, however an Intro is still in the “Want to Do” column. If you can accept being inside a computer, running around and shooting blob-like viruses, then the story is one that’s reasonable enough.
Original Art – Done. So far we (my Wife and I) have been able to create everything we need without resorting to scanned or web graphics.
Music – Done. Background music is complete. It’s… well… listen for yourself: Ghostball Music
UI – Done. No buttons, no extras. Just a frame to hold the game name, messaging and instructions.
Gauge of Progress – Done. Both your progress and the timer are displayed on-screen.
WANT TO DO
Introduction - Not Started.
Instructions – Done. Instructions on how to play are visible on the user interface.