Collision success! … and an overview

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.

MUST DO

Basic Move and Shoot ControlsDone. Arrow keys to move, mouse to target, LMB to shoot.
LauncherDone.
ProjectileDone. 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/ZoneDone. 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 CodeDone. 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.

SHOULD DO

Final GoalDone. 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 ModelsDone. Almost everything is a block of some sort so there isn’t any amazing 3D model wizardry here.
Reasonable StoryDone. 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 ArtDone. So far we (my Wife and I) have been able to create everything we need without resorting to scanned or web graphics.

COULD DO

MusicDone. Background music is complete. It’s… well… listen for yourself: Ghostball Music
UIDone. No buttons, no extras. Just a frame to hold the game name, messaging and instructions.
Gauge of ProgressDone. Both your progress and the timer are displayed on-screen.

WANT TO DO

Introduction - Not Started.
InstructionsDone. Instructions on how to play are visible on the user interface.

This entry was posted in Diary. Bookmark the permalink.