Jump to content
  • Advertisement
Sign in to follow this  
Master Ben

Game Engine? 3D models?

This topic is 1921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a couple of questions about game engines and 3d models...

 

1. What exactly is a game engine?

2. What would using one look like?

3. Which engine would be best for implementing 3D in Java?

4. What program would be best for making 3D models for Java?

5. Do the 3D models need to be a certain file type?

6. and finally, can 3D models be made to turn only in 8 directions (N, NE, E, etc...)?

 

Thanks!

-Master Ben

Share this post


Link to post
Share on other sites
Advertisement

[1] Roughly it is like this internally.

 

List<Entity> EntityList;

 

void Main()

{

   Initialize();

   while(running)

  {
    CheckInput();

    UpdateAllTransformMatrix();

    PhysicsUpdate();
    Update();

    Render();

  }

  Dispose();

}

 

[2] Using one would be using some classes similar to these ones.

 

//Handles matrix transforms to move stuff around.

class Transform { //matrix, positions, rotations, ... }

 

//Represents the most basic element in your application.

class Entity

{

   //List of scripts that will do stuff for this element.

   List<Component> ComponentList;

 

   //Spatial information of this element.

   Transform transform;

  

   void Add(Component c);

 

   void Remove(Component c);

 

   //Engine call this methods and it relay it to all components.

   void Initialize(); //inside Initialize()

   void Update(); //gets called inside Update  

   void PhysicsUpdate(); //gets called inside PhysicsUpdate;

   void Render(); //yep

   void Dispose(); //yep

 

}

 

//Where the magic happens.

class Component

{

   //REf to the Entity that contains this script.

   Entity EntityRef;

 

   //Where you will handle the engine callbacks.

   virtual void Initialize(); //inside Initialize()

   virtual void Update(); //gets called inside Update  

   virtual void PhysicsUpdate(); //gets called inside PhysicsUpdate;

   virtual void Render(); //yep

   virtual void Dispose(); //yep

}

 

//Be happy

 

//Uses the Transform and Render callback to setup a camera matrix.

class Camera : Component { }

 

//Uses the REnder method to call the drawing callbacks of the API (OpenGL or DX)

class MeshRenderer : Component { }

 

//Uses PhysicsUpdate to calculate forces and update the Transform.

class RigidBody : Component { }

 

 

[3] As you can see the model above is a "Pseudo-code" like. You could write it in anything with a graphics loop.

 

[4] Sorry. Not artist 

 

[5] Regardless of the file type. Every engine converts it to a list of Points and Vectors to send it to the GPU memory.

 

[6] The models are only a list of points in 3D. To define how they "turn" around you need to multiply them by rotation matrixes.

Share this post


Link to post
Share on other sites

3. Which engine would be best for implementing 3D in Java?
4. What program would be best for making 3D models for Java?
5. Do the 3D models need to be a certain file type?

3) As far as I know, Java has two major 3D engines: LibGDX and jMonkeyEngine

4) Whatever 3D program you like best, that can export to a 3D scene file type that supports all features you want (textures, animation, vertex colors etc.) while at the same time being accepted by your Java game engine of choice. If you don't have money to spend, use Blender3D and Wings3D.

5) The file type choice is defined by your game engine - look to its documentation or "feature list" for information on what type of content it accepts (3d models, images, sounds etc.).

 

If you pick any of those two engines and follow the start guides you should find your own answers pretty quickly - it's something everyone needs to know when getting familiar with the kit.

EDIT: If you don't necessarily have to use Java, based on your questions, you should really use Unity. There's just tons of educational material for this engine - it's like being under the wings of a dragon.

Edited by Kryzon

Share this post


Link to post
Share on other sites

1. What exactly is a game engine?

 

Hmm... think of the game engine as a mason.

He needs to know how to build whatever you want him to build, and you have to teach him how to.

 

Then think of the rocks, planks, all the material required for a construction.

Your mason knows how to get all those and make a building of it, but you need to give him the materials. These materials are your game resources, i.e. images, sounds, models, etc

 

Lastly you have to design the building, how it'll look like, where the pieces should fit, etc

This is the game.

 

2. What would using one look like?

 

Depends on the engine, some are very basic and you have to do some specific stuff yourself, others come with so much stuff that you just need how to order the mason around.

Some even come with some materials ready for use (Unity).

 

3. Which engine would be best for implementing 3D in Java?

 

I'm not expert in Java, but I think it's best if you say for which platform you want the game/engine on, so it's easier to search.

 

4. What program would be best for making 3D models for Java?

5. Do the 3D models need to be a certain file type?
 

Depending on the engine, it might already know how to import some specific format, so you just have to look which formats it support and work with it.

 

If the engine doesn't support it, you'll need to write a loader and then you can use whichever format you prefer.

If you do choose to write your loader, remember to check if the format's data has what you need.

For example, .OBJ files don't export any animation at all.

 

Most good engines should come with support or you should be able to find loaders for the .FBX format (Autodesk 3ds Max and Maya), since it seems it's popular and easy to read.

 

6. and finally, can 3D models be made to turn only in 8 directions (N, NE, E, etc...)?

 

That you'll have to program yourself for your game.

Edited by Danicco

Share this post


Link to post
Share on other sites

1. What exactly is a game engine?

There's no official definition of what a game engine is but I personally define the game engine as the code that exists below the gameplay code. Essentially it is the layer of code that either from you or from a third party, deals with low level functionality like rendering or playing sound or things not related directly to the actual logic of your particular game.

Vague terms come into play like "framework" as well, some engines or frameworks do different work than others do, some run a game loop for you and call into your code as a layer you can work off of. Some are just libraries of useful functions you can use in your own "engine code."

You can have an engine as simple as a little game loop that checks for an arrow key press and moves a ball onscreen and renders it, or you could have a massive multi million line behemoth like source or unreal. Usually engines are bigger because they try to be more generic.

2. What would using one look like?

Again it depends on the engine, unreal is an engine that runs its low level code internally and you create your gameplay layer ontop of it by making assets like maps and models and things and tie it all together with scripting. Some engines come with tools built in or just tools you can use to make content. Others are simply low level code that you can add onto and have to build out the engine yourself. There's no one solution.

3. Which engine would be best for implementing 3D in Java?

Best is just a word, the best would be what is most suitable for your requirements. There's more built up engines like jMonkey or a few other ones, Google is your friend.

4. What program would be best for making 3D models for Java?

3D models are just data, bytes of information that is exactly the same between languages. Things like blender or 3ds max would work just as fine in Java, it all goes down to picking a file format and a tool to make it with, then integrating that into your game. Most engines will offer some kind of model loading functionality if they're 3d and support specific formats out of the box.

5. Do the 3D models need to be a certain file type?

Like I said above.

6. and finally, can 3D models be made to turn only in 8 directions (N, NE, E, etc...)?

A model is just a visual, think of it like a clay dummy. Every frame you're taking a snapshot of that clay dummy and how that clay dummy appears on screen and what it does goes down to your code. If you wanted you can render a 3d model that does nothing but roll around on its side. That's nothing but your code changing it's positioning then you rendering it.

In short: yes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!