Oxanoid - First Look !

Feb 1, 2010 at 12:49 AM


well here it is. the first edition of "oxanoid" my prototype game for tutorial purposes using the Ox Game Engine

its very early and the first working version so be kind :D

you will need a gamepad and you will need to restart the game if you drop the ball 3 times, i didnt add a restart function (sorry)

let me know if you think this would be good material for a tutorial.


Bubzy :P

Feb 1, 2010 at 2:02 PM

Definitely needs custom art models. You know anybody willing to work on that?


Feb 1, 2010 at 4:58 PM

nope :P this was however written with the intention of producing a tutorial with the standard ox/content files.

ive got a much cooler idea(similar game type) for a proper project.

while im here, is there any way to apply effects to models? that would be nice.


Feb 1, 2010 at 5:07 PM

What kind of effects?

Feb 1, 2010 at 5:34 PM

.fx files. perhaps i am not understanding their use correctly. but it would be kinda cool to be able to apply things like a water shader to a block.

Feb 1, 2010 at 5:52 PM

If you're using StandardModel, then you're already using oxNormalMapped.fx.

Applying a water shader to a cube would not make much sense since Ox's water reflection drawing algorithm assumes the surface is always facing up. Plus, you'd have derive a custom surface that draw the scene 8 times for the reflection (one for each side). So, abandon that particular idea right now for this tutorial :)

You can certainly implement a simpler custom effect though. If you want to apply a custom shader effect to a StandardModel, check out the EffectFileName property for its surfaces. Just remember that your custom shader must conform to oxNormalMapped.fx's interface.

Feb 1, 2010 at 8:52 PM

Could you post the source for your project as well? Would be nice to learn from it. 

Feb 1, 2010 at 9:06 PM

that's what I found a week-point in the engine. Its very hard to implement custom shaders which do not necessarily comply to the standard ox- effect interfaces.

What I did was to derive my own Model-Classes from SceneComponent and also implemented my own surface- and surface-factory classes for them. Now I have my own models with custom shaders. :-)

Feb 1, 2010 at 9:27 PM

I doubt that was a good way to go about it.

The easiest way to make a conformant shader effect is to copy-paste-modify oxNormalMapped.fx.

Did you try this first?

Feb 1, 2010 at 10:08 PM

Yeah, that would've been an option. But I wanted to implement shader effects beyond the capabilities of oxNormalMapped, which it's interface didn't provide. For example support for Lightmaps.  

Feb 1, 2010 at 10:17 PM

You can extend the shader with new parameters yet retain a conforming interface. For example, an Apple conforms to a Fruit's interface, but can have traits of its own.

Just add whatever parameters you need to the effect file, derive a new type from NormalMappedSurface that passes the needed data to those parameters, then override StandardSurfaceFactory's CreateStandardSurfaceHook to create the new type.


Feb 1, 2010 at 10:21 PM

oh cool. Thanks for that hint ;-) That would've saved me a lot of trouble and time...

Feb 1, 2010 at 10:34 PM
Dfulps wrote:

Could you post the source for your project as well? Would be nice to learn from it. 

 Tutorial with full source in the pipeline, as (bryan can back me up) my source code before tidying is hardly "clean". give me a day or so and it will be up :)

thanks for your interest.

Feb 1, 2010 at 10:59 PM
Can't wait thanks.

Sent from my HTC