Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

182 Neutral

About Firnael

  • Rank
  1. Yes it may work for melee attacks, even with projectiles like spells or arrows if you don't wont precise collisions, but you may need them for terrain collisions.
  2. Well I'm pretty sure I need hitboxes, without them I won't be able to detect collisions Oo I'll go simple, at least at start and do what you say, do some client-side prediction to give a smooth feeling for local player, with server-reconciliation so I don't get useless rollbacks, and see if it's satisfying enough. What I was affraid of is the time needed by the server to broadcast the new game state to other players, but let's admit it, if you got 200ms latence, any action-based game feels unplayable. I need to start testing stuff.   Thanks a lot   P.S. : I almost forgot, server timestep seems to be the best solution to avoid strange situation when for example you kill a unit, client-prediction shows you its dying animation, but at the time you did this prediction, the unit used a potion and healed. When the server corrects you, you'll see the unit revive and act like "I aint even mad". I think I should definetely dig on that direction.
  3. Thanks for the advices.   I can easy imagine how to hide possible lag client-side with client-side prediction (at least with graphical and audio feedback of player actions).   Now, I was wondering what could be best for let's say a Zelda-like but with coop (not only LAN, so you need to think about sync through the internet). This is definetely not a really fast-paced shooter which would require the best precision for ex. headshots on running ennemies, while 360 unscope, but it's not a pure RTS/Target-based mmo (AKA click on target => click on spell => spell affect target) either. I want it to be based on action and therefor need a minimum of precision (WTF BROKEN HITBOX I HIT YOU I SWEAR GOD F*CK THIS LAG).   The way it's explained on the Gamasutra article you linked before seems good for a pure RTS, but is it the case for a more action-oriented gameplay ? If I understood well, all client got the exact same simulation in the same time, but they all live at least 100ms in the past. I'll read it again (english not my native language, I didn't get all ).
  4. I have to admit, the question was more about "Do I have to implement client prediction on every network game ?". I'll check thoses RTS networking models and get back asap ^^   The goal here is to find out if lag compensation is relevent in a coop A-RPG for exemple.
  5. Hi,   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.   Thanks
  6. Hi, 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 !
  7. Alright, that sounds like a good idea. Now how do you update your logic with your inputs ? Does your input manager (let's say you have one for each state) needs to know your logic (so you have to pass it references of your logic objects so he can manipulate them) or does it simply return some infos on what input have been triggered, infos that the logic is able to decode and modify itself ? I would say the second one, since your input manager shouldn't be doing something else than managing inputs.
  8. Hi, 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 update(GameState state) { switch(state) { case MAIN_MENU : if(mouse_leftbutton_clic) *go to GAME state* break; case GAME_RUNNING : if(mouse_leftbutton_clic) *go to CASTING_SPELL state* break; case CASTING_SPELL : if(mouse_leftbutton_clic) *launch firebolt and go to GAME_RUNNING state* break; } } 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 Thanks !
  9. Firnael

    RPG Items management

    Yeah, the thing is, I use Java I'm not familiar at all with functor, based on what you're saying, I can modify the behavior of my object by simply passing a functor to it ? I see my Item class with a use() method, which should change depending on the type of object. I guess this is where I use a functor...
  10. Firnael

    RPG Items management

    Ok so if I got this right, you must have something like a huge switch are something similar which contains your logic for your item class ? For example, you create a new instance of the Item class with the id 48, you parse your data file to collect informations related to this item, including his type. You see that ID 48 is the number for Health Potion. Inside your Item class logic, you're able to tell that "if I call the useItem() method with this instance, I'll drink the item because the type is Potion" ? For now I have an Inventory class which possess an arraylist of InventorySlot. This class has an arraylist of Item, and keeps the item ID and the stack limit of the item. You can have an inventory, inside it you have slots. Inside each slots you can have at least one item, and multiple items if they are stackable, with a stack limit to prevent stacking to infinity and beyond.
  11. Firnael

    RPG Items management

    Thanks guys, you're like a fountain of knowledge or whatever whould say someone how knows english better than me I think the solution that best suits what I'm looking for is having just a few class representing items categories (Ravyne idea mostly), such as Consumable, Weapon, Armor, implementing a blank interface named Item. With this, I can have and Inventory class which is a container of "Item". I'm not familiar with the script concept, I better understand the XML way (or JSON, or other, don't know what's best). My goal would be to use in the code only the item ID to manipulate items. For exemple, if I do something like inventory.addItem(48), it parses the file, look for the item with ID 48, retrieve its attributs and create an instance thanks to the good class. Is it interesting to have just a generic Item class, or a few more specific ? Should I use scripting language (I don't know anything about it, could be useful) or XML (or xml-like) ? I'm doing it in Java btw. Thks a lot
  12. Hi, 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 ? Thks
  13. Firnael

    [Algorithm] Fairy movement

    Why not, but after this, the fairy needs to go away from the player again, and the idea of a force pushing it seems great, but I don't really know how to do it. Another idea is to use the Curve class in Slick. It takes 3 parameters : start point, control point (there is 2 of them but I can just put the same value on each) and end point. The process is : you create a curve with pseudo-random values, you gather the positions of the points, each turn you move the fairy to the next point, and when you reach the last point, you take it as the new starting point for a new random curve, and you repeat the process. Have to try it, but I lose the acceleration and the velocity.
  14. Firnael

    [Algorithm] Fairy movement

    Could be a solution, but wouldn't be the movement to robotic-like ? The "chill-around" move should me smooth. I'll try and tell you if I'm happy with that, thanks.
  15. Firnael

    [Algorithm] Fairy movement

    Thanks for you reply, I'm coding with Java using the lib Slick2D. Here is my code implementing some pseudo-brownian algorithm : public class Fairy { private Image image; private Vector2f pos; // Velocity private Vector2f v; // Acceleration private Vector2f a; public Fairy(Vector2f sc) throws SlickException { this.image = new Image("data/particle.png"); this.pos = new Vector2f(sc.x - image.getWidth()/2, sc.y - image.getHeight()/2); this.v = new Vector2f(0, 0); this.a = new Vector2f(0, 0); } public void update(Vector2f sc) { Vector2f oldPos = new Vector2f(pos); this.v.x += this.a.x; this.v.y += this.a.y; this.a.x += getAccelerationRand(); this.a.y += getAccelerationRand(); this.v.x *= 0.9f; this.v.y *= 0.9f; this.pos.x = oldPos.x + this.v.x; this.pos.y = oldPos.y + this.v.y; } public void draw() { this.image.draw(this.pos.x, this.pos.y); } private float getAccelerationRand() { float rand = (float)Math.random(); if(Math.random() < 0.5f) rand *= -1; return rand * 0.01f; } } It's a 2D game, and I don't really need to use Z-axis. Currently there is no bounds, the fairy goes where it want (like a particle in a fluid, colliding with smaller particles). I could indeed make the fairy stop and go back to the player location if it's gone too far, but maybe it wont be realistic and random enough, I have to test it ^^
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!