Character Model and Collisions
3 posters
Character Model and Collisions
Hello.
Let's say I have a model of a human being. When this is turned into physics by sio2, will it easily just fall over? I'm doing a fighting game, and I'd like to enable physics for the ground/platforms. Is the integrated bullet engine a good idea for this type of thing or is this something better done on my own?
Let's say I have a model of a human being. When this is turned into physics by sio2, will it easily just fall over? I'm doing a fighting game, and I'd like to enable physics for the ground/platforms. Is the integrated bullet engine a good idea for this type of thing or is this something better done on my own?
hemmi- Posts : 15
Join date : 2009-08-27
Re: Character Model and Collisions
Creating a fighting game is no pic-nic... Hope you have the full game bible ready and the concept art done... instead you'll have HUGE problems along the way...
Except that for the bullet part... I would do some test before starting your player engine... as will as for the AI...
Except that for the bullet part... I would do some test before starting your player engine... as will as for the AI...
Re: Character Model and Collisions
Thanks for the input
I will definitely run some tests. It seems I have the choice of creating the player as a real mesh within the physics, or as a cube or something more primitive. The only problem is that it'd have to align right with the model so that the player's feel are touching the ground when the bottom of the cube is touching the ground. Given that hit detection is very unrelated to real physics, is it overkill to define the player in terms of real physics? I'm really only after jumping / collision detection for the ground and platforms. The calculation for a player hitting another is based on player distance, not real physics.
I will definitely run some tests. It seems I have the choice of creating the player as a real mesh within the physics, or as a cube or something more primitive. The only problem is that it'd have to align right with the model so that the player's feel are touching the ground when the bottom of the cube is touching the ground. Given that hit detection is very unrelated to real physics, is it overkill to define the player in terms of real physics? I'm really only after jumping / collision detection for the ground and platforms. The calculation for a player hitting another is based on player distance, not real physics.
hemmi- Posts : 15
Join date : 2009-08-27
Re: Character Model and Collisions
For a traditional fighting game (like 2 player against each other) I don't see where can be a problem as long as you keep the characters below 1500 polygons.
Re: Character Model and Collisions
I guess with that I'm just worried about a player falling over. But I guess I'd still have that problem anyways. I'm starting to realize that I can use bullet to restrict rotation. Thanks for that fast help
hemmi- Posts : 15
Join date : 2009-08-27
Re: Character Model and Collisions
While we're on the subject of fighting games, is a use for lua typically something like performing game logic? Could I code the better part of the "fighting logic" in lua? From what I've heard, lua is pretty quick.
hemmi- Posts : 15
Join date : 2009-08-27
Re: Character Model and Collisions
I always suggest to implement the logic in c... Check the source of backyard war for more info about how to use LUA inside a real game scenario...
Re: Character Model and Collisions
I have used LUA for specific level logic and I have to say that it performs really well - can't really tell the difference versus C but of course I'm not over-using it.
It is always a matter of trade-offs and not abusing some mechanic / technic- for instance, you would not want to code everything in LUA but you can certainly code quite a fair amount of game logic, especially if this last one is specific to a scene / level.
From the LUA performance tips paper:
www.lua.org/gems/sample.pdf
Basic facts:
Before running any code, Lua translates (precompiles) the source into an in-
ternal format. This format is a sequence of instructions for a virtual machine,
similar to machine code for a real CPU. This internal format is then interpreted
by C code that is essentially a while loop with a large switch inside, one case for
each instruction.
Perhaps you have already read somewhere that, since version 5.0, Lua uses
a register-based virtual machine. The “registers” of this virtual machine do not
correspond to real registers in the CPU, because this correspondence would be
not portable and quite limited in the number of registers available. Instead,
Lua uses a stack (implemented as an array plus some indices) to accommodate
its registers. Each active function has an activation record, which is a stack
slice wherein the function stores its registers. So, each function has its own
registers2 . Each function may use up to 250 registers, because each instruction
has only 8 bits to refer to a register.
Given that large number of registers, the Lua precompiler is able to store all
local variables in registers. The result is that access to local variables is very
fast in Lua. For instance, if a and b are local variables, a Lua statement like
a = a + b generates one single instruction: ADD 0 0 1 (assuming that a and b
are in registers 0 and 1, respectively).
SIO2 bundles LUA version 5.1 for what it's worth...
As always, you can always do some performance testing (prototype) to validate what you intend to do with it but I think you would be pleasingly surprised as how well it performs. Check with Shark as well.
I only use it for level(s) specific logic.
Cheers
--Franky
It is always a matter of trade-offs and not abusing some mechanic / technic- for instance, you would not want to code everything in LUA but you can certainly code quite a fair amount of game logic, especially if this last one is specific to a scene / level.
From the LUA performance tips paper:
www.lua.org/gems/sample.pdf
Basic facts:
Before running any code, Lua translates (precompiles) the source into an in-
ternal format. This format is a sequence of instructions for a virtual machine,
similar to machine code for a real CPU. This internal format is then interpreted
by C code that is essentially a while loop with a large switch inside, one case for
each instruction.
Perhaps you have already read somewhere that, since version 5.0, Lua uses
a register-based virtual machine. The “registers” of this virtual machine do not
correspond to real registers in the CPU, because this correspondence would be
not portable and quite limited in the number of registers available. Instead,
Lua uses a stack (implemented as an array plus some indices) to accommodate
its registers. Each active function has an activation record, which is a stack
slice wherein the function stores its registers. So, each function has its own
registers2 . Each function may use up to 250 registers, because each instruction
has only 8 bits to refer to a register.
Given that large number of registers, the Lua precompiler is able to store all
local variables in registers. The result is that access to local variables is very
fast in Lua. For instance, if a and b are local variables, a Lua statement like
a = a + b generates one single instruction: ADD 0 0 1 (assuming that a and b
are in registers 0 and 1, respectively).
SIO2 bundles LUA version 5.1 for what it's worth...
As always, you can always do some performance testing (prototype) to validate what you intend to do with it but I think you would be pleasingly surprised as how well it performs. Check with Shark as well.
I only use it for level(s) specific logic.
Cheers
--Franky
Francescu- Posts : 136
Join date : 2009-03-18
Similar topics
» collisions
» Using the bullet character controller
» model disappears when doing sio2ObjectSoftCopy
» One character to rule them all....?
» Character Animation - proposing a better way.
» Using the bullet character controller
» model disappears when doing sio2ObjectSoftCopy
» One character to rule them all....?
» Character Animation - proposing a better way.
Permissions in this forum:
You cannot reply to topics in this forum