Sign in to follow this  
  • entries
    177
  • comments
    531
  • views
    163465

Escalation

Sign in to follow this  
Scet

77 views

Like a lot of people here I got plenty down during the down time. I restarted my "Escalation" project, a game using the Doom map format and using MD2 models instead of sprites. During the down time I switched the game to third-person overhead instead of first-person along with implementing state machine scripts and collision detection, something lacking from every project for the past year.

The game uses the Hexen map format and textures from the FreeDoom project, the models right now are from Quake2 so those will have to be changed. Right now I'm just working with a simple test level I made and sector effects aren't implementing, so it looks kinda boring.



Collision Detection

In Doom, the map is split into 128x128 "blocks" with each one storing all the lines the pass within it. Right now my program makes uses of this to speed up collision detection, although I may have to make my own since I've noticed it can leave out lines that lie right on the border between two blocks. Plus unlike the original Doom, I check the 8 blocks surronding the current one as well.



Wall collision is in place too. For example the player(the alien in middle) can fall off the platform, but not walk on to it. The player can also work up/down the stairs and walk under the "floating demon cube".

Object collision works by using bounding cylinders, with each object having a radius and height. Although it's not shown in the shot, I can actually walk into the railgun there and set it to the "PickUp" state.

State Machine / Scripts

My scripts for each object type are similar in concept to the format ZDOOM uses, although a little more verbose and easier to parse.

The player:

BeginClass Alien : Player 1
BeginProperties
Speed : 4.0
StepHeight : 18.0
Radius : 32.0
Model : INVADER
Skins : ALIEN
EndProperties
BeginState : Idle
BeginProcess
Frames : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Ticks : 8
Function : PerTick : CheckInput
EndProcess
EndState
BeginState : Walk
BeginProcess
Frames : 40 41 42 43 44 45
Ticks : 8
Function : PerTick : CheckInput
EndProcess
EndState
BeginState : Strafe
BeginProcess
Frames : 40 41 42 43 44 45
Ticks : 8
Function : PerTick : CheckInput
EndProcess
EndState
EndClass




The railgun:

BeginClass RailGun : Weapon 5012
BeginProperties
Radius : 32.0
Model : RAILGUN
Skins : RAILGUN
EndProperties
BeginState : Idle
BeginProcess
Frames : 0
Ticks : 4
Function : FrameStart : Rotate( 4 )
EndProcess
EndState
BeginState : PickUp
BeginProcess
Frames : 0
Ticks : 2
Function : ProcessStart : Print( "RAILGUN" )
Function : ProcessEnd : Stop
EndProcess
EndState
EndClass




Frames is just a list of frame indices in the MD2. I'll probably just change this to a range though. I might also strip all non-keyframe frames from the models and interpolate them in memory.

Ticks is just the amount of time for each frame, with each tick being 1/60th of a second.

Functions are just static functions in the program. There are five modes, PerTick, FrameStart, FrameEnd, ProcessStart and ProcessEnd.

Theme

This one I haven't decided one yet. With the current set of textures it's looking like the enemies will either be demons, zombies or robots. I can't model with a sh** so I might actually leave this up to the artist if I can get one, I think they like that artistic freedom stuff.

Right now I'm just going to keep adding more functionality, I'll worry about content later.
Sign in to follow this  


2 Comments


Recommended Comments

Very awesome stuff Scet. I'm really glad you're going for an original game (extra points for using your existing work on Doom.NET) rather than another Doom copy. I'm excited to see what you come up with! [smile]

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