A month ago, that question would have been closed as "Too localised". Now, it's on the brink of being closed as "Too broad". xD
Looking at more of the queue, it looks like we seem to be now using "Too broad" for exactly the code-dump questions which we used to close with "Too localised". Hooray!
Hm.. I guess it's a matter of marking the question as "you're not focusing down onto a specific question, you're just throwing code at us and asking us to find the question for you", rather than "answering this is only useful to one person ever." I guess I can kind of see that, in retrospect.
Doesn't match what the "Too broad" explanation field says, though. :/
I was wondering if there's any way to know if the "player" is signed in or not?
Something like this:
if (GamePad.GetState(PlayerIndex.Two).IsConnected && !Gamer.PlayerTwo.IsSignedIn)
Edit:
This way the controller is connected (the player can use the controller), but it's not signed in to any...
I've been having trouble with this site over the past six months or so. Feels like it's been slowly turning from being about making games to being about how to use game-making tools. Which is a pretty subtle distinction, I guess.
It's like 80% figuring out the various bugs in their various snprintf() replacements. And exactly which version of Windows it is where they added 'poll()' to WinSock2 (Vista. No poll() for you before Vista)
<-- working on cross-platform projects which have to support back to Windows XP. No poll() for me. :(
Honestly, I should just implement my own properly-working snprintf implementation for use on Windows. I bet there's a free one out there already, even. poll() would be harder, though. (am currently using select(). Which is going to be awful for running on a server with lots of clients; I'm going to need to replace that with something platform-native on each platform, I imagine)
@Jimmy I like 0MQ, I think. I haven't done a lot with it yet, but it seems like a really clever solution to a whole lot of problems. But I don't think I'd want to use it for networking in a game.
I guess it'd depend on what the game's requirements were, actually. Maybe it could be made to work. :)
@JohnMcDonald The bit that kicked me over the edge was running CodeWarrior (PS2 development), and while typing "2.0f", the computer ground to a halt as soon as I typed the '.', disk thrashing nonstop for about five seconds, while the computer (presumably) tried to figure out whether '2' was a structure or class, and whether there were any fields it could prompt me to enter. Have had all automatic code completion turned off in everything since then.
Yeah, that makes sense, @Jimmy. I just solve those problems by choosing not to work in languages/libraries which require me to remember such things. But that's becoming less and less an option, these days.
Error 1 'Microsoft.Xna.Framework.GamerServices.SignedInGamerCollection' does not contain a definition for 'Any' and no extension method 'Any' accepting a first argument of type 'Microsoft.Xna.Framework.GamerServices.SignedInGamerCollection' could be found (are you missing a using directive or an assembly reference?) C:\tyler\dev\PlatformerEngine\PlatformerEngine\PlatformerEngine\GameObjects\Input\BasePlatformerInputHandler.cs 22 22 PlatformerEngine
In XNA there is a SignedInGamer class with a SignedInGamer.PlayerIndex member that should tell you just that if you can get a hold of the SignedInGamer object.
To do that, there is the Gamer.SignedInGamers static property which contains a collection of SignedInGamer objects based on the current ...
Apparently GD.SE is "for really nooby sounding game-programming questions"
@JohnMcDonald are you gonna put together a meta question or anything around mcmonkeys latest comment? I'm curious what the "official" stance on that is
I have noticed recently that people at Stack Overflow usually move questions related to game development to Game Development SE. So are questions related to game development no longer appropriate at Stack Overflow?
If this is the case,
Questions related to programming, DirectX or OpenGL etc ar...
The big problem I see with the accepted answer to the meta you just posted, is that a huge portion of these users have no idea that GameDev even exists
I feel quite strongly that GameDev should cover all aspects of "game development" (note the site isn't called "game design"), which should absolutely include programming. Just because there's another SE site that already covers some related topic (i.e. SO in the case of programming), doesn't mean...
Before finding this website, I was checking out the XNA, Pathfinding, and Networking tags on SO. It was only when one of the questions I clicked on was migrated here that I realized this world existed
"Would a professional game developer give me a better/different/more specific answer to this question than other programmers?" - I feel like XNA, DirectX, OpenGL, and those types of things would all fit under this statement. Mobile dev is the bigger grey area.
Well I guess thats my point. There is a set of APIs for Android, IOS, etc. I wouldn't vote to migrate "game dev" questions that are on SO using these APIs unless it was absolutely something game dev specific (hence the grey area). Given the statement I quoted above, I would definitely have the XNA Sign in Question flagged for migration
I just mean.. questions about how "if" statements work (for example) aren't about games just because you're going to use them in a game. Same way that questions about how "if" statements work aren't about boats just because you're going to use them while you're sitting in a boat. ;)
one of the most famous Stackoverflow closed questions was "I'm going on a boat for a year, what kind of equipment do I need (salt-tolerant) etc. so I can program on a boat"
I remember some time ago there was some huge problem regarding some question that had something to do with a boat, and I think I missed that topic completely. As I see it being mentioned every now and then, I'd just like to know what it was about.
@Jimmy Yeah, it's kind of backwards from the boat programming meme, which was about whether boat questions were on-topic if you were asking in order to program while on the boat. :)
BTW somebody was asking a question on GD about stealing ideas (the Kickstarter cold feet question). I have posted an asteroids bookmarklet game here some time ago. Now I have found almost exact copy of it, just different graphics and under a very well known company name... Now I wonder if they bought it or stole it (and who from whom :))... here it is: m-ms.dk/spaceheroes
Which brings me to a question: How to protect HTML5/Javascript games from piracy?
I'm writing an HTML5 based game that runs as a stand-alone application. It is distributed via the web, but there are no other server requirements—no database, etc.—everything is "in-app". This is by design since additional servers would raise the cost of distribution.
So given that it's just a s...
RE: Walking Dead not saving completion.. nope. Continuing that "Episode Four" save game left me right at the end of Episode Five, answering the final questions. Weird.
Polybius is a supposed arcade game featured in an Internet urban legend. According to the story, the Tempest-style game was released to the public in 1981, and caused its players to go insane, causing them to suffer from intense stress, horrific nightmares, and even suicidal tendencies. A short time after its release, it supposedly disappeared without a trace. Not much evidence for the existence of such a game has ever been discovered. Polybius gets its name from the Greek historian who, among his other works, was known for his works in relation to cryptography and for developing the Pol...
@sm4 it really is hard to write an easy to read code.
but sometimes, the code itself is not that hard, it's just an implementation of a complex mathematical solution.
in these cases either you know the algorithm or not, if you already know what that code is supposed to do, it's just easy. otherwise you can't even tell why is that code working.
consider a code solving "0 = a*x^2 + b*x + c"
it's as easy as writing : x_1 = (-b + sqrt(b^2 - 4 * a * c)) / 2 / a x_2 = (-b - sqrt(b^2 - 4 * a * c)) / 2 / a
if you see that piece of code you can't really blame the developer if you don't understand what it's doing.
well he could write it in a cleaner manner for example by using one or two extra variables but in the end you either understand what is happening or not, commenting won't actually help :|
what do you do when you try everything 4 times, and it doesn't work. Then the next day, you try the same things, and it works. Then a month later you try, and it doesn't work. Then you try everything 4 times again. Then you wait till tomorrow and try the same things again, and this time it doesn't work.
really getting angry about this now
oh... with the 4th, i bet a lot of people took friday off.
but i still don't see differences in the way they're implemented
oooh... it's not the editor saving incorrectly. Transplanting the .ccbi that works in one project to the project where the other doesn't work... doesn't work.
and transplanting the ccbi that doesn't work to the project when the other does... works.
okay this is a real noob question, but if one includes a header in one file, would the parent of the parent of that file have access to the functions from the included one?
eh, I did a lot with image processing before. I had a signature shop on an RS forum for a while, and got to an okay level. nothing amazing. can't say I'm afraid of GIMP or Photoshop.
what drives me insane is positioning, especially when trying to make it work on screens of many different sizes.
what I usually do is put the collision detection as part of the movement code. like do the movement in temporary variables, check for collision on those. if it doesn't collide, return the temporary variables; if it does, return the originals. that's about all the advice I can give without seeing more details.
instead of calling a function to move the player, then calling a function to check for collision, as separate things
make the collision detection part of the movement function
this also solves the problem you were having earlier about figuring out where to place the player when he collides with something. since you can just make him stop. (or make him slide, since that's usually more desirable)
here's a related example, for rotating a piece in my tetris clone:
if (rotate)
{
m_FallingPiece->Rotate();
fallingPositions = m_FallingPiece->GetPositions();
bool invalidRotation = false;
for (int i = 0; i < 4; i++)
{
if (fallingPositions[i].x < 0 || fallingPositions[i].x > 9 || allingPositions[i].y < 0 || fallingPositions[i].y > 19)
invalidRotation = true;
if (m_Grid->GetColor(fallingPositions[i]) != CL_EMPTY)
invalidRotation = true;
}
if (invalidRotation)
m_FallingPiece->UndoRotate();
it rotates, then check if the rotation was invalid (ie. if it collides with another piece, or goes outside the walls), and if it does, it undoes the rotation.