« first day (521 days earlier)      last day (4795 days later) » 

13:53
Thanks for both of you, I finally used another solution from gamedev question
Hey everyone. I've got a class which has a lot textures loaded. I'd like to get the texture with "get" method. Is there a way to do this? In PHP, it's pretty easy to get it using ${"variableName"}, but I feel this isn't achievable in c#.
So for example, is something like

public Texture2D get(string TextureName) {
return textures.{TextureName};
}
Texture2D guy = get("guy"); // It has now textures.guy texture


possible?
i Know it's possible but I'm not sure about the syntax
I got it. Dictionary
Dictionary<string, object> sounds = new Dictionary<string, object>();
	    sounds["ak47shot"] = content.Load<SoundEffect>("ak47shot");
	    sounds["headshot"] = content.Load<SoundEffect>("headshot");
	    sounds["firstblood"] = content.Load<SoundEffect>("firstblood");
i was going to say "maybe you have to use dictionary"
but I lost my internet connection for just a min!
 
3 hours later…
17:16
hey how we can do this in android
0
Q: How to rotate a sprite on circle in android using Libgdx

Alex MathewDear Fellow Game Developers i am newbie to Android Game Development,i like to know how we can develop a sprite rotate in circle on android,with help of libgdx, i do have a image in assets folder,cant load it in emulator,following code is using to load image in texture texture = new Texture(...

 
5 hours later…
22:22
http://gamedev.stackexchange.com/questions/22098/how-can-i-make-a-minefield-with-dr-racket
I don't even know what to do with this continuous PLZ K THX english.
...ugh, "please give me teh codez"
flagging as "not a real question"
yeah flagged as low quality
gamedev is so susceptible to this stuff - see minecraft: want people to codez minecraft
yeah, I flagged it too, lame
Is there a way to message a user without adding yet an other comment to a long conversation?
from what I know chat only
it might be possible to message a user who has never visited a room
ehh.... not really. best you could do is point them to chat and say "talk to me here"
22:27
k, Will doing @ his name in chat message him, even if he's never been in chat?
it may work, report back if it does
if he's never been in the chat, no, it won't alert him
feature-request anyone? :)
heh, yeah
It's just not something I see as a productive comment
Sending a message without adding a permanent comment for future googlers might be nice
22:30
Must resist temptation to be a complete ass on the question comments!
Lemme try and give a sensible answer...
Ah, hey, how's it going? Ciaran, right?
brb, makin' some tea
Not so bad. OK. I'm goin to bed soon!
gah
worst thing: game keeps crashing, i have very little idea why
22:38
back
what language @thedaian
c++
i'm pretty sure i'm doing something wrong with std::list access
ugh, can't help you sorry. best idea is to start logging
narrow it down with logging and get more specific (literally every line in a method) - it will get you the crashing line if your debugger is failing oyu
So @ScrollerBlaster, to continue our convo on gamedev.stackexchange.com/questions/18766/…, yeah, you'd still need to get both the client and the server to agree on a "start" time of sorts
@John Have you done this yourself successfully?
22:40
And then from that start time and on, you can use a clock-substitute
@ScrollerBlaster this is a great talk for netcode. gdcvault.com/play/1014345/I-Shot-You-First-Networking. It should help you think about what you need to be doing.
@John Do the machines HAVE to compute lag. It seems somewhat unreliable.
somehow i always land up citing that talk. it's pure brilliance.
Just loading it.
No, you just need to get an idea if the lag is 10ms or 1000ms (assuming a 1s delay matters in your game)
22:43
@ScrollerBlaster it's long, but you will learn a lot of how you need to be thinking. You might find the (open) documentation of how the steam network protocol works as well (lag compensation, where the server 'back-tracks' in time).
hmmm, well, then. it's not crashing now!
Its probably at most a round trip of 100 ms.
@JonathanDickinson Yes
@thedaian heisenbugs?
@thedaian is your game threaded?
@ScrollerBlaster Well... the reason you want to do some kind of clock synchronization is to make the client(s) feel like that 100ms delay doesn't exist.
22:46
no, it's not threaded.
@John. All in favour of that.
i added some additional checks to prevent it from removing an object if something else failed, and it stopped the crashing
In a fast game, you don't want the client(s) to tell the server that they moved out of the way of a bullet just to have the server come back and say "Sorry dude, you didn't tell me in time!"
@thedaian ah nice. @ScrollerBlaster @JohnMcDonald - take the example of the grenade. They play the 'throw' animation instantly but only release the grenade when the server indicates it's time to do so: elevating the illusion that lag doesn't exist.
@John. mmm. Im going to start simple and try to get two players controlling their ships and each can see the other guys ship.
22:49
@ScrollerBlaster get some playtesters, give them alpha access. See how they react to the lag and try to fool them. Gamedev is all about satisfying our monkey brains.
hah, monkey brains
Totally true
@John I am intending to try and get the players to simply send changes in the status of input controls rather than constantly telling the server where they are
Miney
yay! and now it crashes on a new and different part!
I mean Monkey.
@ScrollerBlaster you are to be VERY careful with that, it will annoy people hellbent if they don't see instant reaction. you need to predict what the server will do on the client - and in that case predict it on every client
22:51
@ScrollerBlaster I... have a feeling that it could feel unresponsive, or there could be de-syncs
@John Yes I had already intended to also do client side prediction as in Quake.
ok
Back to the clock business, you do want to make sure that your sequence numbers move at the same rate, and the best way to do that is to have the sequence numbers based off the clock somehow
@John I had a thought that perhaps the clients user input messages could not contain a timestamp. That the server instead would timestamp them.
My seuqnce numbers were going to be the physics steps.
@ScrollerBlaster Well... it depends how you want it to feel
There is also another article along the lines of "1000 archers over a modem"
it's more orientated to strategy games
you might find it interesting
22:55
@JohnathanDickinson Do you think it would help?
at the end of the day you need to figure out how other people solved problems; and then formulate your own solution
it's really hard with netcode
@ScrollerBlaster If the user presses "FIRE" when the opponent is right in-front, then during the 100ms it takes for the "FIRE" packet to reach the server and the server doesn't reverse time, the command could be too late and the opponent will survive
yeah, netcode is finicky, and there a dozen solutions
so read, read and then read again. watch some talks. get acquainted with the ridiculousness that is lag and come up with something that the human mind will accept
@JohnMcDonald So if the server rewinds this fire event it should work better?
@ScrollerBlaster yes, resolve the event in the 'past' - from the perspective of when the player performed the action and it will be much more fair.
22:58
:/ yeah, but rewinding time can be tough to do for rail-guns. It's much easier for things like Missiles
@ScrollerBlaster it might help if your server retains replays - you can simply look back in time to see how things were (see Heroes of Newerth, they don't do that, but they do retain replays)
So, should the client time stamp the event using a unified time ?
don't let the client control it
With a missile, you pretty much only need to move the missile ahead by RTT/2 to place the missile where it should be. But with railguns... I don't actually know
@ScrollerBlaster Yes
the server knows the latency to the client and can find out how far to go back
letting the client control the stamp opens you up to hacks
23:00
w00t! managed to break something that was working in previous versions!
@thedaian well done! questionably constructive: this is why I reject C++ for indie dev...
yeah... i'd do this in flash if not for the fact that flash doesn't allow for right clicking
@ScrollerBlaster If the client says the action happened at time T in "unified time", the server will receive this request at time T + RTT/2 and be able to calculate how long ago the action actually occurred and be able to create the event in the "past" and update it using a delta time of RTT/2 to bring it into the present.
also i'm not sure how well flash would handle what i'm doing.... but oh well
@thedaian ah. surprised it doesn't. considered something like Unity (hey! there's our own JQuery meme) or Silverlight? You might be too far along though...
23:04
Unity would probably be my second choice...
or first choice, at this point
but i got very annoyed with unity and google sketchup the one time i tried to use it
i hear there are some garbage collectors for C++, maybe worth considering and just getting rid of your destruction code?
KISS
actually i think my problem isn't garbage collection, it's that i'm accessing stuff that doesn't exist
most likely
you deleted it: a garbage collector wouldn't let you do that
@ScrollerBlaster, In the example of a missile, let's say the client and server have a unified time, and that the client presses "FIRE" at 1000ms into the game. The packet is sent to the server with a 1000ms timestamp. It takes 150ms for the server to receive this packet so the time is now 1150ms on both sides. The server opens the packet and reads the timestamp of 1000ms, subtracts this from the unified time (1150ms - 1000m) to get 150ms, which is how long ago the client generated the message
@JohnMcDonald Client says T and server receives it at T + RTT/2. I understand that. But does server assume that the number, T, received in the packet from the client is the same as the number the server would have come up with if the server timestamped at the same "moment". Hopefully I haven't lost you.
23:08
@ScrollerBlaster I think I understand what you are asking, and the server doesn't assume it, but I guess it assumes that the unified time is correct
@JohnMcDonald You mean even if the unified time is coming from the client?
@thedaian at the very least grab a GC for C++, enable it and scratch your destructors. Once you have your game completed work on removing your GC dependency - just get it working first, before tackling obscure bugs.
@ScrollerBlaster You bet, The server and client should be looking at the same times in their unified clocks
@JohnMcDonald @ScrollerBlaster depending on your religion. Clock dis-unification works for some games; decide based on what your playtesters say. If you don't have playertesters find some people and offer them "FREEGAMEZORZ".
@JohnMcDondald When I was measuring round trips between a client and server in UDP last night the round trip was mostly 76 ms but every 6th packet it doubled up to 150 ms. Thats why I wonder about calculating this latency and relying on it.
23:12
@ScrollerBlaster, to continue the example (real quick): Using the 150ms (which is the rough RTT/2 value for this packet considering that the unified clocks are correct), the server can create a new missile, and update it as many times as is required to simulate 150ms in your game.
@ScrollerBlaster Yeah... a lot of these clock sync methods will do multiple pings and average the results
There is no way to ever be 100% accurate over the internet today, sadly
You can only approximate
@JohnMcDonald TBH, I'm just worried about LAN. Thanks man. I'll get stuck into it and see how I get on.
@ScrollerBlaster something is wrong with your socket setup. I know nagle doesn't apply to UDP; but something is strange there. You should be able to deal with ping jitter (which makes it a nice test-case), but i would figure that out first: it's quite serious - you shouldn't be jumping to x2 latency; in South Africa we have bad latency - but never 100% jitter.
yeah... even over the lan
This is over a CAT5 network in my house.
@ScrollerBlaster pure madness. LAN is <1ms.
@ScrollerBlaster what netlib are you using?
23:15
@JohnMcDondald I was using SDL_net on WIndows XP
@ScrollerBlaster (never used it) are you sure it is using UDP? That sounds like TCP nagle issues to me...
@Johnathana Sure.
if there is some form of NODELAY option turn it on.
There isn't
23:20
Oh, and that's an other tip. For your first networking game, I might consider using TCP. There are fewer things to worry about
@ScrollerBlaster ok, then, maybe, possibly, potentially, look into RakNet. I haven't seen any success stories from SDL_net (their documentation also sucks) - but RakNet is standard - they have indie options.
Otherwise you might have to deal with the Two Generals Problem: en.wikipedia.org/wiki/Two_Generals%27_Problem
Or at least think about the Two Generals Problem
@JohnMcDonald +1 to that!
@JohnMcDondald I have used TCP before in other applications. I'd like to give UDP a try if its the best way.
23:24
@Johnatha What about no library and just using standard library sockets?
@ScrollerBlaster RakNet and SDL_net give you cross-platform capability. If you don't care about that go for it!
@Johnatha I do. I definitely do. But I might make it cross platform myself, if you know what I mean. Or is RakNet pretty easy to get bootstrapped with?
Good night gents! Thanks.

« first day (521 days earlier)      last day (4795 days later) »