New ogre features (with detailed usage descriptions)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Godai
Enthusiast
Enthusiast
Posts: 171
Joined: Thu Oct 05, 2006 8:13 pm

New ogre features (with detailed usage descriptions)

Post by Godai »

Hi, and yes. I did search the forums but found mostly stuff about material scripts, terrain and older stuff.

I've done a lot of 3D engines, including ones used commercially for both PC and PsOne so my requests are based on what´s actually gets used alot in games (IMHO ofcourse). Anyhoo, enough with the chit-chat.

boolean LineOfSight(vec1, vec2)
Determines line of sight between two points in space.
Great for determining if an enemy can see the player, or if a lensflare is blocked or not. Returns true/false.

CollisionStruct LineTriangle(vec1, vec2)
Returns null or collision struct containing vector of triangle for determining angle of surface as well as material ID or name.
That way you can also determine if walking on grass, metal, wood and play the appropriate sound.

2DPointStruct PointFromWorld(vec)
Convert 3D point to 2D point. Admitted can be done ourselves but is against the PB ease of use :)
Great for placing 2D labels on top of players heads as it´s a different effect than simply writing it into a texture and using a billboard.
It does not get scaled etc.

Mesh PickMesh(x, y)
Pick closest mesh to camera (line from camera test).
Very usefull for selecting stuff in the world, doing level editors/3d apps etc.

SetMeshData(mesh, void*)/void *GetMeshData(mesh)
Usefull for attaching/retrieving stuff to to/from a mesh.
Using PickMesh above, you could check for user clicking on a door, and then determining from it´s user data, what kind of door it is, checking inventory for keys etc.

More Ogre renders(tm)
It is my understanding that you use the DirectX7 render, because it must work with the 2D sprite commands.
Perhaps one could use OpenGL or an Ogre render for all stuff so we could use the latest GL shader command sets?
Not all that important, as gameplay comes first and I realize it might be hard to do ATM, even though there´s an OpenGL subsystem.

I´ll probably think of more, but most of the above commands would totally rock. I can get by with what´s there now, but I would need to implement a lot of stuff to get there. Basically mimicking stuff already in ogre which is sad, since PureBasic is so damn nice and easy to work with :)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Looks like a handy bunch of requests. For clarity's sake however, i would change the use of the word vector when cartesian coordinates (xyz 3d points) are being described. Just so people don't get confused. :)
--Kale

Image
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

The ogre lib really just needs to be open source.
Godai
Enthusiast
Enthusiast
Posts: 171
Joined: Thu Oct 05, 2006 8:13 pm

Post by Godai »

Yeah. When I talk about a vector, I mean a 3D position in space, consisting of 3 floats. (XYZ) :D
Post Reply