Results 1 to 10 of 26
Thread: Game Engine Discussion
-
03-11-14, 08:51 PM #1
Game Engine Discussion
Well then I don't think you understand how that system should work. My game engine that I'm creating has the ability to add input mappings to an action, the source engine by itself should have the same ability plus the ability to modify what key is used to cause that action. Trust me, I have some experience in this since it took me a WHILE to make sure my input and configuration system worked the way I wanted them too. It's still a work-in-progress but they can at least do more than what you think the Source engine doesn't have.
-
03-11-14, 09:36 PM #2
Re: Insurgency...The new CS?
ok. you've piqued my curiosity...
I'm going to guess you are talking about something along the lines of the following... And I'm guessing you are talking more along the lines of an engine PLUS a framework...
In writing a game for your "engine", I would have a set of user actions... Lets say the following:
Player_Jump
Player_Left
Player_Right
Your "engine" will read from ini, xml, registry, whatever a predefined key binding set when it's initialized.
So to throw some pseudo-code out there I'd then do something like:
Code:Switch (Key_Input) { case Key_Left : Player_Left(); case Key_Right : Player_Right(); case Key_Button1 : Player_Jump(); }
I would still contend that that part of an "engine" should be left to the programmer or as a framework laid on top of the engine. But not the engine itself.
Krakkens and shit. stop tempting them. -- Bigdog
-
- Join Date
- 11-13-07
- Location
- Plano, TX and Ruston, LA
- Posts
- 32,364
- Post Thanks / Like
- Blog Entries
- 43
-
03-11-14, 11:02 PM #4
Re: Insurgency...The new CS?
I have used a number of engines. I have not used the source engine so I can't say for sure if they initialize a "keys" dataset on initialization or not... If all source games use a similar or the same text file to do so then I would have to assume that it does. I cannot think of any other engine that *I* have used that does it that way. Unity MAYBE but I haven't dug into that one very deeply.
Krakkens and shit. stop tempting them. -- Bigdog
-
03-12-14, 09:57 AM #5
Re: Insurgency...The new CS?
As I said, mines still a work in progress but it works the way I want for now. The way it works for me is I have this:
addInputMap("FireWeapon", Keys::LMOUSEBUTTON);
Then later on wherever I need to use that I do this in the game/app/demo.
if (g_engine->getInputManager()->IsPressed("FireWeapon"))
Log(L"FIRE!");Last edited by gehn; 03-12-14 at 09:58 AM.
-
03-12-14, 10:06 AM #6
Re: Insurgency...The new CS?
I think we're actually talking the same thing with different terminology. You have an input system/IO system. You simply add some aliasing on top of that. It really doesn't matter if you are calling IsPressed(LMOUSEBUTTON) or IsPressed(FireWeapon). You are just giving the programmer a "friendly" alias to use for his/her program. And from your description you are writing a config file at the time of the programmatic setting of the alias. I like the design.
Krakkens and shit. stop tempting them. -- Bigdog
-
-
- Join Date
- 11-26-06
- Location
- Anywhere you want to be.
- Posts
- 3,946
- Post Thanks / Like
- Blog Entries
- 1
03-12-14, 10:31 AM #8Re: Insurgency...The new CS?
-
-
- Join Date
- 11-26-06
- Location
- Anywhere you want to be.
- Posts
- 3,946
- Post Thanks / Like
- Blog Entries
- 1
03-12-14, 11:29 AM #10Re: Insurgency...The new CS?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks