• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

10221 Excellent

About Kylotan

  • Rank
    Moderator - Scripting Languages and Game Mods

Personal Information


  • Steam
  1. Game of the General AI Implementation

    No. If there are 21 possible pieces, and 3 of them can be beaten, then the chance of winning is 3/21. If you include the chance of a draw, then it maybe doesn't make sense to think in terms of the chance of winning - instead you might have a 'score' for each challenge, and count a draw as the average of a win and a lose. That would make the following: Private vs 3 pieces it always wins against: 3 * 1 = 3 Private vs 12 pieces it always loses against: 12 * 0 = 0 Private vs 6 pieces it always draws against: 6 * 0.5 = 3 Total 'score' for attacking an unknown piece: 3 + 0 + 3 = 6 (out of a maximum 21, for a hypothetical piece that always win against any of the 21 opposing pieces) Same equation for general: General vs 19 pieces it always wins against: 19 * 1 = 19 General vs 2 pieces it always loses against: 2 * 0 = 0 General vs 1 piece it always draws against: 1 * 0.5 = 0.5 Total 'score' for attacking an unknown piece: 19 + 0 + 0.5 = 19.5 (out of a maximum 21) The higher the score, the more beneficial it is, ignoring the value of the defeated piece or the implications for future turns.
  2. C# hi guys i need some help to make rts style move

    Moving to 'For Beginners'. You need to tell us what you mean by "this doesn't work". What happens? Nothing at all? The wrong path? You also need to explain what you've done so far to try and debug the problem. Have you used Debug.Log statements to make sure that all the code is getting called when you expect it to be? You also need to show more code, so we can get a proper idea of what you're currently trying.
  3. The Proper Steps to Game Design

    There's no "one true way" to design a game, and the approach would differ depending on your experience, the size of the team, how it's being funded (or not), whether the designer is also going to be the programmer, etc. For a complete beginner I would recommend writing a one-paragraph summary of what the core of the game is about, and then list all the key features. Each of those features then needs to be specified in a reasonable amount of detail, with reference to how they interact with the others. Entities in the game (such as characters, enemies, weapons, items, etc) also need listing, so that there is an idea of how many assets need creating. From there, you can start building, and design things in more depth as you need to. I don't recommend working on a traditional 50-page design document - nobody is going to read it except you, and you'll find yourself needing to change it as you go along anyway.
  4. The easiest way is to make your client side simulation handle entities completely independently, rather than having the potential for a server update from one to interfere with a client update for the other. Another way to make your life easier is to avoid all this 'rollback' stuff unless you're 100% sure you need it. In most games, you don't.
  5. Game Name Issue

    In some countries, trademarks don't have to be registered for legal action to be brought. You're clearly likely to be at risk of infringing here as it's a very similar name for a similar product in the same industry. The worst case is not that your game is removed from Steam, the worst case is that you're successfully sued for damages relating to their branding and lost income, and maybe even jail if you can't pay up, depending on jurisdiction. So I'd tread very carefully here.
  6. Game of the General AI Implementation

    The game is somewhat similar to Stratego, which is quite well studied, but quite complex. (e.g. the thread below). If the focus of your thesis is not the AI, I'd be tempted just to stick to a simple tree search. Each AI player needs a function which can answer the question "What's the chance that Piece A defeats Piece B". This is where those probabilities come in - if you have a General, the result is 1.0 (it always wins, if I understand the rules correctly), if you have a Major, the result is 0.619 (because it can beat 61.9% of the pieces on the board), etc. That's based on the quantities of pieces at the start - you would improve the system by adjusting the probabilities as pieces are removed, and you can further improve the system by remembering things about specific pieces (so you can return 1.0 or 0.0 instead of an estimate) and weighting different attacks based on how useful they are (e.g. defeating a general is more useful than defeating a private).
  7. Visualise the nodes that your algorithm is exploring, by marking them in the game world somehow. Show the connections from each node to the previous one. Ideally show the f/g/h scores in each place.
  8. You can never guarantee perfect synchronisation, so you can never be 100% sure of when a client performed a certain action. All you can do is decrease the degree of error. If you are continually measuring and correcting the RTT then you can be reasonably confident about the time that the client performed the action - unless their network latency changed significantly since your last measurement, which does sometimes happen organically, and also sometimes happens artificially when it might benefit the player. You can choose to let clients send the time of their action, and compare that to your estimate based on RTT. The server could then choose to accept the client's reported time providing it doesn't differ too much from your calculation - this will give you slightly more accurate timings for the players that aren't cheating, but gives players a small opportunity to cheat by manipulating that value when it suits them.
  9. Game of the General AI Implementation

    Are you familiar with Chess AI, and standard minimax approaches? It is more complex when you have hidden information, as in this game, but an AI can often do well by using estimated information (e.g. based on a heuristic) instead of the known values. (Also, this is the wrong forum for technical questions, so I'll move it to a more relevant place.)
  10. C++ Invalid read of size 8

    You can't index the value at pvtCols. Each row has a number of elements, where that number equals pvtCols. You ensure that yourself with the new statement above. If pvtCols==2, then you can't access row[2], because that is one past the end - only row[0] and row[1] are valid. If pvtCols is zero, like you say, then none of this could possibly work because you're allocating zero-width rows.
  11. GDC from career perspective

    The thing I would say about GDC is that if you don't already know how it will benefit your career, then it probably won't. Do you have specific business or networking goals in mind, and a reasonable belief that being there will bring you in to contact with people that are willing to help you meet them? If not, then the expense will not be worthwhile for you. There's this whole buzz that suggests "all game developers need to go to GDC to network" but the fact is, the vast majority of developers never go there, and many who do go don't find it as transformative as is suggested. And this isn't surprising - the organisers have a vested interest in making it a popular event and this hype sells tickets. But there aren't hordes of recruiters looking to hire any newbie that walks through the door, or investors waiting to shower money on every indie dev that shows up with a demo. By comparison, when you consider smaller meet-ups, the equation is quite different. You're still unlikely to meet someone who changes your career overnight, but the cost is far lower and you have little to lose, and plenty to gain on the networking front. It's also not a binary choice between "now" and "later". You can go more than once! Each time you go, you have a chance of meeting people that could be useful to you in future, and vice versa. Just be aware of the cost/benefit balance.
  12. Where I can discuss game promotion here?

    That would ideally be the Game Business forum: https://www.gamedev.net/forums/forum/23-games-business-and-law/
  13. Looking to join a startup game studio?

    Wrong forum, so moving to the right place.
  14. No, it's not a good idea to make your code convoluted to reduce 100 virtual function calls per second. If it were 1998, it might be different, but it's not 1998. When you have tens of thousands of virtual function calls per second, then it might be worth looking at.
  15. It's right there in your code, in the Update function: if (m_PlayerIsMoving) { m_player->Move(dt, m_playerDirection); m_playerDirection = 0; m_PlayerIsMoving = false; } That basically says, if the player is marked as moving, move it 'some amount', then stop immediately. Is that not what you want? If the distance you move is not what you expect, you should alter your Player::Move function to calculate the movement vector as a separate statement, then you can log that to the console or put a breakpoint on it to see what the calculation shows.
  • Advertisement