So, I have continued to add script support to the engine and by now I can test a lot of gameplay features real quick by scripting them in Lua files and indirectly adding the functions to event-handlers. I have been playing around with the aiming algorithms, e.g. which angle and speed a ball shot from a certain position should have to hit a certain target. For you who remember high school physics this may seem trivial but there are a few things that complicates the calculations.
For instance, if you have drag/wind resistance involved you need to use a numerical step method and even without that, if you want to calculate the initial angle of the velocity you get 4 different results which you have to evaluate to determine which are the correct ones. A bit painful but I guess it has to be done. I haven't made my mind up about drag yet, I have to test the accuracy and speed of some numerical step functions first to see whether the feature is worth having or not. Unfortunately none on my current dependencies have built-in functions for handling this type of differential equation solving so I have to write my own specialized one.
Apart from that, most of the implementations I have done since last time have gone smoothly.
onsdag 17 september 2008
lördag 6 september 2008
Script Support
Hi there,
I'm slow on the update side but a bit faster working...
The last week I have implemented script support via LuaBind so now you can control objects and components via lua-scripts. The engine is still not fully binded and probably won't be, i.e. it will have script support for different parts so you don't have to register luabind functions for everything if you don't want to.
this is the first test script I wrote (for an 3d-aim controlled by the mouse). It works well btw :)
function handleMouseEvent(this, mouseState)
obj = this:getOwner()
cpos = obj:getCPosition()
pos = cpos:getPosition()
relX = mouseState.X.rel
relY = mouseState.Y.rel
x = -relX/50
y = -relY/40
xPos = pos.x
yPos = pos.z
if ((xPos + x) > 7.5) then
x = 7.5 - xPos
end
if ((xPos + x) < -7.5) then
x = -7.5 - xPos
end
if ((yPos + y) > 7.5) then
y = 7.5 - yPos
end
if ((yPos + y) < 0.5) then
y = 0.5 - yPos
end
cpos:translate(x, 0, y)
return
end
I'm slow on the update side but a bit faster working...
The last week I have implemented script support via LuaBind so now you can control objects and components via lua-scripts. The engine is still not fully binded and probably won't be, i.e. it will have script support for different parts so you don't have to register luabind functions for everything if you don't want to.
this is the first test script I wrote (for an 3d-aim controlled by the mouse). It works well btw :)
function handleMouseEvent(this, mouseState)
obj = this:getOwner()
cpos = obj:getCPosition()
pos = cpos:getPosition()
relX = mouseState.X.rel
relY = mouseState.Y.rel
x = -relX/50
y = -relY/40
xPos = pos.x
yPos = pos.z
if ((xPos + x) > 7.5) then
x = 7.5 - xPos
end
if ((xPos + x) < -7.5) then
x = -7.5 - xPos
end
if ((yPos + y) > 7.5) then
y = 7.5 - yPos
end
if ((yPos + y) < 0.5) then
y = 0.5 - yPos
end
cpos:translate(x, 0, y)
return
end
fredag 22 augusti 2008
Well..
lördag 22 mars 2008
tisdag 18 mars 2008
söndag 10 februari 2008
Busy
I guess you've noticed the lack of new posts here...and I'm sorry to say that it is because nothing has happened since last time really. We've been busy in school and haven't been able to work on the project.
Yesterday I started building the OddEditor which will be capable of building levels as well as GameObjects and handling animation etc. (These features may come in separate editors though.) We're using wxWidgets for the GUI of the editor and everything has turned out great so far. No pictures to show you though, I'll get back as soon as I can.
Yesterday I started building the OddEditor which will be capable of building levels as well as GameObjects and handling animation etc. (These features may come in separate editors though.) We're using wxWidgets for the GUI of the editor and everything has turned out great so far. No pictures to show you though, I'll get back as soon as I can.
onsdag 23 januari 2008
New Semester!
Hi there,
This monday, our new semester started so I just thought I'd update you on what has happened during the break.
This is a pic from today with some of the new features:
As you can see on the ground, there is a pile of boxes randomly lying around. They are cloned GameObjects which all have a physics Component. The one flying is one you can control and therefore is a perfect subject for the "selection-box" around it. (The white lines). The man in the middle is the old Mango model which I have used to build the brand new function for showing bones. Mango also has a selection-box around him, just to demonstrate the effect on a non-cubical object. The size of the box is based on his Bounding Box, only slightly bigger and with "half-drawn" sides. As you may have noticed there are also shadows on the ground, this time the result of a shader. They're not at all refined, and I don't take credit for any of the shader code, but theyre implemented at least! Hope to see you soon!
This monday, our new semester started so I just thought I'd update you on what has happened during the break.
This is a pic from today with some of the new features:
As you can see on the ground, there is a pile of boxes randomly lying around. They are cloned GameObjects which all have a physics Component. The one flying is one you can control and therefore is a perfect subject for the "selection-box" around it. (The white lines). The man in the middle is the old Mango model which I have used to build the brand new function for showing bones. Mango also has a selection-box around him, just to demonstrate the effect on a non-cubical object. The size of the box is based on his Bounding Box, only slightly bigger and with "half-drawn" sides. As you may have noticed there are also shadows on the ground, this time the result of a shader. They're not at all refined, and I don't take credit for any of the shader code, but theyre implemented at least! Hope to see you soon!
fredag 18 januari 2008
onsdag 16 januari 2008
ChildObjects etc.
Hey,
The last couple of days have been very productive. I have implemented childObjects, e.g GameObjects that relate to other GameObjects via a parent-child hierarchy. It works really well so far. I also updated the clone function to work with physical objects and child objects. And a lot of other things has happened in the phsyics department, like the implementation of an Odd::Body object. I think I have touch every part of the engine the last couple of days and it's great. Not much to show as usual, but lots and lots of improvements.
The last couple of days have been very productive. I have implemented childObjects, e.g GameObjects that relate to other GameObjects via a parent-child hierarchy. It works really well so far. I also updated the clone function to work with physical objects and child objects. And a lot of other things has happened in the phsyics department, like the implementation of an Odd::Body object. I think I have touch every part of the engine the last couple of days and it's great. Not much to show as usual, but lots and lots of improvements.
onsdag 9 januari 2008
Little boxes
Hey,
Today I continued working on the integration of physics in the Object System. It went very well, and it is now possible to attach a Collision Body to an Object, causing it to obey the laws of physics. It's still very primitive but damn, it's great to see som results =)
Ciao
btw, check out the new website at Oddrose Media
Today I continued working on the integration of physics in the Object System. It went very well, and it is now possible to attach a Collision Body to an Object, causing it to obey the laws of physics. It's still very primitive but damn, it's great to see som results =)
Ciao
btw, check out the new website at Oddrose Media
måndag 7 januari 2008
Let's get physical!
Sorry for the cheesy title, but I couldn't help myself.
This afternoon I started integrating a physics engine into the new Object System. The design is roughly finished, but it has to be coded as well. For now, (for time-saving purposes), I will integrate the Newton Engine, that we used in our early examples, with Mango jumping into ropes etc. Later a change to the Ageia PhysX Engine (Novodex) is possible, and probable. Time will tell.
This afternoon I started integrating a physics engine into the new Object System. The design is roughly finished, but it has to be coded as well. For now, (for time-saving purposes), I will integrate the Newton Engine, that we used in our early examples, with Mango jumping into ropes etc. Later a change to the Ageia PhysX Engine (Novodex) is possible, and probable. Time will tell.
lördag 5 januari 2008
Dolly #2
Hi guys,
as of today the Odd Engine has cloned its first GameObject. It feels great to have something to play with that is well implemented into the new Object System. The cloning was not that visually spectacular, the GameObject that was cloned was a controllable box with tetris-like movement. After the cloning, there were to identical boxes that moved in synch. Very nice to see after couple of weeks of working almost only on one thing.
as of today the Odd Engine has cloned its first GameObject. It feels great to have something to play with that is well implemented into the new Object System. The cloning was not that visually spectacular, the GameObject that was cloned was a controllable box with tetris-like movement. After the cloning, there were to identical boxes that moved in synch. Very nice to see after couple of weeks of working almost only on one thing.
Prenumerera på:
Inlägg (Atom)