NOGDUS $170.00 has been donated to NOGDUS!
September 10, 2010, 11:39:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: JOGL Game Engine  (Read 466 times)
0 Members and 1 Guest are viewing this topic.
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« on: March 05, 2010, 02:56:24 AM »

Haven't decided whether I want it to be open-source or commercial, but I am working on a JOGL game engine. It will be object-oriented. I'm still learning some of OpenGL and working on the design of the engine.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #1 on: March 05, 2010, 04:00:57 AM »

good luck!
and an aside - I love the new avatar pic Cheesy
Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #2 on: March 05, 2010, 05:43:06 AM »

It is the image i made for Gilgamesh for that game.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #3 on: March 06, 2010, 12:32:40 AM »

Awesome man
Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #4 on: March 08, 2010, 03:16:13 PM »

So, I have the problem of loading models into my game engine. I think the best way to handle this would be to define my own type, at least for now. If I release it open-source, hopefully some other people will contribute more loaders.
Logged
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #5 on: March 09, 2010, 01:29:49 PM »

I have actually decided that I will use the Art of Illusion file format, so that that program can easily be used with my engine. Also, sine AOI itself is writeen in JOGL, it should be easy to use it.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #6 on: March 10, 2010, 07:21:40 PM »

I would recommend writing an exporter for AOI in BeanShell (the scripting language that AOI uses) and using a simple custom format.

The AOI file format will have a shitload more data in it that your engine will not use, and so you will be wasting space and time by using the AOI file format directly.
Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #7 on: March 11, 2010, 01:35:03 AM »

Yeah, the AOI file format is really complex too. I'm defining my own, maybe xml based.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #8 on: March 11, 2010, 02:55:09 AM »

I'd highly advise against xml for a model format.

Models can have thousands of vertices and thousands of polygons, and each poly needs several pieces of information.

If you start using an xml format, you will waste a ton of space and memory in loading and parsing the model files.

I recommend using a tightly packed binary format for your model files, and use a simple scene descriptor file (maybe xml based) to set up the game environments. you could then reference the model files either by an index into a master model list, or by file name.

An example from a project I was working on ages ago:
Code:
<scene id="castle-gate" lighting="castle-gate.lights">
    <models>
        <model id="base-terrain-0" x="0.0" y="0.0" z="0.0" />
        <model id="castle-gate" x="0.0" y="0.0" z="0.0" />
        <model id="guard-tower" x="0.0" y="0.0" z="0.0" />
        <model id="player" x="0.0" y="0.0" z="0.0" />
        <model id="guard" x="0.0" y="0.0" z="0.0" />
    </models>
    <entities>
        <entity id="player" model="3" x="1.0" y="1.0" z="10.0" sx="1.0" sy="1.0" sz="1.0" controller="user" />
        <entity id="guard" model="4" x="20.0" y="1.0" z="30.0" sx="1.0" sy="1.0" sz="1.0" controller="guard-control" />
    </entities>
    <triggers>
        <trigger id="start-cam" run="startCameraPan()" x="-5.0" y="3.0" z="5.0" sx="4.0" sy="4.0" sz="4.0" oneshot="true" />
        <trigger id="guard" run="interact(guard)" x="guard.x" y="guard.y" z="guard.z" sx="1.5" sy="1.5" sz="1.5" oneshot="false" />
    </triggers>
</scene>

Its doubtful you can understand what it all means at first glance...

There are a few lists of objects that the scene describes.
The model list is a list of model file names without the extension, because my engine supported 3 model formats (all based on plg)

The entity list is a list of game world objects that each have a model, a position, a scale, and a controller function.

The trigger list is a list of non-visible objects that are used to trigger events.
Each trigger specifies the script code to execute when the object is triggered in the run argument.
The position of a trigger may be linked with an entity (as I did with the guard) so that when the user controlled entity collides with the trigger-enabled entity, an event can fire.
Each trigger can be set up as a "oneshot" which means once it fires, it cannot be fired again.
This is useful for events that will only happen once per game session, such as the starting camera pan "cut scene" event that I have in the scene above.

I wish like hell that I still had this project's source.  Fucking Windows 98 ate this one years ago. Tongue

Anyway, good luck, and have fun.

Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #9 on: March 11, 2010, 11:16:04 AM »

Yeah, I definitely see how xml could get out of hand. What if I used some form of compression, like gzip. I was thinking about an ASCII one like this as well:
Code:
Object Object_Name{
Texture = "filename"
Style = "tri"
{x, y, z, uvx, uvy, r, g, b, bone = {Skeleton.bone1 = weight, Skeleton.bone2 = weight, ...}}
{x, y, z, uvx, uvy, r, g, b, bone = {Skeleton.bone1 = weight, Skeleton.bone2 = weight, ...}}
...
}

Skeleton Skeleton_Name{
{x, y, z, scx, scy, scz, rotx, roty, rotz}
...
}
Again, I would use some sort of compression. Something like that.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #10 on: March 11, 2010, 11:28:33 AM »

Hmm, using a text based format is okay for the in-development phase.
You can write a converter/compiler that spits out the binary format for the final production phase.

Just make it so that your engine can load either ASCII or binary formats, and then you are set.

Good luck man!
Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #11 on: March 11, 2010, 11:53:30 AM »

Ok, yeah, that sounds like a good idea. I think that ASCII will be easier to develop. I'll be able to see mistakes in the file, possibly. But binary will certainly be better for deployment.
Logged
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #12 on: March 11, 2010, 05:21:21 PM »

I think I've decided on the name of the format at least. .HEMA (HElium Model Ascii) and HEMC (HElium Model Compressed). I think I like the design from my earlier post. I'll write the documentation now.

Oh, that reminds me, I have decided to name the engine the Helium Engine. This is based on the fact that the name of our company is going to be Stable Element.
Logged
kingthomas
Moderator
Member
*

Rating: 10
Offline Offline

Posts: 73



« Reply #13 on: March 22, 2010, 12:19:50 PM »

Ok, I haven't posted anything in a while, but that's because I haven't gotten much done. Mostly learning more about OpenGL to help optimize this engine and such. Also, I am stealing Redslash's Blender plug-in and editing for my file format.
Logged
Richard Marks
202192397
Administrator
Member
*

Rating: 69
Offline Offline

Posts: 889


happy


« Reply #14 on: March 22, 2010, 09:01:36 PM »

pro tip: worry about engine optimization last

But yeah, don't write things you don't know.
Write a zillion and one tiny test apps to test every thing that you want your engine to do, to make sure you know it before it makes its way into your engine.
Logged

You want to know more about me?
Freelance Game Developer
Katy, TX
Tags:
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
.: Custom SMF Theme by Richard Marks :.
Valid XHTML 1.0! Valid CSS!