Reputation
241
Top tag
Next privilege 250 Rep.
View close votes
Badges
1 4
Impact
~2k people reached

  • 0 posts edited
  • 1 helpful flag
  • 8 votes cast
Jan
10
comment Is * calling *= (or *= calling *) slower than writing seperate functions (for math library)?
Uh, I don't know a lot of C/C++ but... it looks like * and *= are doing two different things - the former adds the individual values, the latter multiplying them. They also appear to have different type signatures.
Jan
5
comment Rolling Dice (Rag doll?) Unity 3D
Perhaps a bit broad, but consider: why would touch be any different than a mouse?
Dec
27
comment In a 2D multiplayer game should I send the position of user to the server all the time?
Depends on various things, including game type. Among other things, it's usually better to avoid binding everything to the client display (if player one is using a 4K display, and somebody else 320x240, which values do you use?).
Nov
8
comment Where could I put my source code as a tutorial or guide
It's traditional to put at least a copy on a site like (if not defaulting to) GitHub.
Oct
31
comment Game over when both players die
Style point: generally it's considered poor style to compare Booleans to a constant (if(P1Dead == true)), in preference to using the value directly (if(P1Dead)).
Oct
30
comment More realistic currency for spaceship battle game
In the real world, space ships need two things: mass and energy. Energy is used to power the ship, for pretty much everything. Mass is used to make the ship (usually metal, for a large number of reasons). Mass is also used to move the ship (reaction mass - throw something out the other direction), which can be water (most comets have some water component). Water has several other uses, too, including radiation shielding and armor (in solid form). How hard
Jul
28
comment My bullet changes the velocity depending on where I click
Normalize makes everything the same length, so after that points far away and close by have the same "size". At that point, you should just be able to do shootDirection * 20.0 (instead of your loop - speed will always be 20) to get the actual distance traveled for a projectile per unit time. If you're ignoring z, though, why aren't you using a 2D vector?
Jul
19
comment Why do 100 rect contain 400 tris?
@VinayakGarg - Yeah, that's what I'm getting at: how many polys are in your terrain? And the skybox likely takes up a few too (although probably not that many). To verify this is a road-related problem, what happens if you set count to 1? Do you really need to get the parent and set the shadow casting off in the loop? I would have expected that to remain unchanged....
Jul
19
comment Why do 100 rect contain 400 tris?
What's to the left of your road? The white patch? How did you make your skybox? What about the grey patch on the far left, between the white section and the skybox (or is it just part of the skybox gradient)?
Mar
26
comment Minesweeper number placement
It's safer to naively parallelize the second one (the first would require synchronization).
Mar
7
comment Level loading philosophy in MMO games
First, there's no way to avoid giving the client the room name (it has to ask for the room somehow), and for optimization reasons usually all static room data is distributed to clients too (ie, the last boss fight is usually included, along with all the story lines, etc.). Don't bother stopping people reading this data (other than basic countermeasures) - after all, if your server doesn't trust the client, it'll reject all nonsense commands ("loot chest in room I'm not in..."), and nothing they do will affect the character stored on the server.
Mar
7
comment Level loading philosophy in MMO games
You're heading in the right direction. Servers should never trust clients, ever. Because somebody, somewhere, somewhen, is going to try to take advantage of whatever they can. You will need public names for levels and stuff, though, or your client won't know what to load (or communicate a choice the player made). Why was the client choosing the character location in the first place?
Jan
9
comment Name generation
You could probably take names out of the "deceased" Social Security list. At one point I found an online, searchable, Japanese dictionary that had Japanese names in it (because of how Kanji is used for names) - those are all pronounceable, when rendered in romaji. I'd imagine there are lists for other nationalities, too, although you might have trouble with some of them...
Jan
4
comment How to detect if players alter game files and stop them from entering the game server
@AngelFlores - It's worse than that. They don't even necessarily have to modify the files, they can just write some other program to send their own packets of data (encrypting the data from your own program won't help much, cause you have to give them the encryption key). If you want to prevent something being used in a cheat, you MUST validate it on the server. Period. (Or, well, there are 3rd party solutions that farm it out to multiple other clients, but that has its own issues) The client should have most of the data to prevent bottlenecks, and allow prediction of outcomes.
Nov
19
comment What factors affect the size of ammo limits?
... this is probably something best identified by testing (ie - you have to use rockets to kill enemy X, but you can only carry 12 and there are 13 in the next area...). It's not just the max limit, but also the rate at which replenishment occurs. Then there's other, story-related reasons; in The Last Of Us there's a sequence where you're hung upside down (by an ankle) and have to shoot incoming zombie hordes - you're given unlimited ammo during this time (in a game that otherwise has rather limited ammo).
Jul
10
comment Line of Sight with Bresenham
For one thing, you could obviously early-exit if you found any brick that blocked a view. Otherwise, the critical parts of the code is missing - we don't know what criteria you're using to decide if a tile blocks views, or how you're deciding what tiles are on a line. You could certainly run the function twice (ie, sightlines should be mutual),
Jun
26
comment Should I assign a unique ID to individual units of game currency?
@superluminary - nobody stores this data on the client, so there isn't anything for a hacker to change. They'd have to hack the server, at which point just incrementing the amount of gold/reassigning coins is the least of your problems. For that matter, the client doesn't need to see the individual ids anyways (those are only for server tracking).
May
27
comment Implementing movement on a grid
You're going to need to write a decent AI, then, capable of planning sufficiently far ahead so as to not be blocked by the player against the wall or themselves.
May
27
comment Implementing movement on a grid
Short answer - you can't, especially in the case of completely random NPC movement. Long answer - you can have NPCs solve for a free path and collaborate to prevent boxing each other in. The moment you add a non-collaborating snake, though (that is, the player), things start to go out the window, and snakes may have no free spaces left...
May
21
comment What data am I allowed to collect for statistical purpose ?
What type of game? If it's an MMO, 1 and 2 are readily available to you, and should (probably) pose no issues. If it's a client-only single-player game, you will need to get agreement for the exfiltration. You can tie this to the EULA, but I'd recommend a specific opt-in/opt-out option to disable this behavior. To prevent people yelling at you, you must warn them on first launch if it's enabled by default, and some legal jurisdictions probably mandate it be off by default. Depending on what you plan to do with 3, ranges from immoral to nobody cares.