AndreTheGiant

Members
  • Content count

    2748
  • Joined

  • Last visited

Community Reputation

329 Neutral

About AndreTheGiant

  • Rank
    Contributor
  1. Windows Firewall Troubles

    Well the title of my post was "Windows firewall troubles" and I mentioned Windows in the question itself too, so yeah its Windows ;) Fair point though, here's more detail: Its Windows 10 Pro N 64 bit's built in "Windows Firewall with Advanced Security".    I dont really see anything about credentials or permissions - just the service path, the ports, etc.   Also I just did a test with a new version of the game server that is NOT a service. Its just an EXE that you run. Same problem. Telling the firewall about the specific EXE does not allow connections, but disabling the firewall altogether of course works, and so does enabling the firewall but creating a more relaxed rule for "all programs".  So it really seems like my game.exe is not the program that needs to be allowed.. the question is, what the hell program is doing the communication??
  2. I'm pretty familiar with networking and firewalls but theres something really simple I'm trying to do and its not working.   I wrote a simple websockety web game thats a service currently running on PC1 and listening on port 8000.  I tried connecting to it from a different computer on my network and the browser couldnt find it. Of course it was the firewall, so I disabled the firewall completely on the host machine and immediately I could access the game from other computers.   Since I dont want the firewall completely disabled, I turned it back on and instead added some rules.  I made inbound and outbound rules allowing my gameservice.exe full access to any protocol, any port on public, domain and private networks. Surprisingly, this did not work! I could not access the game with these rule enabled.    So I tweaked the rules slightly from gameservice.exe to "any program", and now the game works again. So what is the problem here? I'm 100% sure that I had the correct path to my gameservice.exe in the firewall rules because if I go to task manager, services tab, locate GameService, and look at properties, it shows me the exact path to gameservice.exe.  So why is it that specifying the exact executable does not work, but saying "any program" does? The service is very simple and does not invoke any other executables. Is windows secretly moving my gameservice.exe when it registers it as a service? That cant be it because I can see the path as I mentioned above.  This is pretty frustrating because I want my firewall to be as tight as possible but I'm tempted to just open it up because it seems like its doing something wrong.    
  3. I'm familiar with BSP trees, quad trees, octrees and other variations of space partitioning data structures typically used in games. Currently trying to wrap my head around R-trees.   But something keeps bugging me, I think these data structures are way overkill for what I'm trying to achieve. I really think there's a much simpler way for me but I cant quite figure out the math.    I have a big grid of objects, and for any one of the objects, I want a quick way to find the other objects that are "close" to it, without having to loop through every object and check it's coordinates. "Close" will be some radius that I'll choose based on the viewport of the game or something.   It seems to me there should be some math magic that can be done on the coordinates to arrange things properly in a data structure. Like maybe a doubly linked list, where the items to the left and right of any item are the ones close to it.   I thought about simply adding the X and Y coordinates together, and using that as some sort of hash for the location of items. So for eg an item at (40, 290) would hash to 330. But then I realized that (290, 40) would also hash to 330 even though they're nowhere near eachother. So I also tried thinking about multiplying the coordinates together, and other math operations but nothing seems to work.   Then I started thinking about storing each item in 2 lists. One list sorted by the X coordinate, and the other sorted by the Y coordinate. Then given any item, you can find the close items by searching the first list for X coordinates that are close, and the second list for Y coordinates that are close, and the intersection of those 2 results are the close items. You would use a binary search on the lists of course, instead of looping through each item. This method seems promising in my head, but I dont know if this is slower or faster than just using a standard quad-tree type data structure.    I hope this makes sense. Basically I'm hoping the people who have already thought about all of this, can tell me whether I'm wasting my time and maybe I should just use a tried-and-true quad-tree.        
  4. Play my software through a browser

    You can certainly pipe the graphics and input through a browser using tools like others have suggested. But the "right" way to do it is to re-design the game to be playable through the browser. You would need an experienced web game developer (Flash, HTML5, Sliverlight, WebGL, UnityWebPlugin, whatever technology is best for the game) and a developer who is very familiar with the existing architecture of the current game, at the least.   Why do I say thats the "right" way? A proper port from whatever it is now, to a web game will give you the best efficiency, least lag, best overall player experience. 
  5. Thanks for the ideas! I'm not against letting people submit questions. That seems like it would only work once the game is big and successfull though, not good for early stages.   I'm also liking the idea of using an API/service to get questions. This one is pretty cool - I think its all the Jeopoardy questions: http://jservice.io/   I would want to find several services like that, and randomly get questions from them, therefore keeping things interesting and also protecting against a service being down halting the game.    Lots to think about, thanks!
  6. I'm toying with the idea of building a trivia game, but instead of making the questions myself, or outsourcing them, I'm thinking of having the game go out onto the internet and create the questions itself.    I havn't decided if the questions will be multiple choice (chose A,B,C,D) , or fill in the blanks (you have to actually type the answer), or some other question type. Multiple choice makes for a better game (IMO), but I have no idea where I will get the 3 fake answers from. Fill in the blanks would be much easier to program, but it makes for a slower game because people have to type, and also its very tricky because there are usually multiple ways to spell things, and it would be nice to allow minor spelling mistakes.   Also, instead of using the entire internet as a question source, I might restrict the game to using Wikipedia only - that way I can use certain assumptions about the data format, etc. It might make things a lot easier. It would also give me a really easy way to have categories (eg Arts, History, Geography, etc) because Wikipedia articles are already grouped that way.   So for example I'm on Wikipedia now and I just clicked on "Random Article". This got me the page on Heathrow Airport: https://en.wikipedia.org/wiki/Heathrow_Airport   Lets look at the first sentance in the article:   Heathrow Airport (IATA: LHR, ICAO: EGLL) is a major international airport in west London, England.   Suppose I wanted to use this for a trivia question. There are lots of ways I could make a question from this sentence, some ways no doubt being harder to accomplish than others.   Example 1: multiple choice   ________ Airport (IATA: LHR, ICAO: EGLL) is a major international airport in west London, England. A:) Edinburgh B:) Bristol C:) Heathrow D:) Newcastle   How could I accomplish something like this? My question generator would have to know that Heathrow is an airport, and would have to go and look up 3 fake airports to display, along with the correct answer. Even further, These are all airports in the UK to make it a bit trickier. I have no idea how to write a program to do something like this. Would this require some fancy artificial intelligence, or am I missing something?   Example 2: fill in the blanks ________ Airport (IATA: LHR, ICAO: EGLL) is a major international airport in west London, England. -> Player must type "Heathrow" to win   This seems much easier to program, however its not as fun of a game in my opinion. Also, I would need to have an algorithm that accepted minor spelling mistakes,so for example "Hethrow" should be accepted. I dont think this algorithm is that difficult but it is a consideration. Also there could be scenarios where a completely different answer with completely different spelling is also correct. For example if Heathrow also had a second unofficial name, I might want to accept that answer as well.     Backing up a bit, how do I even choose "Heathrow" as the guessword from this sentance? How could the question generator know that Heathrow is the most interesting and fun word to blank out? Afterall, words are just words to the program. What if instead of Heathrow, it chose "major" as the guessword? That would be a really stupid and furstrating question. I'm starting to think this program might be way to difficult to build.    Would I need a database or library that classifies each word as a noun, adjective, verb, etc? That might help with choosing which word to blank out.   Any ideas on this topic would be appreciated. I'm hoping I don't need a PHD in linguistics to pull this off!  
  7. Need Idea For a Roguelike Game

    Play a bunch of roguelikes. There are so many good ones.  Then pick your favourite aspects of your favourite ones, and build a roguelike that steals the best ideas from all of them. And of course, as you start working, you'll think of your own unique ideas to throw in there too, I promise :)
  8. I can tell you I've been working on a 2d dungeon crawler game for a while now, and by far the hardest part has been producing dungeons that I'm happy with.    I started off generating completely random dungeons/mazes but somehow they did not look interesting or good enough. Even though they were random, they were not random enough - if that makes sense. They were too repetitive, and felt like they were generated by a computer program. The holy grail of random dungeon generation is to generate a dungeon that LOOKS LIKE it was painstakingly hand-crafted by a team of human designers over the course of months :) So I tweaked my algorithm, did a lot of research, added lots of variation and areas/biomes, and on and on. At the end of all that, it was better but still not up to my standards.   Next I started working on a level editor because I temporarily gave up on the random generation. I cranked out a quick and dirty editor in about a week and then made a small hand-made dungeon myself. The dungeon was pretty good, I was happy with it. But it only took me about 10 minutes of playtesting to be completely bored with the map. It was too small. I intend for my game to have stupidly big dungeons, so big that making them by hand is completely impractical.    I then did a hibrid approach where I first generated a huge random dungeon, then imported it into my level editor to tweak it and make it better, up to my standards. This kind of worked but actually did not save as much time as you'd think. Having the pre-generated map in the level editor somehow slowed down my creativity. Its easier to create a map from scratch than to modify an existing one, I found. More importantly, I want to build a game that I would like to play. I realised that my dungeons need to be 100% randomly generated with no user interaction, because I want them to be a surprise to me too! If I generate the maps manually then playing them is no fun at all.   So I went back to my generation code and thats where I am today. I've read a ton of articles on random generation. I think my current code probably blends in algorithms from my favorite 5 articles on the subject. But sadly my levels are still not what I want them to be. Something is missing, and I cannot put my finger on what.   I dont know how helpful that was, but I just wanted to say that generating good dungeons is hard.  There are some great articles and discussions here:   https://www.reddit.com/r/proceduralgeneration
  9. How do you feel about buffered jumps?

    I think it would help immensely if you can give examples of games that do / don't use buffered jumps. In fact if you had such a list of examples, you probably wouldn't even need our opinion, you could just emulate the one that feels best for your situation. One game that always felt really good and responsive and fair were the Super Mario games. Did they use buffered jumps? I assume not but cant be sure.
  10. FPS frustrations

    Yup, Its a window'd game. But it may become fullscreen later, or at least have the option. I don't understand why it would make a difference whether its fullscreen or windowed. I understand VSYNC eliminates tearing, but why does window vs fullscreen factor into it? My faith in VSYNC has taken a beating from all the replies in this thread, plus the issue I experienced.
  11. FPS frustrations

    Well thanks for the tips everyone. I ended up using the dreaded tight loop for a time delay, and turned off VSYNC. Seems to work so far, although the CPU is buzzing a little more than it used to. At first I tried putting sleep(1) in my loop but as I suspected it was inaccurate. I was targeting 100 FPS but my actual FPS was anywhere between 92 and 100. So I replaced it with sleep(0), and then my FPS was exactly 100 at all times, however the CPU spiked up to 100% (well, 25% since this is single threaded on 1 of 4 cores). The CPU fan was going crazy, and I knew I could not leave things like this. So what I ended up doing is sleeping based on the time remaining. For example if I needed to sleep for 14 milliseconds, then I would basically do 12-13 sleep(1)'s and then sleep(0) until the remainder of the 14 millis was up. This way the CPU gets a break, but I'm still hitting exactly 100 FPS, which is a good indication that I have complete control over the game now. I will do more testing and reply back if anything changes, but I think its looking good!
  12. FPS frustrations

    woah, quotes are messed up. I tried to fix it but something is very screw-y. I preferred the forum software from 10 years ago lol.
  13. FPS frustrations

  14. FPS frustrations

      Can't the CLR profiler tell you if you're causing garbage collections? Seems like it should be a very easy thing to rule out. Yup, windows performance monitor hooks into the CLR GC nicely and produces some nice graphs. I was playing with that last night and could not come to any conclusions, I need to test more. The allocated memory grew very slowly and then was eliminated by the garbage collector periodically, but the collections did not correspond to the slowdowns, so its not looking like the GC is the culprit so far.
  15. FPS frustrations

    I guess I should clarify that I'm not using an off-the shelf profiler, I'm already using hi-rez timers sprinkled throughout my code, plus some nice helper functions for keeping track of all the timers, plus logging... all together I call this my "profiler".   Can you elaborate? I thought VSYNC was way better than sleep, because its essentially a hardware interrupt rather than software. But let me be clear, I'm not using VSYNC to control game speed, I'm using it to control frame rate. Big difference. Regardless of whether VSYNC is on or off, and regardless of what frame rate I'm getting, my game speed is consistent. A bullet takes the same amount of time to travel across the screen no matter what. I don't have issues with game speed. Just frame rate   Not sure if you're addressing me or the other guy, but I already said I don't use sleep(), and also said that I dont want to use sleep() because its not the best solution. But what exactly do you mean by "use high rez or low rez timers for delays" ? Are you talking about looping while currentTime is less than desiredTime for example? Well I don't know if you can "turn off GC", but I certainly am using memory management in the form of object pools. There is actually very very little memory that gets allocated on a frame-by-frame basis. Which is why I do not believe that the GC is what is causing my delays. There is no way that the garbage collector is taking 16 milliseconds to clean up the tiny bit of trash that I created in 1 millisecond of game logic. Just to clarify again, no I'm not using sleep(). And I dont mind surrendering to the GC - in fact I'm not sure if that can be prevented. But I would love some more visibility into exactly what the GC is cleaning up. If it turns out thats the problem - I would still leave the GC on, but I would fix whatever is creating the garbage.   Agreed, unfortunately there is no such thing