next step: shockscript/physics integration

2 min read

Deviation Actions

shock-value's avatar
By
Published:
1.1K Views
i'm working now on the code that will glue the physics engine to the actual IB2 game logic. specifically at the moment i'm working on code that will allow the game to keep track of all the various entities that will populate the game, like boxes, balls, forces, pulleys, joints, etc. and allow these entities to be acted upon by user created scripts. this will allow the user to do things like:

exec
(set box1 (createBox 1.0 1.0))
(set box2 (createBox -1.0 1.0))
(set joint (createDistanceJoint box1 box2 2.0))

which will create two boxes in the gameworld and constrain them to always be 2.0 units away from each other.

it's really important that everything works with shockscript because, as i mentioned earlier, everything in the game ui will be built using shockscript.

when you, for example, pick the item "Add Box" and click to place one, what will really be going on behind the scenes will be a shockscript function call such as "(createBox xmouse ymouse)" [the real createBox will take more parameters, but you get the idea]. so anything you can ever do in the default ui can be done and extended by your own shockscript. and indeed i plan to allow the user to actually code his own ui elements with scripting in order to facilitate custom weapons, modes, etc (more on that later).
© 2008 - 2024 shock-value
Comments4
Join the community to add your comment. Already a deviant? Log In
erickthesonicfan's avatar
:iconusuckplz::iconweegeeplz:
XD something random.
I hope to play that game soon X3