Advertisement

Game programming concepts and questions.

Started by January 02, 2001 06:00 PM
2 comments, last by sympathy 24 years ago
In developing a game which are the major facilities needed? A level editor? An engine? A game? I am having a major difficulty trying to sepereate the engine from the game. Could someone please define them for me with examples if possible. I would like to develop an engine in the feature, but I''m not sure what components that it consists of and how do the level editor and engine act together? Final question is how can I learn to optimize my source code (C/C++) with the use of Assembly? If I use Visual C++ for programming and I limited to using MASM style Assembly code for optimizations. Thanks alot, I appreciate anything you can offer.
"The time has come", the Walrus said, "To speak of many things."
Ok, the engine is what the game exists in. The game is the data that the engine operates on. A perfect engine is an .exe that will take the name of a .ini file or a registry entry of a kind of script thingy, and it will load data based on the contents of that script. Then, it will allow the user to play a game based on the script and the data. You can think of an engine as a program that without data, will not run, but given data, it will allow the user to do something, in this case, play a game. So, given this, we know that an engine is NOT a game, it is the envirionment in which the game exists, and provides methods to interact with the user, by means of graphics, text, console input, etc... Aha. An example. Internet Explorer is an HTML engine. When it loads a page, it decides that if you click on a certain thing described in an HTML file, it will load another one, you know what I mean? Hope that helps.
farmersckn
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.
Advertisement
quote: Original post by sympathy

In developing a game which are the major facilities needed? A level editor? An engine? A game? I am having a major difficulty trying to sepereate the engine from the game. Could someone please define them for me with examples if possible.



Actually, I think farmersckn pretty much covered this. Think of the engine as the core behind the game, what drives it... the mechanics of the game. The rest of the game, as farmersckn said, is made up by the data and the elements you place in the engine. For example, in Quake3, the data is the models, worlds, textures and players, all of which are manipulated by the engine. Also, think of your engine as the game''s rules. It sets the limits for the objects in your game, and what happens to them (for example shooting someone in Quake3). Ok, that came out a bit wrong, but onwards we go .

quote:

I would like to develop an engine in the feature, but I''m not sure what components that it consists of and how do the level editor and engine act together?



The level editor, typically, will only supply the data for your engine. For example, in a 2D scroller I made a while back, hard coding the level map and enemy positions into a text file became increasingly difficult as the scale of the game grew. So, I made an editor, that allowed me to visualise what I was doing, and inevitabley speed up development time. When you get to 3D, you''ll realise how impossible it would be to type out all the coordinates for all your polygons in your map would be. I think your head owuld explode .

quote:


Final question is how can I learn to optimize my source code (C/C++) with the use of Assembly? If I use Visual C++ for programming and I limited to using MASM style Assembly code for optimizations.

Thanks alot, I appreciate anything you can offer.


I''m certainly no expert (at all ) on assembly, but I really fail to see how using MASM style Assembly code ''limits'' your optimization abilities. Perhaps someone else will shed some light there . Good luck!



Insomnia
Insomnia
IMHO,
Although a good coder''s understanding of how code works can increase the speed of a program through assembly, it is usually not worth doing until after you have finished the engine and you have a very, very, very slow function in it. Otherwise modifacations to those sections in assembly made more difficult.



The Aetherian Katana, a sign of power.

This topic is closed to new replies.

Advertisement