Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Jun 2012
Offline Last Active Jul 31 2013 07:57 AM

Topics I've Started

Apply Lag Compensation on non-instant events

07 March 2013 - 04:06 AM



I was reading this nice article for the 3rd time (after I read this blog entries 4 times). I got pretty much all of my questions answered but I miss something to get the global idea.


When you use Lag Compensation on instant events (like a gun shot in Counter Strike, bullet instantly teleport this its final location AKA a player or terrain if you missed), it's easy for the server to get the time when the event was fired, and rollback the entities positions in the past to perform the collision test.

Now when you deal with slower but yet precise collision detection over the network, like a skillshot in a MOBA (ex. a fireball with no particular target, go straight forward until it vanishes or hit some enemy), how do you handle proper lag compensation ?


Since the projectile has to travel and not teleport, you test collisions every game update, and if you do want to apply lag compensation, you have to rollback all entities (at least the near ones) every update.


Is that relevent ? I've always wondered how games like LoL ou DotA could feel this smooth.

I'm asking you this because I'm pretty sure dead reckoning and entity interpolation is near to unusable on situation like this kind of fast-paced games, you can't predict what the players will do next.



[JS] I need advices on which lib to use !

06 December 2012 - 03:22 AM


I'm looking for a lib to create a multiplayer game with persistent world in html5 and js.
It's rendered in 2D isometric perspective.

During my search I ran into this site (http://www.isogenicengine.com/) and found it to be the thing I was looking for, but unfortunately the server functionnality are not in the free package, and since this is a school project, I'm not paying anything.
I can still use the available functionnalities for the client.

But I don't know what is best for the network part. I checked Chilly (http://chillyframework.com/), but it's really poor in doc and I'm not a pro in js nor network based games.
Do you guys have something that could help ?

Thanks a lot !

Handling inputs the right way

26 September 2012 - 04:14 AM

I'm (ultra) confuse about input managment. I've the global idea, but I can figure out how to implement something which fit my design (maybe because it's a lame one).
The context is a state based game. For the example, we wil define 3 states : MAIN_MENU, GAME_RUNNING, and GAME_CASTING_SPELL.
In this 3 states, the action "left-button mouse clic" will be handled differently :
- In the MAIN_MENU state, the input will change the state, from MAIN_MENU to GAME_RUNNING.
- In the GAME_RUNNING state, the input triggers a player action : cast a spell (let's say firebolt), which change the state from GAME_RUNNING to CASTING_SPELL.
- In the CASTING_SPELL state, the input gives informations for the spell, for example his target. You clic somewhere and the firebolt goes there. This input changes the state from CASTING_SPELL to GAME_RUNNING.
Somewhere I'll need a class (let's call it InputManager) which needs to know the state the game currently is, like this (pseudo-code):
(method called every tick <img src='http://public.gamedev.net//public/style_emoticons/default/smile.png' class='bbc_emoticon' alt=':)' />
update(GameState state) {
	switch(state) {
		case MAIN_MENU :
			*go to GAME state*
	   case GAME_RUNNING :
			*go to CASTING_SPELL state*
			*launch firebolt and go to GAME_RUNNING state*
How do i link my classes together ? My input manager needs to know the existence of the other objects and classes to update their logic.
Plus, what happens when I want an event to trigger when the player presses 2 buttons at the same time ?
Should my input manager return an array defining the state of my keyboard and mouse input and instant T ?
What I said may be huge crap, I need a teacher Posted Image
Thanks !

RPG Items management

27 August 2012 - 06:32 AM


I'm wondering how should items should be handled in a rpg-type game, knowing that the player could find a lot of different items in his quest.
Should I create a class for each item of the game, with abstract classes to separate each different types of items, or should I simply store everything in an XML-like file and import items from it.

After this I would like to implement an inventory class, with item slots, stackable items, drag and drops. Because of this, I need the items to have at least an unique identifier which I could retrieve easily.

What do you think ?


[Algorithm] Fairy movement

10 July 2012 - 02:35 AM

I'm programming a 2D game and I'm trying to make something cool with the light.
I wrote a little tile-based light engine which kinda works, and I would like to test it's efficiency.

I would like to recreate something like the fairies from the Zelda games. An entity (little fairy) flying arround the hero, enlightening the area.
The light part is ok, but I'm having some trouble on the movement algorithm.
I tried some pseudo-brownian movement, but it's not really what I want, the fairy flies away and never come back (which is sad), it should chill around the hero, but not too far.

Do you have any idea ?

Thanks ! (this message may contain some noob english mistakes, it's not my native language)