Untitled

Published July 16, 2006
Advertisement
Ok... So I did some thinking and These are the subsystem I came up with that I need. Yes at first all this is just going to be for a pong game. I do want to design this though so i dont have to code everything over again on my next project. So alot of this may seem overkill.

*Renderer
*Physics
*Sound
*Scripting
*Resource
*GUI
*World - being a series of maps
*Map
*Sprite
*Actor

As far as scripting goes. I'll probubly be using lua, as that is what i'm most familar with.

I usually end up going with a generic actor that I can expand through lua in my engines. So far this is what I've come up with as far as how I would like it to look in the scripts.

-- Creates a new ActorBat = Actor.New()-- Makes the Actor a Physical Entity in the World, as not all actors will require a sprite or collision.Actor.MakePhysical(Bat)-- Once we have been made physical we should now have access to the functionally that comes with that.Bat.Sprite.Set(BatSprite)-- Adding and assigning the speed variable to the bat actorBat.Speed = 1-- Another Possibity for adding variables-- This way would allow for adding c++ classes as member variables.Bat.AddVar("Speed",VarType::Int)Bat.SetVar("Speed",1)Bat.GetVar("Speed")-- Defining an Event Handlerfunction OnEventName(This, Args)	This.X += This.Speedend-- This function would add the Event Handler and also subscribe the Actor to that event type.Bat.AddEvent("EventName",onEventName)


I'm still undecides as to if this is the aproach I'm going to take. But at least I'm planning.

More updates on the way once I make more plans.

Edit: I think I'd rather go with a Bat.Move(Bat.Speed,0) where the function automaticly takes care of the time based movement for you.
Previous Entry Untitled
Next Entry I are Noob
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Education

975 views

Screeny Power!

816 views

Level Editor

841 views

Happy New Year

747 views

X-Mas

788 views

(OO)

677 views

Another Screeny

644 views
Advertisement