I was wondering what's a engine? (In terms of programming)
Printable View
I was wondering what's a engine? (In terms of programming)
Well, ill give you an example. Lets take a 3d engine. Basically an engine is made so you can re-use the code in the engine. You can make a function to make a cube, plane, sphere, etc. and use it in a game. Then someone else can come along and can use those objects in a game their making.
Basically an engine, is a group of code or functions that can be reused after and after. Take Quake3 for example, so many games have used the quake3 engine as a base.
yo this is a newbie heres a more basic answer: a engine is a program that is all coded and all you got do is very basic stuff to it like.. in a platofrm game the complete engine would be the movement programmed and al you have to do is draw out the maps.
>I was wondering what's a engine?
What does the engine of a car do? Take the same concept and put it into the field of programming.
The jargon file answer:
-PreludeCode:engine n.
1. A piece of hardware that encapsulates some function but can't
be used without some kind of front end. Today we have,
especially, `print engine': the guts of a laser printer. 2. An
analogous piece of software; notionally, one that does a lot of
noisy crunching, such as a `database engine'.
The hacker senses of `engine' are actually close to its original,
pre-Industrial-Revolution sense of a skill, clever device, or
instrument (the word is cognate to `ingenuity'). This sense had
not been completely eclipsed by the modern connotation of
power-transducing machinery in Charles Babbage's time, which
explains why he named the stored-program computer that he
designed in 1844 the `Analytical Engine'.
so does engine mean the same as library ?
another question:
what's the difference between a header file and a library ?
header files access library(.lib) files so that they can be used in your program.
btw libraries have different extensions too, not just .lib
yes an engine is a library, but a special kind of library. It is a set of functions, variables, etc. used for making a specific type of program.
The type of engine you have probably heard most often is the game engine.
A game engine will in many cases contain all functions needed for interfacing and interacting characters with each other, but you yourself must actually make the plot of the game, the characters themselves, etc.
For example, an engine might contain a class which is designed to load an animation of the character, handle the character walking around the screen, attacking other units, etc....but you yourself have to make the animation of the character, decide how much damage the character will be able do, etc., depending on what your game will be. But the game engine, however, should have functions readily availble to easily input that stuff so you dont have to do a lot of coding on top of the engine.
With the engine, you got a good 75% of your game made...you just have to put the pieces together...
Header files do not neccessarily access library file Xterria. Some headers could simply be filled with class definitions, #defines, and no actual function prototypes.
perhaps not header files made by you and I, but like iostream, allegro, fstream, etc all access libraries
and yeah some just contain functions too
but when c++ was made they were meant to be hpp, so people would know that they do not access libraries, but, people like to use .h files either way
like when u say #include <suchandsuch.h> your putitng in a header file which has coding in it for stuff. a library file is a file you make that can be filled with varibales functions and such. and then u include th elibrary file to ur project. a library file is usualy a .cpp file i bielive.
lets say that you have to create a box everday using c++ instead of writing that code you can write a code that produces box code every day thats a engine
you make me cry.Quote:
Originally posted by Klinerr1
like when u say #include <suchandsuch.h> your putitng in a header file which has coding in it for stuff. a library file is a file you make that can be filled with varibales functions and such. and then u include th elibrary file to ur project. a library file is usualy a .cpp file i bielive.
quote:
--------------------------------------------------------------------------------
Originally posted by Klinerr1
like when u say #include <suchandsuch.h> your putitng in a header file which has coding in it for stuff. a library file is a file you make that can be filled with varibales functions and such. and then u include th elibrary file to ur project. a library file is usualy a .cpp file i bielive.
--------------------------------------------------------------------------------
I think you're just a bit confused there... ;)