PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

EDGELIB SDK 3.00 released

Elements Interactive B.V. releases version 3.00 of its multi-platform mobile game engine EDGELIB. This first version of the 3.x series adds advanced 3D operations including support for OpenGL® ES and 3D animations.

The 3.00 release introduces support for hardware accelerated 3D graphics through OpenGL ES and OpenGL. Using EDGELIB 3.00 developers can take full advantage of GPU powered mobile devices supporting OpenGL (ES). Devices without hardware acceleration can use an OpenGL (ES) software implementation or EDGELIB's fast internal 3D renderer. Currently, EDGELIB supports Imagination Technologies PowerVR, Hybrid Rasteroid and native Windows OpenGL implementations.

Other additions to the 3D engine are support for full skeletal 3D animations based on joints and keyframes, various helper functions and support for MilkShape 3D, the popular 3D modeling application to create low polygon models for games.

"This is the biggest release of EDGELIB to date," says Danny Hoffman, Elements Interactive CEO. "We added the 3D animation feature at the very last moment to push the limit even further. We are very excited about the results and can't wait to see 3D games built with EDGELIB 3.00."

The new EDGELIB SDK release also features improved platform support of the EDGELIB Build Tool, and other enhancements and bugfixes. A complete list of additions and bugfixes can be found in the release history at http://www.edgelib.com.

Also the license model has been changed as EDGELIB is now available in differently priced Full, Standard and Lite editions. Detailed pricing and licensing information is available at http://www.edgelib.com.

EDGELIB licensees are entitled to download and install the commercial version of the new EDGELIB SDK. An evaluation version can be downloaded for free as well.

The EDGELIB SDK supports the development of mobile applications and games for Windows Mobile Pocket PC, Windows Mobile Smartphone, Symbian Series 60, Series 80, Series 90, Symbian UIQ, Gamepark Holdings GP2X and Windows desktop. Key features include true multi-platform development, high-performance 2D graphics, hardware accelerated 3D graphics through OpenGL ES, RGBA surfaces and both Bluetooth and TCP/IP networking.

More information about EDGELIB can be found at http://www.edgelib.com.

Note: OpenGL® is a trademark for specific application programming interface software from Silicon Graphics, Inc. (“SGI”).
Hi Edge.

Could anyone drop here a letter of how to make a simple collision detection. Cause I can't really get the idea. A source code would be great. Actually I thought I will find a collision detection system in the Edge 3.00 but I didn't. But you can't build any game without CD so it is one of the most important thing.
Please if anyone could help, any help would be appreciate.
Hi Rag,

I assume you're referring to 3D collision detection.

Currently there is no functionality for 3D collision detection in EDGELIB yet, this is planned for a later version.

For simple 3D collision you can try using 3D bounding boxes, or you can create a height map for landscapes.
Ok, I'll try to make a collision detection myself or will wait for the next release with it. I have another question that I think is more important. So the question is simple: could you please provide a sample code of how to draw a simple helloworld triangle on the new Edge 3.00 with OpenGL ES.
I mean what if we just take the example from PowerVR SDK or for example from NeHe tutorial
http://nehe.gamedev.net/data/lessons/le ... ?lesson=02
and drop it to the Edge 3.00 just to understand how to convert OpenGL ES programs to the Edge. Because I couldn't understand how to draw a simple triangle with OpenGL ES on the Edge. Please help with this simple question.
Another one question is about rotating the 3Dsurfaces and generally the 3D animated models in .ms3d
When I use for example turtle.Rotate(x,y,z) the 3D model starts to rotating but in some point it starts to compressed until it becomes totally flat. If you need I can make a screenshot.
Hi Rag,

To create a simple shape (such as a triangle) we recommend looking at our advanced 3D tutorial here: http://www.edgelib.com/index.php?node=1098

It explains how to create a 3D surface, and how to set up a square shape using vertices and polygons. When calling display->Render(E3DSurface *), it will be able to render the model using OpenGL ES.

You can also look at the View3D sample included with the SDK, and look at the code to create the front face of the cube. You can remove the calls to SetTexCoord, SetNormal and SetColor to make it less complicated.

To solve the issue where the model becomes flat, we recommend calling model.Reset every time before you rotate. Store the rotation value in a separate variable.

Let us know if you need more help.
edge wrote: ... including support for OpenGL® ES ...


Except for desktop OpenGL you usually have to rely on some form of EGL being present. Do you think it's a good idea to pollute the EGL namespace with your own definitions (EGL_*)? Wouldn't it be better to have everything EDGE related marked as such, e.g. EDGE_EGL_*?

Just a thought ...
Hi Kuroneko,

You're right, though the only EGL_* definition we're using is EGL_USEGL to enable the OpenGL (ES) plugin to be used.

We will probably fix this and rename it to EDGE_USEGL for the upcoming release.

Thanks for your attention.
Hi again Edge.

Well I tried to call a model.Rotate after the model.Reset and it worked out the model is not getting flat anymore so thanks. Now the question is how to build a simple 3rd person camera and object(model) movement routine? I've tried to make it but I still can't do it properly. What I was trying to do is to translate and rotate the world and the model so that the world translation would be as a camera and so that the model didn't stay on it's position, but it didn't work.
Actually can you explain how to make a simple camera translation and rotation in the world. Another problem that occurs is that when I translate and rotate the model through:
model.Reset()
model.Scale(x, y, z);
model.Rotate(0, variable, 0);
model.Translate(0, 0, variable);
the model rotation center stays on it's position while the model translates.
I hope you could help.
Hi Rag,

Great to hear the transformation issues for the model is solved now.

When rotating and translating the model, the order of the calls should actually be reversed (like OpenGL). If you swap rotate and translate, the model should rotate properly.

To use the camera, we recommend using the WorldReset, WorldTranslate, WorldRotate and WorldScale members of ClassEDisplay.
Hi Edge
Well I swap rotate and translate and the model rotates properly now, but there is another problem. It seems when I'am rotating the model and then translating it by y axis for example it is translated only by that axis even if the model is rotated, I mean the axis are not rotating together with the model so that I can't make the model translation in the rotation angle (it only translates forward and backward). Could you help me how do I make so that translation would be done in the model rotation angle.
Another question is how can I get the model x,y and z coordinates in space, so that I could for example set another model in that point, cause it's very important for writing games.
edge wrote:We will probably fix this and rename it to EDGE_USEGL for the upcoming release.


OK, out of curiosity, what EGL configuration is used (if applicable) for context and surface(s)?
Hi Rag,

I think it would be best to give an example, this would also answer your second question.

Let's take a spaceship that moves around by flying into a direction (he can change directions as well). It starts at position 0, 0 and moves at an angle of 45 degrees. This position and angle can be stored in an array of entity structures (to have more spaceships).

Move the model x/y position based on the timedelta parameter and multiply it by Sin and Cos of ClassEMath (with the direction as the parameter). This will change the model x/y position based on its angle.

When rendering, read the rotation model from the entity structure and call the following code:

Code:

model.Reset();
model.Translate(entity->x, entity->y, entity->z);
model.Rotate(entity->angle_x, entity->angle_y, entity->angle_z);
display->Render(&model;);


The advantage of saving the x, y and z coordinates in an entity structure enables you to locate the object in space.
Hi Kuroneko,

For OpenGL ES we use a standard configuration which takes the native display depth. It also has a 16-bit depth buffer.

For PC OpenGL it also uses the native color depth with RGBA support. It uses double buffering for rendering the display.
Hi again Edge.
I'am so sorry for disturbing you again, but I have a problem. I was trying to implement the things you told to make the model moving right, but it seems I'am doing something wrong. Actually to make it easier to understand I would like to ask you to write here a few code strings which I need to add in your Animate3D sample in the Edge install pack so that I could move the turtle model in the way I want (I mean from the third person view). Please I really need this. If you could help it would be great. :oops:
Hi Raq,

To add a moving turtle to the Animate3D sample you need to add the following code at several places in main.h (globals are used for easy reading):

Code:

//Global variables:
long turtle_x = 0;
long turtle_y = 0;
unsigned long turtle_angle = 0;

//In DrawModels(), before turtle.Animate:
turtle.Reset();
turtle.Translate(turtle_x / 128, 0, turtle_y / 128);
turtle.Rotate(0, turtle_angle, 0);

//At the top of OnNextFrame(), replace existing code handling the up, down, left and right keys:
if (ecd.input->KeyHold(DIAM_MENUUP))
{
turtle_x -= ecd.math->Sin(turtle_angle) * (long)timedelta / 256;
turtle_y -= ecd.math->Cos(turtle_angle) * (long)timedelta / 256;
}
else if (ecd.input->KeyHold(DIAM_MENUDOWN))
{
turtle_x += ecd.math->Sin(turtle_angle) * (long)timedelta / 256;
turtle_y += ecd.math->Cos(turtle_angle) * (long)timedelta / 256;
}
if (ecd.input->KeyHold(DIAM_MENULEFT))
turtle_angle -= (short)timedelta;
else if (ecd.input->KeyHold(DIAM_MENURIGHT))
turtle_angle += (short)timedelta;