GDNet+ Pro
  • Content count

  • Joined

  • Last visited

Community Reputation

4399 Excellent

About Mussi

  • Rank

Personal Information

  • Location
  • Interests


  • Twitter

Recent Profile Visitors

14329 profile views
  1. I'd like to add that making visual tools for this can really help give a clear understanding of the conditions and transitions involved. State machines are fairly simple, my implementation is less than 100 loc. It's setting up all the transitions and conditions where most of the complexity lies, it's hard to reason about what's going on if you have a web of states laid out in code. A visual representation makes it much easier to grasp what's going on. I'm not aware of existing tools that you could use, but I'm sure there are some out there. If there aren't any (that satisfy your needs), making it yourself could be worth your time. For example, this only took me about 2 days.
  2. Congratulations, the graphics looks pretty good!
  3. Can't believe it's been this long! I believe I first visited GDNet within one or two years after it's inception as a kid, I distinctly remember knowing vector math in high school (starting from age 12 in my country), which I had learned from one the resources available here in order to get through Paul Nettle's collision detection article. The article was published here on GDNet in May 2000, so I've probably been visiting this site for about 16-17 years! It's fun to look back at some of my old posts as a 16 y.o. kid, slight embarrassing too :P. Such a nice community, it certainly helped shape me into the person I am today. Thank you, and happy birthday!
  4. Wow, thank you so much! I had no idea such a tool existed and shipped with Windows :-o. It seems like the culprit is Microsoft Office <_<, officebackgroundtaskhandler.exe is apparently scheduled to run every hour (it runs much more frequently on my system, not sure why). Apparently there's a fix for it in build 16.0.8201.2025, which is available to those in the Office Insider program, more info here. I just disabled the scheduled task for the time being.
  5. It's been a couple of days since I've been seeing this weird behavior where some program flashes onto the screen, but before I can see what it is, it shuts down. This is very annoying as it also knocks me out of full screen mode, but I'm having a hard time figuring out what the root cause is. I've tried scanning my system for viruses, but this turns up clean. My virus scanner (Avira) also doesn't show any events in the log right after the problem occurs. The only thing I've installed lately is a licensed Autodesk's 3DS Max 2018, it comes with Autodesk Desktop App, which I've exited and removed from startup. Not sure if the problem is related to that. I've also noticed there's a service running, I'll try shutting that down to see if that helps. I'm on Windows 10 btw. Has anyone experienced something similar before? Does windows log what application have been launched and at what time? Or is there some other way to figure out what application is causing this?
  6. This assumes knowledge over what results in a false positive or false negative, which is data we don't have. You might deem it more likely to become a false positive, but I'd argue other factors are more important. Especially for a junior position, I'd be far more interested in the candidate's thirst for knowledge, personal growth, the way they approach problems and their social/communication skills.
  7. Maybe you could use rope physics, but I'm not sure if that would give you something believable.
  8. 1. What do you like about the current reputation system? Helps identity helpful posts, easy way of interacting. Nice to get recognition, but that's less important to me. 2. What do you dislike about the current reputation system? While easy to interact, there are many reasons to up or down vote and people will vote for their own reasons, which sometimes makes it unclear why someone got up or down voted. Reputation gap between new and veteran members keeps rising, no hope for a newcomer to ever catch up. The term reputation doesn't seem like a good fit. 3. Do you have any proposals to improve the existing system? When voting, show a small fixed list of reasons for the user to choose from. E.g. answers the question, helpful, funny, other. Show stars or something similar instead of points publicly, up to a max of 5 or so, where every 1000 rep amounts to one star or some other number you see fit. Privately the user could still see his actual amount of points and keep earning points. Rename reputation to rank?
  9. First get the closest point p' on the infinite line going through s and e and let d = |p' - s|. We can calculate d with vector projection: d = ((e - s) · (p - s)) / |(e - s)| Knowing d, we can easily get p' as follows: p' = s + d * ((e - s) / |(e - s)|) Now we can check if p lies inside the rectangle as mentioned earlier by Álvaro. If ε < d < |(e - s)| + ε and |p - p'| < ε your point lies inside the rectangle.
  10. As Kylotan pointed out to me, the term rewinding is ambiguous and can mean looking up some previous state, and going back to a previous state and simulate forward again to the 'present'. So to clarify, to solve the case of simulations becoming divergent you don't need either form of rewinding on the server. You could rewind and forward on the client or you can just send the correct state from the server for clients to snap/interpolate to. For some type of games you will need to be able to look up a previous state. Having that could make it trivial to add the ability to forward the simulation from that state, which might be a reason to go for that route. There are a lot of ways to go about this, each with their own costs and benefits. Choosing what's right for you depends on the time you are willing to invest, the complexity you can handle, the type of game you are making and other requirements you might have.
  11. Don't have to be spikes at all, simulations will diverge even with best connections out there. Unless you have lock-step, you either need to have rewinding or continuously correct clients. For some games (e.g. FPS), it's imperative to have rewinding for them to be 'playable'.
  12. Networking and game design are closely related and there are always trade offs involved. If you're making a competitive game and the single press of a button determines the outcome (e.g. your race example), then you might want to forgo responsiveness and let the server decide when the button was pressed. If that makes your game feel too unresponsive, you can try hiding the latency with client side prediction/animation/sounds. But you could also go for another design, where the outcome is not determined by a single button press. If you need to maneuver through some track and other players can interact with you, it becomes less attractive to send some input in the past, because it requires the cheating client to not have given any input until that point in time (doing so would prevent the server from accepting the past input since all packets are sequenced) and it binds them to that choice which might make reacting to other events impossible. For a game like Smite, I can image that movement allows for some rewinding to make that feel as responsive as possible, but the use of abilities may not. Ideally you want this to be in the game by default, the client's simulation should run a little bit ahead of the server. The added benefit is that your server will have to do less rewinding and forward simulations, which can be costly (processing wise) depending on the type of game.
  13. You could tick slightly slower. E.g. if you tick at 25hz, that's 40ms per tick. Increasing that to 41ms will slow you down by about 2.5%, which is probably not very noticeable to the player, but it will also not close the gap very fast (6.4s for 3 ticks at 25hz). There's a bit of a trade off to make between closing the gap faster and how noticeable the slowdown is to the player, this doesn't have to be a static value though, you can adjust the slowdown based on how large the gap is.
  14. You could also send ping requests from the client and store the receive time on the server. Once you send a 'game' packet on the server, send the delta time along to save some (significant) bandwidth overhead of directly sending a pong packet. On the client side, measure the difference between request and response and subtract the delta time.
  15. First of all, don't use vector<vector<int>>. Your data will not be laid out contiguously in memory and it complicates identifying a node, which should be as simple as using it's index in the array. Two dimensional arrays are just one dimensional to the computer, so array[n][m] is the same as array[n*m] which means all you need is vector<int>. To compute the index of the 2D coordinate [x, y] you can use x * m + y.   Yes, they're just indexes to the start and goal node. A grid is a type of graph, this doesn't matter to the algorithm.   No need to build an adjacency matrix if you're using a grid, you can easily compute the indices of the adjacent nodes. The indices of the adjacent nodes are i +-1 and i +- m + <-1, 0, 1>.   vector<int> { 1, 1, 1, 0, 0, 1, 1, 1, 1 }   Minimal in what sense and why?