Hi, I understood what Cara implied, but you, Jacob, just confused the s**t out of me. I get the basic, but when I try to set formulas, that's where the problem lays. Which is funny, because I passed both college algebra with an A, but I just can't understand how to apply it to gaming. I'm sure it's something simple that I just can't see, but I will keep on banging my head on the wall. LOL!
Hey, Cara, hope you keep on posting; hopefully I will comprehend your way of thinking. Sent from my jPhone 5 On Aug 9, 2013, at 1:58 AM, "Jacob Kruger" <ja...@blindza.co.za> wrote: > Might be a form of OT reply, but, when try to explain entities/classes/object > oriented programming to people, one of the common examples I bring up to > explain concept of parent-child/inheritance is something like utensils - know > sounds silly, but bear with me...<smile> > > As in, in the kitchen drawer you store utensils, and they all share some > similarities, like generally being made of metal, or plastic, but, then there > are some general attributes/properties that different utensils might all have > in common, like length, materials, colours collection, and targeted meal > types/usage, or target ingredient types. > > Then when you take it further, there are, say 3 specific/separate types of > utensils - knife, fork, and spoon, and each of these children of the utensil > parent class/object has a few of it's own specific forms of > properties/attributes - knives are of different types, and also include > further attributes/children types like steak knife, serration, edge type, > point type, and general functionalities, whereas forks would specifically > focus on something like shape of and number of points, and then with spoons, > you might again have at least 3 child types - table spoon, dessert spoon and > teaspoon, and all of these might, for example share a specific > property/attribute relating to cubic capacity, which would therefore have > been assigned to the spoon type/entity, etc. etc....LAM! (laughing-at-myself) > > Stay well > > Jacob Kruger > Blind Biker > Skype: BlindZA > '...fate had broken his body, but not his spirit...' > > ----- Original Message ----- From: "Cara Quinn" <caraqu...@caraquinn.com> > To: "Gamers Discussion list" <gamers@audyssey.org> > Sent: Friday, August 09, 2013 7:46 AM > Subject: [Audyssey] Intro to game engine creation > > > Hi All, > > -Thought I'd take a few minutes and write a very light introductory note > about the creation of a game engine, as this topic has come up from time to > time. > > this is just my own style so feel free to contribute or critique. :) > > People have asked of late about classes and how to organize them. I.E. Player > classes and such. > > Let me start at the beginning. > > • the game loop > > this is essentially the heart of any game with any kind of real-time actions. > > The game loop is simply a loop which does only a few things over and over and > over again. An example might be: > > Start of loop > > render entities etc > > Get player input > > Perform physics / collision detection etc) > > end loop > > that's essentially it. > > So what are entities? > > I define entities as all of the elements within the game, and possibly even > the game world itself. This means the player, the items, the game's > characters. > > So the first thing in my loop is to render everything in the game that needs > to be updated every frame. A frame is one pass of the game loop. > > So everything is displayed (video or audio) then we get the player's input. > > Lastly I process the states of all of the entities and then when the loop > comes around again, everything is rendered in it's new state. > > So that is essentially what keeps your game going. > > Depending on the player input, the game may be paused, saved, ended etc. When > those things happen, the game loop is stopped and appropriate methods are > called. > > Also, when the game starts, the game loop does not just start automatically. > Maybe you'll see or hear a logo of some sort, then perhaps go through a menu > structure to set up your game. Once that happens, the game world might then > be set up by loading a map or some sort of file. Usually then, you'd be ready > to start your game loop and the action for the level would begin. > > So where would the game loop and all this code live? > > For me, I like to create a game class where the game loop would be placed. > From the game class, you would start your game and initiate your pre-game > menus etc and eventually start your game loop. Make sense? > > • Entities > > You can think of entities as your most basic game elements. I.E. every single > thing which exists in your game is an entity. Everything in the game, and > even the game world itself can be considered an entity if you choose. > > So, your entity class needs to be really generic while still providing all of > the basics that everything in your game needs. So what would this look like? > > Well, everything needs a shape and a place to exist. So I might define a > position and bounding box or sphere. In the case of the world, I might have a > shape defined by importing a map file. > > entities also need to be able to move if they want to, so you'll need to add > methods in them to reposition them. > > they also need to perform artificial intelligence (AI) as well as perform > actions. > > Lastly, they need to respond to touches. I.E. what happens when other > entities come into contact with them? What do they do? > > to create an entity class which satisfies these requirements you can add both > variables and functions (or methods) which all of the game elements can draw > from to do what they need to. In fact, since all elements of our game share > the entity class, we call that inheritance. All game items and creatures and > such all inherit from the entity class. Think of the entity class as being > the parent of all other game elements. > > So this means that the variables and methods in the entity class are all able > to be used by every other class which inherits from Entity. Does this make > sense? > > If we add a variable called health to our Entity class, then every class > which is an entity will have health. > > Each entity may use that health amount differently, but they all have their > own amount of health. > > If Entity can move using a move method, then every class which is an Entity > can also move. > > Now each class may be able to move in a different way, but they all share the > basic ability to move. > > I think that's all I'll touch on for now. I know, this one was short. :) > -Getting sleepy so I'll leave further discussion for another day. :) > > Hope this makes sense and that others will share their own style / tips etc. > > Night All and thanks for reading! > > Smiles, > > Cara :)--- > View my Online Portfolio at: > > http://www.onemodelplace.com/CaraQuinn > > Follow me on Twitter! > > https://twitter.com/ModelCara > > > --- > Gamers mailing list __ Gamers@audyssey.org > If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. > You can make changes or update your subscription via the web, at > http://audyssey.org/mailman/listinfo/gamers_audyssey.org. > All messages are archived and can be searched and read at > http://www.mail-archive.com/gamers@audyssey.org. > If you have any questions or concerns regarding the management of the list, > please send E-mail to gamers-ow...@audyssey.org. > > > --- > Gamers mailing list __ Gamers@audyssey.org > If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. > You can make changes or update your subscription via the web, at > http://audyssey.org/mailman/listinfo/gamers_audyssey.org. > All messages are archived and can be searched and read at > http://www.mail-archive.com/gamers@audyssey.org. > If you have any questions or concerns regarding the management of the list, > please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.