2.09.2005

 

The physics engine

I had been thinking about this, and I think the best way to approach it would be to create the most generic physics engine we could come up with (no matter how small), and have it be a class. It would be either one instance for the whole game, or one instance per character. I think it would be better if it were one per game, to save space. Now the question is how would it work? Well let's ask ourselves, what do we need to implement?


  1. Jumping. Given the speed and strength of a character, I want a function that will be able to calculate determine the velocity given certain variables.

  2. Falling. Each cycle of execution the downward speed of the character would increase, depending on the gravity in the physics class instance.

  3. Knockback. Given the attacker's strengh and the defender's defense and bool isBlocking variable, I want to give the defender a nice knockback.


These are the most important things we want to do. How exactly would the class work? I would like it to work on pointers and not depend on other classes we have created. For example, say that:
PhysicsEngine* phys =
new PhysicsEngine(float gravityConstant, float wind, float dragCoefficient);


So then in the character's update function,

if(char presses jump button) {
phys->jump(speed,strength,&dy);
}

What we would then like to happen is that the character's dy gets a new float value, depending on the physics engine, the speed and strength. I think this seems like a good design for it. I will add all of this in more detail to the technical spec very soon.


2.08.2005

 

Stuff to do

It has begun. I have created the first version of the technical spec, which can be found here. The following is what each person is going to do, for now.



Todo:

Me: I'm going to layout the overall code structure, and the code loop,
all the sound/image structures, load them up, enum structures, etc.
I'm going to create the Menu and Title Screen as well.

Will: We need some kind of narrative. Can you create a story based on
the level layout we kind agreed on? (ship->beach->jungle->ninja town)
and the other way around for ninjas? You can insert random story bits
between levels, such as the pirate getting his hand chopped off by
some bad guys and being told not to bother them anymore. I don't know,
if you need help, ask. And of course, level design, etc.

Hugh: Coding. ObjectBase. For now we need a good setup of the code and
an overall structure for the commands, etc. We have to agreed on the
controls and etc and some other minor design stuff, but overall it's
all good. Do you think you can get this stuff done by 2/21 ? That's 2
weeks from now and would give us time to link everything together.

Eugene: Coding. AI. I think we should include a system similar to the
one in the second lab. I mean, Acquiring a target, having a function
such as bool CanHit and so on. I think a Finite State Machine like the
one in the lab would work very well. However, I don't expect you to
mark every single tile or any dumb shit like that. So for now, think
of a high level description of what we want and how different
difficulty levels would change this. Also, whenever you have time,
start designing the classes and so on. I'm sure lab2 can provide you
with tons of ideas.

Ethan: So we need art. A lot of it. I guess the prototype date would
be the Friday of week 6, which would be March 4th, I think. So, the
stuff we would need for the prototype, we would need it by March 1st,
just to make sure it loads, animation works, etc, and depending on the
results, tweak the code as necesary.


This page is powered by Blogger. Isn't yours?