176 reputation
3
bio website
location Redmond, WA
age
visits member for 3 years, 1 month
seen yesterday

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.
Apr
25
comment Pure functional programming and game state
I've been thinking about this kind of thing for a while; to me, it's not input that's the unique problem, as you still have to feed (roughly) the same elements to functions in non-functional programming. No, it's the output (and subsequent related updates) that's the problem. Some of your input parameters should be combined; for move(), you should probably at be passing in the 'current' object (or an identifier for it), plus the world it's moving through, and just derive current position and velocity... output is then the entire physics world, or at least a list of changed objects.
Feb
2
comment How do I animate pieces between puzzle states?
Heh heh heh... I've been trying to figure out this type of setup, especially because I'm trying to create an immutable/functional code base (the view is essentially an output stream). The use of ids was the only piece I was missing. So +1.
Nov
1
comment Clientside anticheating in multiplayer game 1vs1
For other visitors, note that, unless it actually interfaces with the game code (and potentially even then), the ability to detect an external program providing 'probability' help is essentially nil.
Oct
14
comment Simple turn based game engine: Is this a valid approach?
You really don't want things running in the UI thread, as that tends to result in a 'hung' or choppy program. Although not likely an issue here, things like physics engines are often run at faster rates than the UI, to get better results. There's a number of posts around here somewhere about divorcing UI and actual game-loop threads.
Jul
16
comment How to determine range of possible movement in turn-based, distance-based strategy game?
It's still only going to be able to move the same (total) distance. So the question is really about figuring out "how far does it turn?"/"how much does it need to turn?"/"where does it need to turn?". You probably need to start from determining the regular path, then step a start-of-turn back for angles above a certain amount; note that final distance will be longer in a straight-line path (turning latest) than with the curves.
Jul
9
comment Simulating pressure in a grid based liquid simulation
Note that, once you get air pressure added, the two air-pocket examples are potentially completely valid (closed pressure chambers). I'm assuming you're not using 255 bytes, but rather values 0-255; in any case, you're probably not going to want to use the full range that way. I'd probably limit it to, hmm, 0-15 for '1 atmosphere' of pressure (there is no such thing as 'negative' pressure, right?), allowing higher pressures, which you currently lack. Once you include the 'air' blocks in the sim, the naturally higher 'weight' of the water blocks should cause it to flow around the bends.
Jul
1
comment How to create a legally valid timestamp of unpublished game artwork
@mm24 - I can't speak to the legality, but I imagine Kickstarter has a pretty good set of history/audit controls, just to absolve themselves of some related problems. Some artist sites store revisions of work, and cloud storage options might be able to provide equivalent functions.
Jun
28
comment How to manage a multiplayer asynchronous environment in a game
This is related to concurrency, which means you're in for some real fun times. I think the better way to resolve this would be to just mark armies as 'at home' or 'away' - you can't effect armies that are on campaign (which is a difficult thing to do in the real world), you could only go after the 'at home' ones; although if you could mess with supply lines.... Look at Optimistic Locking, as I think that'll yield better results.
Jun
7
comment How to load up many images without using too much memory
1) If something is 1/4th smaller, it will take up 1/4th less space, or 3/4th of the original space. 2) BMPs can be uncompressed; also, in general there's a tradeoff between storage size and processing time (ie a table of contents in a book takes an extra page).
Feb
20
comment Java2D Collision Detection
From a general programming perspective, you should be using 'Generics' if at all possible; among other things, it'd make it so you don't have to (explicitly) cast types.
Jan
23
comment What is a good way to load more than a million images for a collectible card game?
...not fit in RAM... - depending on the OP's target platform it may not fit on the hard-drive; 1,000,000 x 100kB = 95.37 GB (or so). No way I'm downloading a game that size (initially, although background processes could help here). And 100kB is small - most 'good' card games have quite a bit more detail (read: larger images). There must be something else going on here, because you wouldn't be able to test the interaction between all card combinations easily either (the previously mentioned Magic has enough problems with 12k cards).
Jan
3
comment How can I remove enemies from my ArrayList after they have died?
Without more information, this will be difficult to address completely.
Jan
3
comment How can I remove enemies from my ArrayList after they have died?
+1 - A decently thought out answer that, y'know, actually usefully answers the question (given the current information).
Nov
27
comment Converting a hipoly model to a lowpoly model
What program did you use to make the original model? Some tools have this sort of generation built in.
Nov
21
comment Efficient Algorithm for Recording gameplay's objects positions
What about deterministic NPC behavior? Like, say, the output of a script? You may be able to reduce some things a bit better that way.