_id
int64
0
49
text
stringlengths
71
4.19k
17
MMO techniques, algorithms and resources for keeping bandwidth low? Are there any resources and documentation on how current MMOs handle the action and movement data from the compression to the handling on the client? Any resources for movement prediction algorithms? I'm especially interested in those that have wsad movement and focus on keeping latency low Also what is the packet rate and size for different types of MMOs(network wise)? Is there a way to scale the packet rate or outright disable some packets if the player can't reach or in the later case see them?
17
Appropriate MMORPG battle system for Android oriented MMORPG? I need a tip for a game I'm making. Because of many issues I want to make a 2D mmorpg A 2D game is easier to code (I'm using ActionScript3 Starling). I can more likely find preexistent graphics, and handling them is easier. Fundamentally I don't want to eat the device's memory!! Common devices here have at most 1GB RAM memory. But when I think about battle systems, I imagine stuff like Argentum Online and Tibia. Those battle systems were OK on mouse keyboard based systems. AO's battle system will be really hard to use (specially by any spellcaster class) in devices like Samsung S3 mini. OTOH when I think in systems like Pokemon or Golden Sun, both of them being turn based, I ask myself about the interation battles would be locked (they have a protocol, you cannot suddenly leave a fight, you can take as long as you want in each turn,...) which is not acceptable in a mmorpg for many reason (mmorpg users do not expect a protocol, they expect to leave a fight as they'd like, they would HATE users who suddenly go AFK on the middle of a battle without having opportunity to act). What battle interaction would be a good balance between mobile device friendliness and not being a pain in the ass for game dynamics? Suggestions are accepted here (we cannot expect game design have absolute decisions at all).
17
What are some alternative options for saving level data for a game like Hurtworld? For a multiplayer building crafting game like Hurtworld (where the player can build structures on the map), what are some alternative options or example data structures for saving the world data on the server? Level data including Grid of squares that foundations can be built on, with a flag to indicate whether the square is empty or already has a foundation Walls etc which have been built on the foundations, and multiple floors above Windows doors which can be built on window frames door frames Furniture machines which can be placed on foundations floors Other dynamic world data such as trees, animals, chests with items, etc I feel like it's too much data to store in a database. Am I wrong? If it can be stored in a database, how can I get my head around the data structure I would need to set up? Is there some simplified example? Can each square in the world grid be represented by 1 row in the database? And should there be a new row for each structure built on a square, with that row referencing the square structure that it was built on?
17
Integer vs String for "type" data in data driven games I've been developing a few mobile games, in which those games fetch their data from a server database. I'm used to storing "type" values as an integer identifier, and an enum in the client to identify the data coming from the server. I'm under the impression that games like MMOs or PC games that get patches model their data to identify "types" as integers. As an example On the database table Monsters Table MonsterId(int), Name(string), MonsterType(int) On the client sided code typedef enum MonsterTypeGround 1, MonsterTypeAquatic 2, MonsterTypeAmphibious 3, MonsterTypeAerial 4 MonsterType Is there an objectively correct answer on what to use (int vs string) for these types of data? Do I have the correct impression that MMO's usually use integers for this, or it highly depends on the developers as well?
17
How do I create a big multiplayer world in UDK? I want to create a big multiplayer world in UDK and I'm having a few difficulties. I created the biggest terrain possible but then any terrain related action I do takes forever. However, I've seen videos of people make same size terrain and working without a problem. My pc is strong enough, so maybe someone can tell me what I'm doing wrong. I want to make it even bigger then the biggest terrain size, so I was thinking of doing level streaming but then I read that streaming is working server side which means if I have a player on every terrain all terrains will still be loaded and I want to save as much memory possible so it will work well online. Thanks for any help you can give.
17
What are some examples of MMOs with small development teams? I'd like to see a list of MMOs with small development teams in order to better understand where small teams have found a place for themselves. While examples of MMORPGs are of interest, so are games focusing on socializing, trade and commerce, city or empire building, crafting, exploration, strategy and so on. Any shipping game supporting between, say 800 and 10,000 simultaneous players belongs on this list.
17
Is there a way to make a dynamic world such as a MMORPG horizontally scalable? Imagine a open world of 500 players with data changing as fast as 20 updates player second. Last time I worked in a similar MMORPG, it used SQL, so obvioulsy it couldn't query the DB all the time. Instead, it loaded all players from the DB to memory as C objects and used them. That is, it scaled vertically. Would it be possible to make that server horizontally scalable instead? Is there a database designed to support that amount of updates concurrently?
17
Scalable server for MMO We are looking for the solution for game server for instantiating game instance on nodes. We tried to use this solution, but it has scalable problems, as you can see on diagram Cause only 1 instance of Zone Master can be instantiate in same time and it doesn't support replication. So if it shuts down, players cant' play anymore. So we are trying to find better scalable solution. Any suggestion? P.S. game has more than 10k users online
17
Why would an online MMO throttle actions per day? I started playing Die2Nite and was surprised that it has such a strict limit on the number of actions per day. After a while, I figured it was just part of the charm. I also started playing Magic Duel and it has a similar mechanic that limits the amount of actions per day. Is there a game design principle behind a decision to limit actions per day in an MMO?
17
MMO, server side line of sight I am working on a simple tile based multiplayer game. I am rather experienced programmer, but not so experienced game developer. The players will see each other depending if there is a blocking object between them or not. The objects can be moved around, so the map is not static. If A moves (or performs other action) and B sees that (LOS is not blocked) then B client will be notified and will update it's view. If B does not see A, then B will not be notified. Question Should I notify client A about B's movement regardless of LOS, perform all the LOS checking on the client side and update the view accordingly, or... should I do all the LOS server side and notify client A only in case of visible movement? I know than, in principle, I should not trust client side and not send anything to the client that is not necessary (client code can be hacked and show movement out of LOS). But, if there is a significant number of players at once, then I am afraid than the server will not cope with tracking all LOS for all the events and all the players. How to cope with this problem? Is there some "standard" solution here? I know that it might be a premature optimization (I don't have this problem yet), but protocol and map data structure will depend on that. P.S. The client and the server will be open source, so hacking the client will be easy
17
building timers in strategy games I've got a web based strategy game in which you build a city. Coding is smooth, but I'm kind of hung up on how long it takes my buildings to build. I want to keep the user playing, but have them long enough to keep them having to come back to the game. I've currently got it where each building has a base build rate that is exponentially increased by the building's level. I can adjust the times by changing the base build rate, but I was wondering if there is a better, or perhaps more widely accepted way of doing this. I worry that a 113 day build on a level 10 building before reaching the next city level where the user has to start over will discourage further playing.
17
List of Anti Cheat Packages for MMOs? i would like to start this topic for programs to counter attack link text. I am not aware of a big list but with everyone's help i hope to make this a fine topic. Posting format NAME nProtect GameGuard GAME TYPE any type of game Website http global.nprotect.com product gg.php FEATURES? Protect the users' PC from fast evolving hacking technologies and viruses. Real time protection, diagnose various patterns latest hacking tools that can harm games, but also memory debugging prevention technology will be applied, completely blocking hacking tools through real time hacking tool monitoring and blocking function. Blocks hacking attacks through memory scan Blocks online outflow of personal information
17
is it possible to make a MMO starting with scalable hosting? I made a really basic 2D RPG. I want to know whether I can turn it into a free to play MMO. I cannot afford to rent a server with enough capacity to serve a big number of players but I'm wondering whether I could get a hosting plan that starts cheap but scales enough to eventually handle a big numer of users so I have minimum fixed costs and I can cover expenses on the go with ads or whatever. Is there such a thing? Thanks
17
What languages are used to develop MMORPGs like EVE Online and WOW? As I understand it, MMORPGs are games that run on your computer like any other normal 3d video game but, with each action that happens with in the game, changes are made to the universe via HTTP calls to the server. So the players computer does all the heavy lifting in terms of rendering the graphics and animations but, web frameworks do the online communication. So I am wondering what web frameworks, web servers and databases are being used to create MMORPGs like EVE Online and W.O.W.? Also, what programming languages and 3d game engines are being used to make the client side (3d graphics animation sounds) part of the game?
17
Is there an MMO related research body? I'm trying to find a research resource for MMOs preferrably where people send papers to be published, have conferences, etc. If nothing else, just a repository of articles would be nice. Is there a site like that? I'm assuming it would be a subconference of a bigger group.
17
Should I keep login server apart from game server? I'm thinking of making a MMO server, and I've been looking at how other games structure their network. One of the things I've noticed is that there's always a Login server and then the game server(s). I'm still deciding if I should do this, but I would like to hear some opinions first. What are the advantages of this, and how does the login server communicates with game server to handle logins?
17
MMO Server monster handling Dabbling with basic MMO code because it intrigues me. How does the server handle monsters mobs? I understand that generally on each game tick, the server loops through each player to send them updated positions of each other nearby player or mob. So every player loop you're also looping through every other player but is it just standard to loop through the entire mob list too? I mean there could be 1000 mobs idling around the game world zone. Would this just slow the loops down? I thought maybe they keep a seperate list of ACTIVE mobs, ones that are either near a player or are chasing a player, but that would still require looping the idle ones to check if a moving player comes near one. Unless the aggro loop is less frequent (thinking out loud here).. Is there some tricks or common workarounds involved? Or is that just how they work?
17
Would using Lua scripts to define game logic for an MMO server be a lot slower than compiled in C ? I am using an entity system for my MMO server and I was thinking about defining the behavior of "actions" using Lua scripts. The server is written in C . I am not very familiar with the speed memory usage of Lua in C but I have used it for scripting the GUI of the client. Would using Lua to define the game logic on the server side cut the performance by a lot?
17
Is there an MMO related research body? I'm trying to find a research resource for MMOs preferrably where people send papers to be published, have conferences, etc. If nothing else, just a repository of articles would be nice. Is there a site like that? I'm assuming it would be a subconference of a bigger group.
17
What are some good MMO middleware server packages? If you have any experience with any MMO middleware packages and have any positive or negative experiences with them, your feedback will be appreciated. Specifically I'm looking for server packages. Price, functionality, speed, and ease of use would all be useful metrics to know about. For example, doing some preliminary research has led me to some packages like Exit Game's Photon, RedDwarf Server, and SmartFoxServer.
17
Alternatives to storing all my entities in an SQL database I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework to manage that, only to realize that many SQL queries took more than 10ms, which is unsuitable for use in a game loop. I first thought the delay was I O bound, so I created an in memory MySQL cluster. This was better, but still not real time enough for a game loop. Has anyone built an SQL based entity system? If so, how did you manage to keep query times manageable? If an SQL database isn't feasible for performance issues, what data structure could I use to retain the entity system idea and the possibilities of direct SQL requests on components? I've heard of many MMOs running on SQL. Do they use it for only part of the data or a full entity system? How to separate database stored and classical memory stored structures in that case? Edit for clarification Yes, all game data is stored in the database. If say I run my physics system it will first get data from SQL, then do its stuff, then insert the updated data back to the database.
17
Strategy City Builder browser game technical details I actually have multiple questions into one. Hopefully someone can hit all of them. I wanted to give a try at a massively multiplayer web based game. Basically, the game would have similarities to Evony, or Eve Online (a much scaled down version). The idea is it would be a mostly real time city builder (like Evony) that allows complex actions between players (like Eve Online but without the graphics and much scaled down). It would sort of be like a database game. I want it to be able to support around 500 people simultaneously online off one server. However, I have multiple issues that I want to pin down before I actually start writing the code. Continuous database updating The database has to be continuously updated on a small time interval to reflect the passage of time in the game verse. Furthermore, the effects of all actions will have to be calculated as well. Right now I'm thinking about using mysql with events using the innoDB engine to do this. Is there a better faster approach to this? Continuous graphical updating Certain details (such as "time till completion" etc when building something) need to be continuously updated on the user interface. I'm thinking about having each page in the user interface continuously make ajax calls for the information. Again, is there a better faster way? Thanks
17
Alternatives to storing all my entities in an SQL database I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework to manage that, only to realize that many SQL queries took more than 10ms, which is unsuitable for use in a game loop. I first thought the delay was I O bound, so I created an in memory MySQL cluster. This was better, but still not real time enough for a game loop. Has anyone built an SQL based entity system? If so, how did you manage to keep query times manageable? If an SQL database isn't feasible for performance issues, what data structure could I use to retain the entity system idea and the possibilities of direct SQL requests on components? I've heard of many MMOs running on SQL. Do they use it for only part of the data or a full entity system? How to separate database stored and classical memory stored structures in that case? Edit for clarification Yes, all game data is stored in the database. If say I run my physics system it will first get data from SQL, then do its stuff, then insert the updated data back to the database.
17
How does mmorpg store data? I want to use sql database in my server.exe. lets say 1000 users online. And players will change their data when they play. And server need to save these updates. But how ? i think there two way 1) server will save in ram at run time and sometime or hourly server will write data (update) to sql database from ram. But if electricity goes or somehow the server shuts down , updates won't save. of course i don't want lose updates. 2) server will save updates in database at run time. but what will happen to speed ? I thought of a method. i will show you below with image. Can i get enough speed for 1000 online players with this method ?
17
MMO Some NPCs controlled clientside? I'm making an online game and considering whether to handle certain NPCs clientside. Is this common? For example I play Elder Scrolls Online and it seems basic townspeople NPC locations aren't quite synced up with my friends. I guess it makes sense if they're only wandering around in a set area for that to be handled clientside right? So my question is, should I go with this method, or are there any good reasons why I shouldn't? Any examples of games that do, so I can see how they handle it?.
17
Integer vs String for "type" data in data driven games I've been developing a few mobile games, in which those games fetch their data from a server database. I'm used to storing "type" values as an integer identifier, and an enum in the client to identify the data coming from the server. I'm under the impression that games like MMOs or PC games that get patches model their data to identify "types" as integers. As an example On the database table Monsters Table MonsterId(int), Name(string), MonsterType(int) On the client sided code typedef enum MonsterTypeGround 1, MonsterTypeAquatic 2, MonsterTypeAmphibious 3, MonsterTypeAerial 4 MonsterType Is there an objectively correct answer on what to use (int vs string) for these types of data? Do I have the correct impression that MMO's usually use integers for this, or it highly depends on the developers as well?
17
How to update the monsters in my MMO server using Node.js and Socket.IO Currently I am creating an MMO using Node.js and Socket.IO. The node server needs to handle connections for players, and also use a loop to update all monsters positions in my game and let them attack players in range. For the loop I read that you can use process.nextTick or use a child process, which option would be the best choice? What are the advantages disadvantages of using each? Also, how many times per second should I run this loop for the monsters?
17
How does mmorpg store data? I want to use sql database in my server.exe. lets say 1000 users online. And players will change their data when they play. And server need to save these updates. But how ? i think there two way 1) server will save in ram at run time and sometime or hourly server will write data (update) to sql database from ram. But if electricity goes or somehow the server shuts down , updates won't save. of course i don't want lose updates. 2) server will save updates in database at run time. but what will happen to speed ? I thought of a method. i will show you below with image. Can i get enough speed for 1000 online players with this method ?
17
How to manage requests for a MMOG? I read that most servers handle more than 50 requests per second. Is this true? how many requests can a normal server handle? How do MMOG manage requests having to update player actions instantly?
17
Is it a legal thing to do to sell fabricated accounts of your game? For example, say I create an online mass multiplayer game with in game purchasing system and with randomness factors as well (the point is that game accounts have actual value and there is a somehow proportional relationship with playing time plus the luck of the player and the account's value) and the game appears to become popular. Is it legal to, for example, insert cheated accounts into the database (without even spend a second of legitimate playing) and sell those accounts with extremely high price?
17
List of Anti Cheat Packages for MMOs? i would like to start this topic for programs to counter attack link text. I am not aware of a big list but with everyone's help i hope to make this a fine topic. Posting format NAME nProtect GameGuard GAME TYPE any type of game Website http global.nprotect.com product gg.php FEATURES? Protect the users' PC from fast evolving hacking technologies and viruses. Real time protection, diagnose various patterns latest hacking tools that can harm games, but also memory debugging prevention technology will be applied, completely blocking hacking tools through real time hacking tool monitoring and blocking function. Blocks hacking attacks through memory scan Blocks online outflow of personal information
17
Best practices for periodically saving game state to disk I'm working on an MMO. All of the player and environment data lives on a server and is kept in memory. There's a "world" object which keeps track of all of the maps, characters, etc. and their relations to each other. To avoid data loss in case of a crash, I've been periodically serializing the world to disk. The trouble is, this object can be quite large, so when the server starts writing, there's noticeable in game slowdown for a few seconds, which I'd like to avoid. Any pointers on how to go about this in a more efficient way?
17
Accurately record and play back game sessions in an MMO timing issues? In order to detect and reproduce bugs in an MMO, recording game sessions on the server can help. How can such recording and replay of the data be implemented to be accurate, i.e. be 100 deterministic produce exactly the same result on each replay? I intend to record timestamped incoming messages as the only data necessary, if possible. The playback would use the database snapshot as present at the beginning of the recording. Details about the MMO mainly I O driven (act on incoming network messages plus simple periodic AI) 2D C and Lua, RDBMS for storage. Clients send updates at around 1 3 times per second due to the simple nature of the MMO In particular, consider timing issues If run time for computations on playback differ from the run times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px). How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?
17
What are some examples of MMOs with small development teams? I'd like to see a list of MMOs with small development teams in order to better understand where small teams have found a place for themselves. While examples of MMORPGs are of interest, so are games focusing on socializing, trade and commerce, city or empire building, crafting, exploration, strategy and so on. Any shipping game supporting between, say 800 and 10,000 simultaneous players belongs on this list.
17
database design for browser based game I'm wondering how to design a database for the player's experience, whether to create a single table that will collect basic information such as. Class, race, number of experiences, number of occupied bases, etc. Or whether it would be more ideal to divide it into individual databases
17
Scalable server for MMO We are looking for the solution for game server for instantiating game instance on nodes. We tried to use this solution, but it has scalable problems, as you can see on diagram Cause only 1 instance of Zone Master can be instantiate in same time and it doesn't support replication. So if it shuts down, players cant' play anymore. So we are trying to find better scalable solution. Any suggestion? P.S. game has more than 10k users online
17
Alternatives to storing all my entities in an SQL database I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework to manage that, only to realize that many SQL queries took more than 10ms, which is unsuitable for use in a game loop. I first thought the delay was I O bound, so I created an in memory MySQL cluster. This was better, but still not real time enough for a game loop. Has anyone built an SQL based entity system? If so, how did you manage to keep query times manageable? If an SQL database isn't feasible for performance issues, what data structure could I use to retain the entity system idea and the possibilities of direct SQL requests on components? I've heard of many MMOs running on SQL. Do they use it for only part of the data or a full entity system? How to separate database stored and classical memory stored structures in that case? Edit for clarification Yes, all game data is stored in the database. If say I run my physics system it will first get data from SQL, then do its stuff, then insert the updated data back to the database.
17
Why does editing the client's memory in some MMOs allow them to cheat? Why editing the memory of the game client works? Why so many "Hack protection" tools coming with the clients? If I were to design a client server game, everything would happen at the server (the simulation of the game world) and clients would be only passive consumers receiving status updates of the part of the world near their characters, sending only some information like keystrokes or move action commands. Maybe I missing something here, but with that design, any hack like raising my STR by 200 in the client memory (if the value is present at all), just won't have any effect. The only explanation I can think is that games in which memory editing works let parts of the simulation run in the client and the server then just synchronize all the clients periodically. I can understand that design for Real Time Strategy games with a fixed number of players once a match is configured, but, why in MMORPGs? Is it a strategy to reduce server load?
17
How to make sure user is running the newest version of mmo client? In typical mmorpg game, you have a launcher and a client. You first run the launcher to update the client, then you run the client. In every mmo I tried if you run a client without updating first (if update is available), it automatically closes and (usually) starts launcher. My question is, how can you check if user has the proper version of client? I though about server asking client about its md5 however it's so easy to cheat. I think that there is no safe way of handling it yet every mmorpg I know uses such a system. So how do mmorpg games handle this problem? To make sure that the client is at the newest version?
17
Appropriate MMORPG battle system for Android oriented MMORPG? I need a tip for a game I'm making. Because of many issues I want to make a 2D mmorpg A 2D game is easier to code (I'm using ActionScript3 Starling). I can more likely find preexistent graphics, and handling them is easier. Fundamentally I don't want to eat the device's memory!! Common devices here have at most 1GB RAM memory. But when I think about battle systems, I imagine stuff like Argentum Online and Tibia. Those battle systems were OK on mouse keyboard based systems. AO's battle system will be really hard to use (specially by any spellcaster class) in devices like Samsung S3 mini. OTOH when I think in systems like Pokemon or Golden Sun, both of them being turn based, I ask myself about the interation battles would be locked (they have a protocol, you cannot suddenly leave a fight, you can take as long as you want in each turn,...) which is not acceptable in a mmorpg for many reason (mmorpg users do not expect a protocol, they expect to leave a fight as they'd like, they would HATE users who suddenly go AFK on the middle of a battle without having opportunity to act). What battle interaction would be a good balance between mobile device friendliness and not being a pain in the ass for game dynamics? Suggestions are accepted here (we cannot expect game design have absolute decisions at all).
17
Is it a legal thing to do to sell fabricated accounts of your game? For example, say I create an online mass multiplayer game with in game purchasing system and with randomness factors as well (the point is that game accounts have actual value and there is a somehow proportional relationship with playing time plus the luck of the player and the account's value) and the game appears to become popular. Is it legal to, for example, insert cheated accounts into the database (without even spend a second of legitimate playing) and sell those accounts with extremely high price?
17
MMO techniques, algorithms and resources for keeping bandwidth low? Are there any resources and documentation on how current MMOs handle the action and movement data from the compression to the handling on the client? Any resources for movement prediction algorithms? I'm especially interested in those that have wsad movement and focus on keeping latency low Also what is the packet rate and size for different types of MMOs(network wise)? Is there a way to scale the packet rate or outright disable some packets if the player can't reach or in the later case see them?
17
How do you design a record replay system for a frequently changing game? I'm working in a free MMORPG and I have a problem. I'm (with other people) developing a video recording system for the game. The idea is basically we record all the packages sent amp received with timestamps, plus some local data from the client, and then dump it in a file. For playing the video, we just emulate everything that's on the file. We also have an option to export the video to avi with ffmpeg. The problem is when we change between versions of the game, it is hard to maintain backwards compatibility for the video (commands added removed, function changes, etc). Is there a good way to handle this problem? instead of having a bunch of different players and choose the right one for each version of the video file? It would be helpful to know how does other games handle this situation. Thanks for the help, sorry for my english.
17
Recommended RPG game that can be used to learn game Modding? I would like to learn game development via game modding. RPG MMORPG is one of my favorite genres. Could someone recommend me a good and recent ( I would like to play the game as well) game to learn game modding. Something with the likes of Neverwinternights 2. Thank you very much for the responses. Appreciate it.
17
Profanity filter for an MMO chat We are developing an MMO using Smartfox Server. The targeted audience is kids from 7 12 years. There is a global chat option in this MMO. Whatever the user types in a textbox get displayed next to users avatar after he she hits enter. We would like to filter abusive language profanities from this chat. We could capture the chat and read the text. The problem is getting the list of profanities itself. Our questions are Where will one get exhaustive list of all profanities? What method is adopted in similar scenario to filter out these?
17
database design for browser based game I'm wondering how to design a database for the player's experience, whether to create a single table that will collect basic information such as. Class, race, number of experiences, number of occupied bases, etc. Or whether it would be more ideal to divide it into individual databases
17
Is it a legal thing to do to sell fabricated accounts of your game? For example, say I create an online mass multiplayer game with in game purchasing system and with randomness factors as well (the point is that game accounts have actual value and there is a somehow proportional relationship with playing time plus the luck of the player and the account's value) and the game appears to become popular. Is it legal to, for example, insert cheated accounts into the database (without even spend a second of legitimate playing) and sell those accounts with extremely high price?
17
Why should I forbid real money trading in my MMO? I am soon going to go public with an MMO game, and I am currently in the progress of writing the terms of use I expect players to follow (no swearing, no spamming, no cheating... you get the point). My game allows players to trade rare items with each other. I noticed that almost all online games which have trading, usually have a clause in their terms of use which explicitly forbids players to trade ingame items or ingame money for real world currency. I was wondering about the reason for this rule. Why should you ban real money trading in an MMO?
17
Appropriate MMORPG battle system for Android oriented MMORPG? I need a tip for a game I'm making. Because of many issues I want to make a 2D mmorpg A 2D game is easier to code (I'm using ActionScript3 Starling). I can more likely find preexistent graphics, and handling them is easier. Fundamentally I don't want to eat the device's memory!! Common devices here have at most 1GB RAM memory. But when I think about battle systems, I imagine stuff like Argentum Online and Tibia. Those battle systems were OK on mouse keyboard based systems. AO's battle system will be really hard to use (specially by any spellcaster class) in devices like Samsung S3 mini. OTOH when I think in systems like Pokemon or Golden Sun, both of them being turn based, I ask myself about the interation battles would be locked (they have a protocol, you cannot suddenly leave a fight, you can take as long as you want in each turn,...) which is not acceptable in a mmorpg for many reason (mmorpg users do not expect a protocol, they expect to leave a fight as they'd like, they would HATE users who suddenly go AFK on the middle of a battle without having opportunity to act). What battle interaction would be a good balance between mobile device friendliness and not being a pain in the ass for game dynamics? Suggestions are accepted here (we cannot expect game design have absolute decisions at all).
17
How can I synchronize state in my Asteroids game with many networked players? Wondering how state synchronization works in games with lots of players like MMOs. It seems like a hard problem to solve and I am not aware if there are standard solutions. Specifically, synchronizing game clients (users playing game) with an array of centralized servers, and then broadcasting and merging the state with all the same connected clients. How it is done (and how efficiencies are implemented) typically, and what the structure of the game state is like. To simplify this question, I am thinking in terms of a simple asteroids game You have n number of players, and the asteroids, players, and bullets are synchronized across clients. I am not familiar with how the game state should be modeled (if it's some quadtree thing you are sending around, or just a vector of patch updates, etc.). There could be players all over the world, so latency is a factor.
17
How often do big MMORPG update the physics? As far as I understand, most big games use fixed timestep to have a stable simulation. Regarding the game server, which "frame rate" do they impose? Or said it another way, what fixed timestep do they tend to use? I know many would say "As fast as they can get away with". I'd like to know how fast is that, if you have direct experience of established MMORPG.
17
what is the most popular mmorpg game that has an out of game api? World of Warcraft is off the table, because of the "WOW Glider Lawsuit" of 2008. Also see Where is Blizzards official World of Warcraft API? Eve Online has an API But, what is the MOST popular (in terms of usership) MMO Game that does allow programmers to develop out of game things (like an Android app).
17
How to update the monsters in my MMO server using Node.js and Socket.IO Currently I am creating an MMO using Node.js and Socket.IO. The node server needs to handle connections for players, and also use a loop to update all monsters positions in my game and let them attack players in range. For the loop I read that you can use process.nextTick or use a child process, which option would be the best choice? What are the advantages disadvantages of using each? Also, how many times per second should I run this loop for the monsters?
17
How do you design a record replay system for a frequently changing game? I'm working in a free MMORPG and I have a problem. I'm (with other people) developing a video recording system for the game. The idea is basically we record all the packages sent amp received with timestamps, plus some local data from the client, and then dump it in a file. For playing the video, we just emulate everything that's on the file. We also have an option to export the video to avi with ffmpeg. The problem is when we change between versions of the game, it is hard to maintain backwards compatibility for the video (commands added removed, function changes, etc). Is there a good way to handle this problem? instead of having a bunch of different players and choose the right one for each version of the video file? It would be helpful to know how does other games handle this situation. Thanks for the help, sorry for my english.
17
List of Anti Cheat Packages for MMOs? i would like to start this topic for programs to counter attack link text. I am not aware of a big list but with everyone's help i hope to make this a fine topic. Posting format NAME nProtect GameGuard GAME TYPE any type of game Website http global.nprotect.com product gg.php FEATURES? Protect the users' PC from fast evolving hacking technologies and viruses. Real time protection, diagnose various patterns latest hacking tools that can harm games, but also memory debugging prevention technology will be applied, completely blocking hacking tools through real time hacking tool monitoring and blocking function. Blocks hacking attacks through memory scan Blocks online outflow of personal information
17
What harm would be done if a user were able to play the client side of a multiplayer game without logging in? I am currently developing a multiplayer game for a university project. The purpose of the assignment is to learn about the use of a cluster architecture, but I have a question concerning security. The multiplayer role playing game that I'm developing for class utilizes a client server architecture. The client holds all of the game assets and a 2D game engine. The server provides authentication to log into a user account, provides access to characters and their progression, etc. The server also provides the positions of non player characters and other players on the same server, and also provides their actions and movements. My question is whether a tech savvy user that modified the source code of the client could "play the game" without authenticating, forcing a kind of single player version of my game? I am imagining a user sending the client his her own custom information about where to spawn enemies and whatnot. Maybe he she would simply want to move around the game world freely. 1) Does this scenario seem possible? 2) Most importantly, what harm could this cause to a multiplayer game? Perhaps I have content that I don't want someone to be able to access without properly purchasing the game, or if they have been banned for some reason. 3) If this is a problem I should try to mitigate, how could I go about preventing this kind of thing from happening?
17
What kind of databases are usually used in an MMORPG? Do people write their own DB for some reason?
17
How do I create a big multiplayer world in UDK? I want to create a big multiplayer world in UDK and I'm having a few difficulties. I created the biggest terrain possible but then any terrain related action I do takes forever. However, I've seen videos of people make same size terrain and working without a problem. My pc is strong enough, so maybe someone can tell me what I'm doing wrong. I want to make it even bigger then the biggest terrain size, so I was thinking of doing level streaming but then I read that streaming is working server side which means if I have a player on every terrain all terrains will still be loaded and I want to save as much memory possible so it will work well online. Thanks for any help you can give.
17
How can I represent location in a massive world? I've been thinking about No Man's Sky a lot recently and all the technical challenges they must face. For example, how on earth do you store a players location in a world that is so enormous? I assume x,y,z isn't feasible. I notice the advertised number of planets (18 quintillion) is exactly double the maximum integer you can store on 64 bits, if that is relevant. From watching tech videos of him (Sean Murray) describing the architecture, he seems to say everything is generated by formula where the inputs are x and y. Obviously he's simplifying, but how might one accomplish this?
17
What are some alternative options for saving level data for a game like Hurtworld? For a multiplayer building crafting game like Hurtworld (where the player can build structures on the map), what are some alternative options or example data structures for saving the world data on the server? Level data including Grid of squares that foundations can be built on, with a flag to indicate whether the square is empty or already has a foundation Walls etc which have been built on the foundations, and multiple floors above Windows doors which can be built on window frames door frames Furniture machines which can be placed on foundations floors Other dynamic world data such as trees, animals, chests with items, etc I feel like it's too much data to store in a database. Am I wrong? If it can be stored in a database, how can I get my head around the data structure I would need to set up? Is there some simplified example? Can each square in the world grid be represented by 1 row in the database? And should there be a new row for each structure built on a square, with that row referencing the square structure that it was built on?
17
Best approach to develop a mobile version of existing browser mmo game? our team has developed a MMO browser game (HTML5, Javascript amp PHP). The game is similar to Empire GG, Clash of Kings, Game of War etc. We want to develop a mobile version and the question is which would be the most efficient way process we can take advantage of?
17
How to make sure user is running the newest version of mmo client? In typical mmorpg game, you have a launcher and a client. You first run the launcher to update the client, then you run the client. In every mmo I tried if you run a client without updating first (if update is available), it automatically closes and (usually) starts launcher. My question is, how can you check if user has the proper version of client? I though about server asking client about its md5 however it's so easy to cheat. I think that there is no safe way of handling it yet every mmorpg I know uses such a system. So how do mmorpg games handle this problem? To make sure that the client is at the newest version?
17
synchronizing client server actions What's the usual way to handle events that are checked both on server and the client, like attacking? There's a cooldown timer to an attack of which the client is aware (so to prevent spamming server requests and attack button is held). Next there's a cooldown timer on the authoritative server. My problem is that sometimes attacks that end up firing on the client aren't executed on the server, because the server timer (serverFrameTime lastAttackFrameTime attackCooldown) didnt count up to the desired time, and so those are 'blank' attacks on the client. Is there a standard way to handle that without emiting too many messages? This is a problem for me because i might be firing more of those events and more timers, so autoattacking without clicking is not a long term solution for me.
17
Code reuse for a CRPG data model on the server side I'm working on a turn based game with CRPG (Computer RPG) elements in HTML5. It has to support 10K CCUs (Concurrently Connected Users). The CRPG elements in the game are item and character systems The game has characters, characters have items. Items may be worn or used as consumables. Items may be crafted and upgraded. Characters gain experience and get new levels. Characters and items have characteristics (like health, attack strength etc.). Characters may have buffs and debuffs placed on them that affects characteristics. Characters have talents that acts like permanent buffs or debuffs. Items worn and consumables used may affect character characteristics. Characters may strike each other, and strike outcome is calculated based on the effective characteristics of the attacker and target. All of the above has to be stored and handled on the server side. To avoid developing everything from scratch for the 100th time, I'd like to maximize my reuse of existing code original, free, or commercial. I can adapt the CRPG model requirements to the implementation limitations to a certain (considerable) extent. Technology stack does not matter much either as long as it is reasonably scalable. How can I author my server side solution to maximize code reuse?
17
How is load balancing achieved in MMOs? I believe it's a common requirement of MMOs that processing for a single shard or realm can be done over several servers to ease the load. I'm curious as to how this can be done whilst maintaining a unified consistent world where all the players, and all the NPCs can interact. My question is how is load balancing achieved in MMOs? Any links, books or general information on how to improve my knowledge on this subject is also appreciated.
17
multi thread in mmorpg server For MMORPG, there is a tick function to update every object's state in a map. The function was triggered by a timer in fixed interval. So each map's update can be dispatch to different thread. At other side, server handle player incoming package have its own threads also I O threads. Generally, the handler of the corresponding incoming package run in I O threads. So there is a problem thread synchronization. I have consider two methods Synchronize with mutex. I O thread lock a mutex before execute handler function and map thread lock same mutex before it execute map's update. Execute all handler functions in map's thread, I O thread only queue the incoming handler and let map thread to pop the queue then call handler function. These two have a disadvantage delay. For method 1, if the map's tick function is running, then all clients' request need to waiting the lock release. For method 2, if map's tick function is running, all clients' request need to waiting for next tick to be handle. Of course, there is another method add lock to functions that use data which will be accessed both in I O thread amp map thread. But this is hard to maintain and easy to goes incorrect. It needs carefully check all variables whether or not accessed by both two kinds thread. My problem is is there better way to do this? Or from practical view, the delay can be accepted because nothing will happen between 2 tick (the world is driven by continuous tick, all object will paused in 2 tick's interval) Generally, the interval is about 50ms to 100ms Notice that I said map is logic concept means no interactions can happen between two map except transport. I O thread means thread in 3rd part network lib which used to handle client request.
17
What data structure should I use for a Diablo WoW style talent tree? I'm considering implementing a talent tree system for an online RPG, similar to that seen in World of Warcraft, where acquiring a skill unlocks the next "tier" beneath it in the tree. Does anyone know of the best way of implementing this structurally in the database code?
17
Bandwidth cost hour for one MMORPG player I am trying to calculate guesstimate the costs of running an MMORPG for a client. And now I need a pretty accurate estimate for the monthly bandwidth cost so I can calculate the possible revenue of the investor client. So what is a pretty reasonable bandwidth cost for each player per hour? The MMORPG I'm trying to make is a virtual conference with gamification. We can go to booths, see other people, make a transaction in the booths. And we will also have a quest and mini game system for the gamification. We will be making it using Unity Forge. We were thinking of using Photon before, but when I reached out to them, they said I need to subscribe for Photon Industries since it's not a game, per se, which is like 2.5x the cost of PUN. We will split the server into two the game server and the REST API server. I'm in charge of the game side of the project so the REST API and backend is not my jurisdiction. I this is the specs of the game that I had in mind The event will be held for 10 days, possibly running 24 hours straight. Max customer that we have anticipated is around 1000 2000 CCU There will be multiple scenes rooms that the customer can go to (e.g. Commerce area, Lobby area, Mini Game area, etc) The quest system, booth transactions, and other features that doesn't need real time update will be handled by the backend. So that leaves these data that needed to be synced Player position 4 bytes 3 (X, Y , Z) 12 bytes currentScene 1 byte avatarModel 4 bytes (will use bitmasking to handle the current type of clothing and accessories of the player model) playerAction 4 bytes (player's enumerated action type) playerActionTarget 4 bytes (player's action's target) Scene sceneStatus 16 bytes (any status of the current scene e.g. the current quest. Still unsure how many bytes I need to sync) So, this is what I have calculated so far using AWS EC2 (possibly wrong)
17
MMORPG Representing Money in a DB table Where to begin... I'm currently busy with a few Udemy courses on game development using Unreal Engine 4. My end goal is to develop an MMORPG that I've always wanted to play, but never found online. Q How would I represent in game money in a database table? I've thought of adding it as a field in the "character" table, but then I struggle to see how I can implement it as a field in the "bank" table... Bank already has a quantity field, so I though about adding the money values as "items", but I just can't get myself to approve that... Some information on the table fields Each players bank will have a size limit (upgrade able) on how many items they can place in it. I was thinking of moving it out to the "character" table as it doesn't really have anything to do with the bank table... As for the rest of the tables, I'm still working on them. For now I just wanted to get the communities opinion on how to represent money in an mmorpg database.
17
Is there a way to make a dynamic world such as a MMORPG horizontally scalable? Imagine a open world of 500 players with data changing as fast as 20 updates player second. Last time I worked in a similar MMORPG, it used SQL, so obvioulsy it couldn't query the DB all the time. Instead, it loaded all players from the DB to memory as C objects and used them. That is, it scaled vertically. Would it be possible to make that server horizontally scalable instead? Is there a database designed to support that amount of updates concurrently?
18
How to calculate collision detection from big rectangle to small rectangle? I have big rectangle that can move from side to side, its boundaries can't enter the small rectangle inside it, the anchor point is in the middle of both of them. Let's say the big rect is 1000 1000, and the small one is 200 200 in the game the small rect is the "camera" and the big rect is the ground, only the ground moves. The solution can be in any programming language. Here is some drawing to show what I mean
18
What is an efficient method of collision detection for handling lots of objects? In my game, I have plenty of objects that can collide. Literally, most of them can collide with each other. The problem I'm facing is that I can't come up with some good collision detection. How can I resolve collisions for lots of objects in such way that I don't end up with class that has more than 1000 lines of code with enormous conditional constructs like this? if (firstBodyUserData "rocket" amp amp secondBodyUserData "car body") resolveRocketAndCarBodyCollision(firstBody, secondBody, contactData) else if (firstBodyUserData "rocket" amp amp secondBodyUserData "gas tank") resolveRocketAndGasTankCollision(firstBody, secondBody, contactData) ...many more dumb lines of code for every particular object in my game And don't forget about all these "resolving methods" after if statements. To make question more specific, I use Box2D with its ContactListener and Artemis odb entity component system framework so I don't really have classes for my entities and that kind of exacerbates the problem but main question is in resolving bunch of different types of collisions.
18
How can I properly detect my cars collisions using hitboxes? I have created two car objects and their current speed is represented as the len variable. This is the code Under Blue Car Collision Event if (place meeting(x,y,obj CarRed)) Checking Collision len 0 Current speed if (len lt obj carRed.len) Blue Car's current speed is greater than Red's myHP obj carRed.len 2 So I copied the code to the other object and replaced Red with Blue. When the Red car crashes into the Blue car, the Blue car takes damage because the Red car is traveling faster than the Blue car. But when the Blue car crashes into the Red car, the Red car won't take any damage. Later, I thought about using a Hitbox and have it as a parent for both cars, but I don't know if it would mess up the collisions, and I don't know how to tell the hitbox that it's been created by Blue Car, or by Red Car. I don't know if I should make a new hitbox for each car or one for both.
18
How to calculate max region area of 2d circles? I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range minRadius, maxRadius . I need to calculate the max possible radius of each circle. See below image for an example. Currently, I use the following algorithm to calculate the radius of each circle. I try to increase each circle's radius a little each steps, then check and solve if there is any collisions. foreach c in circles c.radius c.minRadius for (int i 0 i lt 10000 i) foreach c in circles c.radius c.radius 1 foreach c in circles calculate radius(c) function calculate radius(c) collides find all circles which radius is overlap with c() foreach x in collides x.radius somevalue c.radius somevalue end For now, the result looks fine, but the algorithm costs too much time. So I wonder if there exists other ways to solve it? wondra counterexample(maybe) The image below illustrates the problem. From my understanding of your algorithm, the final radius of circle A is 1.6, the calculation sequence is (BC, AB, AD) But if using my algorithm(increase radius by a small amount each step), the final radius of circle A is 1.5. I don't think recalculate the dist matrix after each selection will solve the problem, as stated in my question, each circle may have its own minRadius and max Radius.
18
2D Rope Collision Detection I'm wanting to create a rope that can collide with objects like in the following youtube video 2D Game Physics Rope I'm thinking that you implement the verlet integration which uses points and connects these points with lines. I'm trying to figure out what type of collision detection you would apply to the rope to get the effect in the video. I'm thinking you would have to do some cd to each point. I would like to use box2D, so I'm wondering would making each point a rigid body work? Any advice would be appreciated.
18
Creating Complex Collision Shapes in GMS2 I'm pretty new to Game Maker Studio 2 and I've hit a wall in programming with their built in physics engine. I created a irregularly shaped object and I want to modify the collision shape so that it fits the shape of the sprite. In the built in collision shape editor it only allows you to create a convex shape with a max of 8 points. Is there another way to do this without having to plot out points individually in code? Thanks!
18
Libgdx If Rectangle overlaps anything? I've written a code that allows me to talk with an NPC. This works as long as there is only 1 NPC on the map. I'll explain why. public void getNPCCollision() for (int i players.size() 1 i gt 0 i ) Player player players.get(i) for (int j beings.size() 1 j gt 0 j ) Being being beings.get(j) if(player.getBounds().overlaps(being.getBounds())) setX(oldX) velocity.x 0 setY(oldY) velocity.y 0 else if(player.getBounds().overlaps(being.getTalkingBounds())) canTalk true talkAbleBeing being else talkAbleBeing null canTalk false I check every update if my Player walks into an NPC's Talking Rectangle. It goes by every NPC on the map. The thing is If I'm not on NPC 1's rectangle but on NPC 2's rectangle, It'll still set canTalk to False because I'm indeed not in his rectangle. Is there any way I can fix this issue? Please, any help appreciated.
18
Collision Detection For A Maze Cave I have a simple code written in Processing 3.x that I am using to test out the collision detection for a cave maze. The code is here https github.com NoahJon3s New Journey The Game blob master sketch 190820a.pde If you where to run said code, you'd see that I have the code so that it detects collisions on the x axis (top of the rectangle) and y axis (left side of the rectangle), and correctly prevents the movement of the "player" from moving out of the rectangle, but I cannot seem to find a solution for preventing the movement out of the bottom or the right side of the rectangle, even though I am able to detect the collision. Every solution I try seems to lock the "player" to those respective sides. Any suggestions? Thanks in advance.
18
Whats the physics behind the doodle jump game? I'd like to know how we can achieve the doodle jump type physics using andengine. I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came downwards and will make a jump from their. Can it be achieved using the collision filter? If yes how? Is it possible to enable and disable collision filter for particular bodies dynamically?
18
Collision detection with multiple polygons simultaneously I've written a collision system which detects resolves collisions between a rectangular player and a convex polygon world using the Separating Axis Theorem. This scheme works fine when the player is colliding with a single polygon, but when I try to create a level made up of combinations of these shapes, the player gets "stuck" between shapes when trying to move from one polygon to the other. The reason for this seems to be that collisions are detected after the player has been pushed through the shape by its movement or gravity. When the system resolves the collision, it resolves them in an order that doesn't make sense (for example, when the player is moving from one flat rectangle to another, gravity pushes them below the ground, but the collision with the left hand side of the second block is resolved before the collision with the top of the block, meaning the player is pushed back left before being pushed back up). Other similar posts have resolved this problem by having a strict rule on which axes to resolve first. For example, always resolve the collision on the y axis, then if the object is still colliding with things, resolve on the x axis. This solution only works in the case of a completely axis oriented box world, and doesn't solve the problem if the player is stuck moving along a series of angled shapes or sliding down a wall. Does any one have any ideas of how I could alter my collision system to prevent these situations from happening?
18
LWJGL Collision Detection I cannot find LWJGL collision detection with a camera and walls. Like making it to where you can not walk through walls and other different shaped rectangular prisms and cubes. How do I set up LWJGL collision?
18
Collision detection in Pong clone Well I'm trying to create a pong clone using SDL and I had some problems with the frames and some times the ball would go through the paddles despite the fact that at other times the collision worked perfectly. So I searched it a bit and I came to the conclusion that it was because in one frame the ball was already through the paddle and in another frame the ball was not or something like this. So thought that if I would manually adjust the position of the ball, like move it a couple of pixels away the moment it hits a paddle or the walls too, this would solve the problem. But now when the ball goes right past a paddle its movement is getting weird and it goes right in the playing field. for reference also some code if you want to look it . I feel bad for doing the whole collision like these but I couldn't think some other way. Please enlighten me if there are better ways to do it that I can avoid the frame problem I mentioned above. Here is the code that handles the ball's movement void Ball move(float xLeftPaddle, float yLeftPaddle,float xRightPaddle, float yRightPaddle, Uint32 deltaTicks) y yVelocity ( deltaTicks 1000.f ) x xVelocity ( deltaTicks 1000.f ) if( y BALL HEIGHT gt SCREEN HEIGHT ) x x 1 y y 1 yVelocity yVelocity else if( y lt 0 ) x x 1 y y 1 yVelocity yVelocity else if(x BALL WIDTH gt xRightPaddle amp amp y lt yRightPaddle PADDLE HEIGHT amp amp y gt yRightPaddle ) x x 1 y y 1 xVelocity xVelocity else if( x lt xLeftPaddle PADDLE WIDTH amp amp y lt yLeftPaddle PADDLE HEIGHT amp amp y gt yLeftPaddle) x x 1 y y 1 xVelocity xVelocity else if(x lt 0 x gt SCREEN WIDTH) x SCREEN WIDTH 2 y SCREEN HEIGHT 2
18
Isometric 3d collision detection I'm making an isometric map for a game, I can draw it, but I don't know how to implement a sort of 3d collision detection without Threejs or other 3d library. It is possible? Maybe make the block an Object can help? I have searched a lot on the web, but I found only libraries. Thank you! This is my JavaScript code var canvas document.getElementById('canvas'), ctx canvas.getContext('2d'), width canvas.width window.innerWidth, height canvas.height window.innerHeight, stop false var tw, th var player setup() draw() function setup() ctx.translate(width 2,50) tw 60 tile width th 30 tile height player new Player(2,3,2) function draw() ctx.clearRect( width 2, 50,width 1.5,height 50) for(var i 0 i lt 5 i ) for(var j 0 j lt 5 j ) drawBlock(i,j,1,tw,th) if(!stop) requestAnimationFrame(draw) function drawBlock(x,y,z,w,h) var top " eeeeee", right ' cccccc', left ' 999999' ctx.save() ctx.translate((x y) w 2,(x y) h 2) ctx.beginPath() ctx.moveTo(0, z h) ctx.lineTo(w 2,h 2 z h) ctx.lineTo(0,h z h) ctx.lineTo( w 2,h 2 z h) ctx.closePath() ctx.fillStyle "black" ctx.stroke() ctx.fillStyle top ctx.fill() ctx.beginPath() ctx.moveTo( w 2,h 2 z h) ctx.lineTo(0,h z h) ctx.lineTo(0,h) ctx.lineTo(0,h) ctx.lineTo( w 2,h 2) ctx.closePath() ctx.fillStyle "black" ctx.stroke() ctx.fillStyle left ctx.fill() ctx.beginPath() ctx.moveTo(w 2,h 2 z h) ctx.lineTo(0,h z h) ctx.lineTo(0,h) ctx.lineTo(0,h) ctx.lineTo(w 2,h 2) ctx.closePath() ctx.fillStyle "black" ctx.stroke() ctx.fillStyle right ctx.fill() ctx.restore() function drawTile(x,y,stroke,col) ctx.save() ctx.translate((x y) tw 2,(x y) th 2) ctx.beginPath() ctx.moveTo(0,0) ctx.lineTo(tw 2,th 2) ctx.lineTo(0,th) ctx.lineTo( tw 2,th 2) ctx.closePath() if(stroke) ctx.stroke() else ctx.fillStyle col ctx.fill() ctx.restore() function Player(x,y,z) this.x x this.y y this.z z this.w 10 width this.h 10 height canvas width 100 height 100 lt canvas id "canvas" gt lt canvas gt
18
In a collision detection loop, when do I apply the velocity? I'm writing a really basic collision detection system (AABB vs AABB, AABB vs Circle, Circle vs Circle), and I've just got to the point of writing the actual loop which iterates the objects and checks for collisions. My question is when do I apply the velocity to each object? Do I move all objects by vel dt before I even start colliding? Do I apply the velocity as I iterate? If so, do I apply it to both objects I'm testing, or just the first, and then apply the velocity to the second when I check collisions against that one? Also presumably I should do the whole collision check recursively (as the act of responding to one collision might cause another), but that obviously effects how and when the velocity is applied. My suspicion is that I should move all the objects by their velocity before I begin, and then recursively detect and respond to collisions until nothing is colliding (or until some loop limit).
18
Updating physics for animated models For a new game we have do set up a scene with a minimum of 30 bone animated models.(shooter) The problem is that the update process for the animated models takes too long. Thats what I do Each character has 30 bones and for every update tick the animation gets calculated and every bone fires a event with the new matrix. The physics receives the event with the new matrix and updates the collision shape for that bone. The time that it takes to build the animation isn't that bad (0.2ms for 30 Bones 6ms for 30 models). But the main problem is that the physic engine (Bullet) uses a diffrent matrix for transformation and so its necessary to convert it. Code for matrix conversion ( 0.005ms) btTransform CLEAR PHYSICS API Mat to btTransform( Mat mat ) btMatrix3x3 bulletRotation btVector3 bulletPosition XMFLOAT4X4 matData mat.GetStorage() copy rotation matrix for ( int row 0 row lt 3 row ) for ( int column 0 column lt 3 column ) bulletRotation row column matData.m column row for ( int column 0 column lt 3 column ) bulletPosition column matData.m 3 column return btTransform( bulletRotation, bulletPosition ) The function for updating the transform(Physic) void CLEAR PHYSICS API BulletPhysics VKinematicMove(Mat mat, ActorId aid) if ( btRigidBody const body FindActorBody( aid ) ) btTransform tmp Mat to btTransform( mat ) body gt setWorldTransform( tmp ) The real problem is the function FindActorBody(id) ActorIDToBulletActorMap const iterator found m actorBodies.find( id ) if ( found ! m actorBodies.end() ) return found gt second All physic actors are stored in m actorBodies and thats why the updating process takes to long. But I have no idea how I could avoid this. Friendly greedings, Mathias
18
Collision Resolution I know quite well how to check for collisions, but I don't know how to handle the collision in a good way. Simplified, if two objects collide I use some calculations to change the velocity direction. If I don't move the two objects they will still overlap and if the velocity is not big enough they will still collide after next update. This can cause objects to get stuck in each other. But what if I try to move the two objects so they do not overlap. This sounds like a good idea but I have realised that if there is more than two objects this becomes very complicated. What if I move the two objects and one of them collides with other objects so I have to move them too and they may collide with walls etc. I have a top down 2D game in mind but I don't think that has much to do with it. How are collisions usually handled? This question is asked on behalf of Wooh
18
Resolving collisions after initial collision Given a sweep test for a ray, how do we check collisions after the 1st collision has been detected, and the ray has been deflected. Physics system steps are Update velocities (gravity, etc) Resolve collisions The ray will intersect the floor, and will be moved back at the penetration amount. The new velocity is calculated as a reflection Update positions The ray is now on the wrong side of the wall This all happens in 1 frame If the orange ray hits the floor just before the wall, the new velocity will tunnel the ray through the wall within one frame. The naive way to fix this would be to after each collision check all the bodies again with the new velocity, but this can take multiple iterations if the ray bounces around in a corner. There is no way of knowing how many times the ray will need to be processed. What would be a good way to fix this issue?
18
Is there a way to rotate an Ellipse in libGDX for collision detection purposes? I'm trying to avoid having multiple overlapping Circles for a UFO shaped sprite. Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt rotate the UFO when flying left and right, while still maintaining collision areas that match the locations of the graphics. The Ellipse reference page doesn't have anything listed for rotation options, just wondering if anyone has ever tried to do this before (and succeeded).
18
Am I implimenting a sweep and prune broadphase correctly? The code that I am using is std vector lt PhysicsBody gt physicsChildren containing all objects ... std sort(physicsChildren.begin(), physicsChildren.end(), sortByLeft) std vector lt PhysicsBody gt activeList unsigned int one unsigned int two for(one 0 one lt physicsChildren.size() one) activeList.push back(physicsChildren one ) for(two 0 two lt activeList.size() two) if (physicsChildren one gt m position.x physicsChildren one gt m radius gt activeList two gt m position.x activeList two gt m radius) CheckIntersectionBetween(physicsChildren one , activeList two ) else activeList.pop back() I think something is wrong because for 800 objects 309169 calls to CheckIntersectionBetween. A bruteforce would use 640000 calls, I didn't think this was much improvement (considering only objects close in the x axis should test). I wrote the code from reading Jitter Physics article about SAP Create a new temporary list called activeList . You begin on the left of your axisList, adding the first item to the activeList. Now you have a look at the next item in the axisList and compare it with all items currently in the activeList (at the moment just one) If the new item s left is greater then the current activeList item right, then remove the activeList item from the activeList otherwise report a possible collision between the new axisList item and the current activeList item. Add the new item itself to the activeList and continue with the next item in the axisList. What have I done wrong?
18
AABB test does not consistently detect edge to edge contact when bounds are very different in size My function compares two AABBs for collision detection, and when they are around the same size it works fine, but I noticed that if I greatly decreased the size of one of them (or augmented the size of the other), then the collision wouldn't be detected correctly I would have to have them intersect for a collision to be registered, rather than having it register when they are at least in direct contact, which is the intended behavior. Below is my code local function DetectCollision(a, b) AABB to AABB local collisionX (a.Position.X a.Size.X) gt b.Position.X and (b.Position.X b.Size.X) gt a.Position.X local collisionY (a.Position.Y a.Size.Y) gt b.Position.Y and (b.Position.Y b.Size.Y) gt a.Position.Y local collisionZ (a.Position.Z a.Size.Z) gt b.Position.Z and (b.Position.Z b.Size.Z) gt a.Position.Z return collisionX and collisionY and collisionZ end To be more specific, the issues start to occur when I cut the size of one of the AABBs in half. For instance, if I had two cubes where one's size is 12 on all axes and the other is 6 on all axes, then the collision will not register. Upon debugging, I noticed that only one of the collision bools will become false. This seems to depend on what axis the smaller bounding box moves from in relation to the bigger one, so if I moved the smaller AABB away from the bigger one on the y axis, then collisionY will be false.
18
JavaScript 2D Top down Collision Detection issue I'm developing a 2D Top down Game using HTML5 Canvas and a custom Game Engine. I'm implementing the Quad intersection detection (Function below, if it helps) on different areas of the Sprites (As they're larger than Tiles in some cases), and have thought of an issue with this. I want to check these areas before moving, using the amount of pixels I will move if allowed to (Nothing blocking the character). Below if the code I use to move the Player move function(delta) var distance Math.floor(this.getSpeed() Math.floor(delta 10)) this.setMoving(false) if(Engine.input().isPressed(Engine.keys.LEFT ARROW)) this. config.x distance this.setMoving(true) this.setDir(0) if(Engine.input().isPressed(Engine.keys.RIGHT ARROW)) this. config.x distance this.setMoving(true) this.setDir(1) if(Engine.input().isPressed(Engine.keys.UP ARROW)) this. config.y distance this.setMoving(true) this.setDir(2) if(Engine.input().isPressed(Engine.keys.DOWN ARROW)) this. config.y distance this.setMoving(true) this.setDir(3) this.boundaries() As the distance is not 1 pixel, it will be checking a few pixels ahead of the Player for solid tiles, and if there is one X many pixels in front of them, they can't move the distance and stop. Problem So let's say the distance is 3. If they're 2 pixels from a Solid Tile, they will not move those 2 pixels because of the collision detection, meaning there will be a 2 pixel gap between the Player and the tile, which will only increase the larger the Player, or Entities, speed. Is there any way to get around this, other than having to check pixel by pixel for each anchor point I want to check collision on? Collision Detection collided function(box1, box2) Basic Quad intersection Collision return ( ( (box1.x gt box2.x amp amp box1.x lt (box2.x box2.width) ) ( (box1.x box1.width) gt box2.x amp amp (box1.x box1.width) lt (box2.x box2.width) ) ) amp amp ( (box1.y gt box2.y amp amp box1.y lt (box2.y box2.height) ) ( (box1.y h1) gt box2.y amp amp (box1.y h1) lt (box2.y box2.height) ) ) ) ? true false ,
18
AS3 .hitTestObject() not working with Tween function (This was originally in an other senction but many told me to ask here, hopefully someone can answer this) I am having a major problem in my new browser app. Okay so I made game where different cubes (squares) spawn at the top of the screen and I use the Tween class to make them go down the screen and then disappear. However I want to detect a collision when a cube hits the player (that is also a flying cube). I tried everything, truly everything but it does not seem to work. The problematic thing is that when I remove the "Tween" function it does detect collision with the hitTestObject method but when I add the "Tween" line collision won't be detected anymore. The code looks like this function enemiesTimer (e TimerEvent) void newEnemy new Enemy1() layer2.addChild(newEnemy) newEnemy.x Math.random() 700 newEnemy.y 10 if (enemiesThere 0) enemiesThere true player.addEventListener(Event.ENTER FRAME, collisionDetection) var Tween1 Tween new Tween(newEnemy, "y", null, newEnemy.y, newEnemy.y distance, movingTime, true) The collision detection part private function collisionDetection (e Event) void if (player.hitTestObject(newEnemy)) trace("aaa") Another weird thing is that the collision detection works only in the starting point, where the squares spawn but they aren't really there anymore so I don't quite get it. I hope someone can answer this and maybe tell me how I can code this. Thanks in advance ) I've tried out Tweener amp TweenMax as well, the problem is always the same
18
Binding BoundingSpheres to a world matrix in XNA I made a program that loads the locations of items on the scene from a file like this using (StreamReader sr new StreamReader(OpenFileDialog1.FileName)) String line while ((line sr.ReadLine()) ! null) red line.Split(',') model row 0 x row 1 y row 2 z row 3 elements.Add(Convert.ToInt32(model)) data.Add(new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z))) sfepheres.Add(new BoundingSphere(new Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z)), 1f)) I also have a list of BoundingSpheres (called spheres) that adds a new bounding sphere for each line from the file. In this program I have one item (a simple box) that moves (it has its world matrix called matrixBox), and other items are static entire time (there is a world matrix that holds those elements called simply world). The problem i that when I move the box, bounding spheres move with it. So how can I bind all BoundingSpheres (except the one corresponding to the box) to the static world matrix so that they stay in their place when the box moves?
18
Collision with player following mouse I'm making a RPG with libGDX. I've loaded a TiledMap and now I'm implementing the player movement. The view is top down. In my game I want two ways of input one is using the ARROW keys to move the player. This implementation works pretty well, including collisions. The second one is a movement based in the mouse. When I click, then the player starts to follow the mouse pointer private void autoMove(float speed) Start or stop moving if (Gdx.input.justTouched()) autoMoving !autoMoving Start follow the mouse if (autoMoving) Get direction Vector3 point this.getStage().getViewport().getCamera().unproject(new Vector3(Gdx.input.getX(),Gdx.input.getY(),0)) dir new Vector2(point.x pos.x, point.y pos.y) Normalize dir.nor() Set correct animation if (Math.abs(dir.x) lt 0.5) if (dir.y gt 0) lookingDirection UP else lookingDirection DOWN else if (dir.x gt 0) lookingDirection RIGHT else lookingDirection LEFT Scale to speed and move dir.scl(speed) pos.add(dir) As you can see, I use global variable dirto store the direction of the player. Now I want to handle the collisions with this input. However, I'm not able to do this. I've tried, for example, using pos.add(dir.scl( 1.0f)) but doing this the player gets blocked in every direction. After that, I tried to make the same but blocking only x or y movement based on the lookingDirecion variable. However, player can be looking at right and move a bit upwards, to it's possible to "hack" the system and introduce the player inside the block. I tried with more complex if structures but they didn't worked at all. The collision code looks like this, if it's useful. public void checkBounds(float speed) for (int i 0 i lt map.getWidthInTiles() i ) for (int j 0 j lt map.getHeightInTiles() j ) bound is player's rectangle. colBounds are map's impenetrable objects. if (bound.overlaps(map.colBounds i j )) if (!autoMoving) Control with ARROW keys if (lookingDirection UP) pos.y speed else if (lookingDirection DOWN) pos.y speed else if (lookingDirection RIGHT) pos.x speed else if (lookingDirection LEFT) pos.x speed else MOUSE COLLISION DETECTION The question is how can I implement the collision detection for this kind of movement? Thank you!
18
Determine wheter an octree node needs to be continue For collision detection (moving vs. non moving) in my current project, I decided to implement an octree approach after the preselection. The only collision detection I'm currently using is a AABB vs. AABB collsion detection. Now, if this detection returns true for two objects (n, m), I want to subdivide the AABB into eight smaller axis aligned boxes, and so on. (Octree) Implementing the subdivision itself is now problem for me, but I'm stuck at the following How can I determine whether a node needs to be divided further, or whether further subnodes are unnecessary? Since I got objects of various complexity (a model with ca. 1500 vertices vs. a cube with 8), I can't simply check for the amount of vertices inside an octant. What ways are there to determine whether a subdivision is necessard? Or am I even using a wrong approach any something else might work better? Edit I now think that an octree might be the wrong approach. What would be the best way to check for a more exact collision detection after an AABB collision detection returns true?
18
Having Problems in PyGame with Mouse Cursor and Sprite Collision I know something is not right but I'm just starting out and hit a wall. Basically, I just want to MouseClick on a Sprite and make something happen. The mouse clicking itself works, the sprite collision itself works but not when I try to collide the mouse clicking with a sprite. def new(self) self.foodbowl img pg.image.load(path.join(self.img folder, BOWL IMG)).convert alpha() self.foodbowl img rect self.foodbowl img.get rect() self.cursor img pg.image.load(path.join(self.img folder, CURSOR IMG)).convert alpha() self.cursor img rect self.cursor img.get rect() def events(self) for event in pg.event.get() Mouse Input I know that pg.mouse.get pos() does not belong in the event method ... ... and I'll change this so bear with me. self.mx, self.my pg.mouse.get pos() saves mouse position to mx and my if event.type pg.MOUSEBUTTONDOWN print( quot This click works. quot ) if pg.sprite.groupcollide(self.cursor, self.foodbowl, False, True) print( quot This click does not work. quot ) In my sprites.py I have the Cursor Class class Cursor(pg.sprite.Sprite) def init (self, game) self.groups game.all sprites, game.cursor self.image game.cursor img self.rect self.image.get rect() self.hit rect CURSOR HIT RECT self.hit rect.center self.rect.center ... and the Foodbowl Class class Foodbowl(pg.sprite.Sprite) def init (self, game, x, y) self. layer ITEMS LAYER self.groups game.all sprites, game.foodbowl pg.sprite.Sprite. init (self, self.groups) self.image game.foodbowl img self.rect self.image.get rect() self.pos vec(x, y) self.rect.center self.pos self.hit rect BOWL HIT RECT.copy() self.hit rect.center self.rect.center self.content BOWL CONTENT I also tried numerous and different variations of if self.foodbowl img.get rect().collidepoint(x, y) if pg.sprite.groupcollide(self.cursor, self.foodbowl, False, collide hit rect) if self.foodbowl img rect.colliderect(self.cursor img rect) colliding self.foodbowl img rect.colliderect(self.cursor img rect) Alas, nothing works... Any help is much appreciated.
18
How exactly do slopes and edges work in this scenario? So this sort of behaviour probably exists in other games, but the old Kirby games Kirby's Adventure and Kirby's Dreamland 2 is where I noticed it. So, when dealing with regular block platforms, Kirby's hitbox acts like a simple rectangle, as you'd expect, as evidenced by the fact that you can stand like so On the other hand, when dealing with slopes of any kind, standing on them looks like this As you can see, if we were still using the rectangular hitbox, it would be halfway in the ground. This sort of behaviour is easily explained, however, buy a hitbox shaped like a 'diamond' or a 'plus'. (This is probably so that it doesn't look like Kirby is hovering in midair when walking on slopes) Platforms such as these show perfect consistency with the 'diamond' hitbox model However, of course, the first screenshot shows that it's not possible for a diamond shaped hitbox to be used all the time, or you would be able to 'slide' off any corner as if there was a slope there. In fact, formations such as this show that it can't even be based on particular tiles, at least not 'full' tiles. (16x16, Kirby's size) (Otherwise you couldn't walk all the way up that slope) Another model I've come up with is that the hitbox is always rectangular, but all slopes in the game are actually 'sunk' deeper than the tiles would have you believe. However, the stake shaped platforms in the third amp fourth screenshots invalidate this model, since then you wouldn't be able to stand at the top middle like you see there. By the way, slopes on the ceiling work symmetrically, as can be seen in water stages. While it seems intuitive to the player, how could we program a similar collision system ? N.B. I am not asking for speculation on the internal workings of Kirby (unless someone here actually developed the collision system for those games unlikely). Just a general approach.
18
What are the disadvantages of R Trees in collision detection? I was poking around in SQLite and discovered R trees. A little digging revealed that R trees are really just fancy AABB trees. Then I realize that the state of the art in collision detection (often a perf limiting sub system for physics simulation) is dynamic trees (simple AABB trees). So this is indicating to me that we can produce more efficient physics with this as a drop in replacement. Here is a pretty convincing argument for R trees from half a decade ago. To really distill it to the core, R trees were developed for databases to optimize disk access where getting the right data into RAM is the happy place, and now we can recycle the technique to optimize memory access where keeping the right data in cache is the happy place. Sadly it seems that this has not caught on. I wonder what the reasons are? I also found no reference to this BVH method in my Real Time Collision Detection (Ericson) text (though, that book is a bit older than 2010).
18
Collision detection in multiplayer games This a followup to my previous question How to implement physics and AoE spells in an MMO game?. There, we concluded that all physics have to be done on the server, and that I should use cylinders for calculations. Now, how can I check for collision detection on a ground to player basis on the server? It's fairly easy if the ground is a flat space, I just check if the player's z coordinate is lower than some value and voila, but, what if the map ground itself is a model? How do I know where hills are on the server side? How do I know when object collisions happen? I'm using node.js and socket.io.
18
Collision detection optimization for a top down shooter I'm relatively new to game development and have been trying to learn how collision detection is coded. I mostly work with Actionscript 3, but I'm learning C on the side. I've been wondering how "bullet hell" and top down shooters optimize their collision detection with so many objects. Any information theories would be great.