How to process a very heavy downloadable multiplayer game - multiplayer

I am a programmer and I'd like to know how to process a very heavy downloadable multiplayer game. This game will have robots like in Armored Core with arms and legs which are changeable but it will have like 100 players in a certain area fighting aliens and each one fires like 10 bullets each second plus the enemy attacks.
That is like 2000 bullets each second flying in all directions, plus explosions and missiles and lasers and the environment too, and the AI of the aliens.
Is that very hard to process on today's computers? If it is heavy, how would I process that in a multiplayer scenario? Does every computer split up the job and do their own part?

Is that very hard to process on today's computers?
For a programmer that has to ask the question - yes. For a programmer capable of writting efficient code and using a modern high end computer (that would right now have 120 physical threads) - not really. THe AI may be a problem, but then that can run on a cluster of machines.
Does every computer split up the job and do their own part?
Do you TRUST your players not to cheat? If you do not - can you answer that question yourself?
Generally you hire someone who has experience writing distributed systems. Generally this is way over the head of "a programmer asking question" and the level architects with real time experience come into the game. All thos bullets may sound heavy, but I proces a data stream here doing sometimes in excess of 100.000 updates per second, so - it is doable.

Related

Holiday project goals for undergrads with an FPGA?

It's a student project for vacation research, under-grad, not sure how many of us, there'll probably be 4-6, we're motivated.
My original proposal was to get an FPGA (on an Artix-7 or Z-board) to run a CID camera sensor as a dumb peripheral, do some basic image processing stuff on it (perhaps edge detection and dynamic windowing), and output a bitmap to a PC.
One of the faculty who has about 16 years experience with FPGAs has suggested that for my (and my colleagues) level, this might not be achieveable in a 6-10 week time-frame (we're all pretty much beginners).
We wish to keep the original goal on a more long term basis, but want now to have some other project goals, that would move us towards having the skills and experience (and perhaps some of the IP) for this ultimate goal.
What would some good intermediate project goals be for a group of undergrad beginners with a summer holiday to spend if we ultimately would like to get an FPGA doing cool stuff with a CID camera sensor?
what about distance estimation - using two cameras or more in stereo.

Prevent dll from being modified

I'm coding a C++ WinAPI DLL for a game, it includes a small anti-cheat function, but it can be easily bypassed if someone decides to NOP (0x90) the whole anti-cheat (I'm not PRO in reverse engineering but I'm sure it's possible to do).
Is there anyway to prevent my DLL from being modified?
Even if you can stop people from modifying your DLL, there's nothing stopping someone from replacing your DLL with their own version that behaves just like yours in all aspects that your .exe can determine, but that does something different in some particular aspects - unless you keep an entire copy of the DLL in the .exe too.
It is better spending time and effort on making it hard to cheat than hard to change the .dll. Say for example that we have a Pac-Man game (because most people would be familiar with it), then we could send the number (and locations?) of all the "white pills" that Pac-Man ate on the path, and the time it took to get there. If the game then edits the .dll to give 10x the score for each white pill, or edits the game so that Pac-Man moves 10x faster, you can verify that it can't be right, because at each level you'd know how fast Pac-Man moved, and how many points per white pill Pac-Man should get. Number of times the player got killed and such could also be included in this information sent to the server.
A similar principle can be be applied to a "shoot-em-up" game, or a game that relies on buying and selling stuff, or whatever. If you have a detailed log of what the player did to get the score, you can validate that "this is possible" or "this is impossible to acheive, because you can't get that score from shooting down 10 space-ships in 1 second, as one space-ship takes 10 hits to shoot down, and it takes 1 second to fire each round".
I'd say you'll be better off moving any anti-cheat functionality to the server side, or if it's not a multiplayer game, then don't bother trying to stop cheats at all.
One thing you could do though is generate a hash of your DLL and check it in the application code against a known value or against a service or website. You could also use the hash value of the file for some other tasks as well essentially forcing the hacker to extensively modify the game code not just the anti-cheat function. That may deter people.
But the comments are right, with enough time and resources anything is hackable, you just need to make it not worth the time.

Issue regarding practical approach on machine learning/computer vision fields

I am really passionate about the machine learning,data mining and computer vision fields and I was thinking at taking things a little bit further.
I was thinking at buying a LEGO Mindstorms NXT 2.0 robot for trying to experiment machine learning/computer vision and robotics algorithms in order to try to understand better several existing concepts.
Would you encourage me into doing so? Do you recommend any other alternative for a practical approach in understanding these fields which is acceptably expensive like(nearly 200 - 250 pounds) ? Are there any mini robots which I can buy and experiment stuff with?
If your interests are machine learning, data mining and computer vision then I'd say a Lego mindstorms is not the best option for you. Not unless you are also interested in robotics/electronics.
Do do interesting machine learning you only need a computer and a problem to solve. Think ai-contest or mlcomp or similar.
Do do interesting data mining you need a computer, a lot of data and a question to answer. If you have an internet connection the amount of data you can get at is only limited by your bandwidth. Think netflix prize, try your hand at collecting and interpreting data from wherever. If you are learning, this is a nice place to start.
As for computer vision: All you need is a computer and images. Depending on the type of problem you find interesting you could do some processing of random webcam images, take all you holiday photo's and try to detect where all your travel companions are in them. If you have a webcam your options are endless.
Lego mindstorms allows you to combine machine learning and computer vision. I'm not sure where the datamining would come in, and you will spend (waste?) time on the robotics/electronics side of things, which you don't list as one of your passions.
Well, I would take a look at the irobot create... well within your budget, and very robust.
Depending on your age, you may not want to be seen with a "lego robot" if you are out of college :-)
Anyway, I buy the creates in batches for my lab. You can link to them with a hard cable(cheap) or put a blue tooth interface on it.
But a webcam on that puppy, hook it up to a multicore machine and you have an awesome working robot for the things you want to explore.
Also, the old roombas had a ttl level serial port (if that did not make sense to you , then skip it). I don't know about the new ones. So, it was possible to control any roomba vacuum from a laptop.
The Number One rule, and I cannot emphasize this enough: Have a reliable platform for experimentation. If you hand build something, just for basic functionality, you will spend all your time on minor issues and not get to the fun stuff.
Anyway. best of luck.

I'm an experienced C++ developer - how can I enter the gaming industry?

I've been working in C++ in embedded environments for a number of years, developing navigation applications. There is a gaming company in my hometown that I like the look of, but I don't have game development experience. You could consider a navigation app as a type of game, depending on who you are running from.
My question is, what steps should I take to enter the industry? Is it a bad idea to enter the industry at this stage (I'm 30)?
Being 30 doesn't really matter, you can enter the games industry at any age assuming you have the drive and ability.
Start reading about gaming topics, and game development websites (gamedev, gamasutra etc.)
Start writing games. Clones of games you like, your own original ideas, tech demos, anything that you can point to and say "I wrote that, and along the way I learned these things, and solved these problems."
If there is a specific area of interest to you, AI, Rendering, Frontend, Tools & Pipelines, Audio, focus on building game/demo/sample projects that challenge you in that area. "Yeah, I've done that" sounds a lot better in an interview than "yeah I've heard of that".
Get to know people in the industry if you can, through online forums, friends of friends, etc... One good contact can do more for your chances than weeks of demo coding or months of sending resumes out. Game companies may have open houses or job fairs.
The "entry level" jobs in game development are likely to be Frontend or Tools. If you've done navigation apps, sounds like that might be a decent fit for you. If that has included more low level work and optimization on embedded platforms, you might also look at Systems roles.
I'd suggest you start trying to write some games in your spare time. Having some demos is always a good start when you go to an interview and it'll give you some insights into what your job is going to be.
Gamedev.net has an excellent set of tutorials to work through to get a grip of a lot of game-coding concepts.
Do they have any job offerings? If so, look at what they ask for in the CV and start educating yourself in those concepts / technologies.
Contacting them and asking if they have any jobs for an excellent software engineer can't hurt either :)
I see you already accepted an answer, but I'll throw in my two cents:
If the company does console (e.g. Xbox360, PS3) or handheld (e.g. DS, iPhone) games, you should definitely emphasize the embedded aspect of your resume. A few anecdotes about how you optimized the memory layout of a class, or sped up some code by taking advantage of an obscure feature of the chipset will show that you can think like a console programmer. Also, if you did any sort of AI for the navigation apps (e.g. A*, Djikstra), it's good to mention that.
A few people recommended writing games - that's not a bad long term plan if you know you want to get into the industry, but I don't think you should let that stop you from applying to this particular company in the meantime. However you should definitely pick up a copy of one of their recent games, play it for a few hours over the weekend, and be able to say what you liked about it.
As for websites, I second the Gamasutra recommendation, along with Kotaku.
Good luck!
"game industry" is a broad question. There are:
AI programming
Graphic programming.
Sound programming.
Tool programming.
Scripting.
Physics programming.
Network programming.
You probably already can deal with #7, #5 and #4.
As for the rest - mostly it is a dealing with some kind of API, plus you need a very good understanding of 3D math (unless you make 2D game, that is).
For 3d math I cannot help you. I picked info in various non-english sources, and most of them aren't available anymore. However, I think this resource might contain info of interest.
For general 3d graphic info you need to study DirectX SDK and NVidia SDKs (both DirectX and OpenGL), plus there are OpenGL books you HAVE to read:
1. Francis s Hill, "Computer Graphics using OpenGL".
2. OpenGL programming guide aka "Red Book"
3. OpenGL shading language (aka "Orange Book")
4. And you might want to take a look at OpenGL reference manucal ("Blue Book")
I'm talking about OpenGL because while it doesn't offer same level of control for hardware resources, it is easier to get started with than DirectX, and available on larger selection of platforms and have a same power as DirectX. Plus GLSL isn't that different from HLSL (except that GLSL doesn't have remnants of assembly shader programming like HLSL), close enough to C++, so it is relatively easy to get started.
One important thing - if you seriously want to deal with 3D, you have to be able to easily imagine 3d operations in your mind. I.e. how to rotate object, scale object, move object, what matrix means, what is reflection vectors, how to cut polygon with planes, how to find intersection of two meshes, etc, and you should have at least basic understanding of more complex thing like boolean operations on polygonal meshes. I have no idea how to develop this skill (it is very close to "mechanical drawing"), but you'll get a lot of difficulties without it.
Just putting "experienced C++ dev" on your CV will probably get you in the door. The (UK at least) games industry is dominated by graduates and inexperienced programmers - the older ones either burn out or get promoted into management.
A lot of games programming is just programming - the skills are entirely transferable. And your navigation software experience probably puts you in for an AI-related role.
If someone with your background applied to me, I'd certainly give them an interview.
Well I started at 16 with (paid) game development. Search for jobs on websites. Make your own low-budget games and then publish them in a way or another.
If you are good people will search for you, otherwise you have to struggle a bit.

Video Game Bots? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Something I've always wondered, especially since it inspired me to start programming when I was a kid, was how video game bots work? I'm sure there are a lot of different methods, but what about automation for MMORPGs? Or even FPS-type bots?
I'm talking about player-made automation bots.
To 'bot' a game, you need to be able to do two things programmatically: detect what's going on in the game, and provide input to the game.
Detecting what's going on in the game tends to be the harder of the two. A few methods for doing this are:
Screen-Scraping This technique captures the image on the screen and parses it, looking for things like enemies, player status, power-ups, game messages, time clocks, etc. This tends to be a particularly difficult method. OCR techniques can be used to process text, but if the text is written on top of the game world (instead of on a UI element with a solid background), the ever-changing backdrop can make it difficult to get accurate and consistent results. Finding non-text objects on the screen can be even more difficult, especially in 3D worlds, because of the many different positions and orientations that a single object may possibly exist in.
Audio Cues In some games, actions and events are accompanied by unique sound effects. It is possible to detect these events by monitoring the audio output of the game and matching it against a recording of the associated sound effect. Some games allow the player to provide their own sound effects for events, which allows the use of sound effects that are designed to be easy to listen for and filter out.
Memory Monitoring If the internal workings of the game are well understood, then you can monitor the state of a game by inspecting the game's memory space. Some cheat tools for console systems (such as the Game Genie) use this method. By detecting what memory the game updates, it is possible to detect what the game is doing. Some games randomize the memory locations they use each time they are launched in an attempt to foil this vulnerability.
Packet Analysis With appropriate drivers, you can intercept the game's data packets as they are sent to or retrieved from your network card (for games played online). Analysis of these packets can reveal what your game client is communicating to the server, which usually revolves around player/enemy actions.
Game Scripting Some games have a built-in scripting interface. If available, this is usually the easiest method because it is something the game software is designed to do (the previous methods would all typically count as "hacks"). Some scripts must be run in-game (through a console or through an add-on system) and some can be run by external programs that communicate through the game via a published API.
Generating input events back into the game is typically the easier task. Some methods include:
Memory "Poking" Similar to the memory monitoring section above, memory poking is the act of writing data directly into the game's memory space. This is the method used by the Game Genie for applying its cheat codes. Given the complexity of modern games, this is a very difficult task and can potentially crash the entire game.
Input Emulation "Fake" keyboard or mouse signals can be generated in lieu of direct human interaction. This can be done in software using tools such as AutoIt. Hardware hacks can also be used, such as devices that connect to the computer's USB or PS/2 port and appear to the system to be a keyboard, but instead generate fake keypress events based on signals received from the computer (for instance, over a serial port). These methods can be harder for games to detect.
Game Scripting As mentioned above, some games provide built-in methods for controlling it programmatically, and taking advantage of those tools is usually the easiest (but perhaps not the most powerful) technique.
Note that running a 'bot' in a game is usually a violation of the game's Terms Of Use and can get you suspended, banned, or worse. In some jurisdictions, this may carry criminal penalties. This is another plus for using a game's built-in scripting capabilities; if it's designed to be a part of the game software, then the game publisher is most likely not going to prohibit you from using it.
Once I wrote a simple MMORPG bot by myself. I used AutoHotkey.
It provides lots of methods to simulate user input -- one will work. It's tedious to program a working one in C++ by oneself (Or look into AutoHotkey's source).
It can directly search the screen for pixel patterns, even game screens (DirectX)
So what I did was to search the screen for the name of an enemy (Stored as a picture with the game's font) and the script clicks a few pixel below it to attack. It also tracks the health bar and pots if it is too low.
Very trival. But I know of an WoW bot that is also made using AutoHotkey. And I see lots of other people had the same idea (Mine was not for WoW, but probably illegal, too).
More advanced techniques do not capture the screen but directly read the game's memory. You have to do a lot of reverse engineering to make this work. And it stops working when the game is updated.
How does an individual person go about their day to day?
This is sort of the problem that AIs in games solve.
What do you want your entity to do? Code your entity to do that. If you want your monster to chase the player's avatar, the monster just needs to face the avatar and then move toward it. When that monster gets within a suitable distance, it can choose to bite the player avatar, and this choice can be as simple as AmICloseEnough(monster, player); or more complex or even random.
Bots in an FPS are tricky to get right because it's easy to make them perfect but not so easy to make them fun. E.g. they always know exactly where the player is (gPlayer.GetPosition()) so it's easy to shoot the player in the head every time. It takes a bit of "art" to make the bot move like a human would.
For FPS-style bots, you could take a look at the Unreal Development Kit. As I understand it, this has got a lot of the actual game source code.
http://udn.epicgames.com/Three/DevelopmentKitHome.html
bta gave a very good reply. I just wanted to add on saying that the different methods are suspectible to different means of detection by the gaming company. Hacking into the game client via memory monitoring or packet analysis generally is more easily detectable. I generally don't recommend it since you can get caught very easily.
Screen-scraping used with input emulation is generally the safest way to bot a game and not get caught. Many people, (myself included) have been doing it for years with no problems.
In addition, to add an additional step between detecting what's going on in the game and providing input, some games require extensive calculation before you can decide what kind of input to provide to the game. For example, there was a game where I had to calculate the number of ships to send when attacking the enemy, and this was based on the number of ships I had, the type of ships, and who and what kind of enemy it was. The calculation is generally the "easy" part since you can do that usually in almost any programming language.
It's called AI (artificial intelligence) and really isn't that hard to replicate, a set of rules and commands in the programming language of your game will do the trick. For example a FPS bot would work by getting the coordinates of your player's body and setting your enemy bot's gun to aim at that coordinate and start shooting when in a certain range.