Archived

This topic is now archived and is closed to further replies.

Machuse

newbie engine help

Recommended Posts

Machuse    122
Ok I understand that ina modeller like milkshape 3d makes the monster for example but then what does the engine do. I know it loads the model in the game and animates it but what else. What would my engine be physically is it just a part of my source code dedicated to graphics or is a seperare program with a user interface? Please help me and give me any other information you can

Share this post


Link to post
Share on other sites
paulcoz    230
Machuse,

The 'engine' is the program (or source code) that interprets your game data and makes the game function. You can think of it as the brain of your program - it tells the computer how to do certain basic things that are required in order for interaction with the player to be accomplished - accept input from the player via keyboard/mouse/joystick, draw things on the screen, making a noise, playing music etc...

The 'engine' should be as data-centric as possible (eg. the game data is separate from the engine) - instead of coding a procedure that draws a specific menu (graphic) on the screen, instead code a function that draws 'a' graphic on the screen, so that you can call the same function for displaying any graphic, not just the one required in a particular instance. The same would apply to any other component that made up the 'gameplay', whether it be sound, input, or something else.

In your example, the model itself (monster) would be considered data, so should not be part of your code. Your 'engine' is the code that tells the computer what to do with the data - how to make the monster appear on the screen: 1. Load the model into memory from disk 2. transform the model geometrically 3. draw the model's geometry as pixels on the screen. Of course, drawing the model would just be one part of drawing a whole scene (or frame).

There is program code dedicated to graphics, but that is not in itself the 'engine' (without gameplay, graphics just amount to a movie, right?), there is program code dedicated to the user interface, but that is not the 'engine' either.

Ask again if you need further explanation.
Paulcoz.

Edited by - paulcoz on January 29, 2001 1:12:26 AM

Share this post


Link to post
Share on other sites
warpexplorer    122
the engine loads the textures, loads the models sets up the virtual world, handles the user input and interface, changes the world acordingly, and draws the virtual world to the screen relative to a viewpoint

not a very good description but i hope it helps

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Ok, adding my engine-explanation here, although Paulcoz already explaned it very well. Hope this clarifies a bit more of what the ENGINE does.

This is basically what my ENGINE currently does:

*Loads, plays and manages sounds (wav-files)
*Loads, animates and manages 3D models & scenes
*Loads, assigns and manages textures (bitmaps, tga, etc)
*Loads, assigns and manages materials
+ a variety of special effects classes (particle managers, etc)
*Handles the physics calculations for game entities
*Gets user input


My GAME (work-in-progress), however, does only the following:

*Processes the user input (in this case user can be either player or AI)
*Renders the required 3D models on screen (using an engine function for that, ofcourse)
*Plays different sounds if needed


As you can see, the engine handles a lot of the -data-, and only the interaction between player and the game is programmed specificly. And when the engine loads the data, it also optimizes it for best performance: "Found an old 3D-acceleration card -> create 3D models with a lower Level-Of-Detail", for instance.

Share this post


Link to post
Share on other sites