sled

Members
  • Content count

    69
  • Joined

  • Last visited

Community Reputation

154 Neutral

About sled

  • Rank
    Member
  1. http://www.orcahq.com/jobs   Browse and search game industry jobs in one site. Close to 4000 positions listed.
  2. Here's a summary of a recent AI panel discussion held at Boston Post Mortem. It includes opinions and advice from AI developers who have worked on top notch games: John Abercrombie (BioShock, SWAT 4), Damian Isla (Halo 2, Halo 3), and Jeff Orkin (No One Lives Forever 2, F.E.A.R.).
  3. Are you sure? The top two google hits for "Distance Transform Algorithm" are not the same... Did you guys at least like the demo?
  4. It was taught to me, I didn't come up with it myself. But apparently not with the correct terminology. Thanks.
  5. A Pathfinding Optimization Using Flood Fill I wrote up a short post describing a technique that can be used to optimize pathfinding. You might find it useful or interesting if you're new to pathfinding. And there's a small, browser based demo.
  6. Anyone know how to eliminate duplicate find results in Visual Studio (2005)? I think it happens when the same file is referenced by multiple projects. Rather annoying...
  7. I'm trying to implement simple alpha blending to make a portion of a texture be completely transparent. For each pixel of the BMP that is being read in, I check if the color is white. If it is white I set the alpha value to 0, otherwise I set the alpha value for that pixel to 255. I then build the texture using: Texture walkcycle("Data/Texture/walk_cycle.bmp"); glBindTexture(GL_TEXTURE_2D, 14); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGBA, walkcycle.Width, walkcycle.Height, GL_RGBA, GL_UNSIGNED_BYTE, walkcycle.TextureData ); Before I render the QUAD: glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBindTexture(GL_TEXTURE_2D, 14); When I try to render a texture that has black figure with a white background I get weird artifacts around the edges. (Texture is being rendered on top of a blue gradient) If I replace the black in the texture with a slightly off white color (254 255 255) then the artifact no longer appears: Any thoughts on what I need to change to prevent this from happening? Thanks.
  8. game name blank?

    Awesome, thats it. Thanks a lot. I have no idea how you got that from my crappy description :)
  9. game name blank?

    Does anyone remember seeing a game trailer (flash movie) for a stylish side scroller that was in production? I believe it started in an outdoor setting with a spider. The next scene had an industrial theme, maybe in some kind of factory. The character was trying to climb objects that were falling over. This is a poor description but it's all I can remember. If anyone can remember the name that would be awesome.
  10. Solving the Gridlock Game

    Vorpy, thanks for the link. It looks like there is a solver that implements a brute force breadth first search. Sneftel, can you think of a good Heuristic for this game?
  11. Solving the Gridlock Game

    Asbestos, I definitely agree with you that there must be a better method than brute force search as we humans can usually solve the puzzle in 20-100 moves. (Although I think it's important to point out that we probably analyze more than a 100 moves in our head and automatically erase the bad ones. I think we are also able to do a good job of remembering moves we already did so we don't end up repeating them or returning to a previous state. This is effectively pruning branches of the search tree that we don't think it would be a good idea to take.) However, I don't think the human method is necessarily done by rating how "good" a board is. When I try to solve the puzzle, I usually start by looking at the first block between the blue block and the exit. I then try to figure out what pieces I need to move to be able to move that first block, and repeat. As an example, consider the following game board where the periods are empty space, the B's are the blue block, and the numbers are regular blocks. . . . 3 3 . . . . 2 . . B B 1 2 . . . . 1 4 4 . . . 1 . . . . . 5 5 . . To solve this, I would see I need to move block 1, and to do this, I would need to move block 5. Next I would see that I need to move block 2, and to do this, I would need to move blocks 3 and 4 (and possibly 1 and 5). I also try to make sure that in the process of clearing block 2, I don't move other blocks in the path of the blue block. Steps: 1. Move block 1 a. Move block 5 2. Move block 2 a. Move block 3 b. Move block 4 c. Possibly move blocks 1 and 5 - but make sure I'm not moving them back to previous positions where they are blocking B I think this algorithm could possibly work. This would involve performing a search on the first block in the way, then performing a search on the second block in the way while trying not move other blocks in the way of the blue block. The algorithm would also need to avoid making moves that "reset" previous moves or series of moves. This approach would probably fail for the more complex cases where you need to make things "worse" before you can make them "better". However, I think its a good first step and once it works well for simple cases, it could be tweaked for the complex cases. I look forward to trying to implement this, as well as an efficient brute force method after my finals this week. I'll be sure to post my results :)
  12. Solving the Gridlock Game

    As pinacolada said, using A* probably isn't viable because we can't think of a way to evaluate what a "good" board is. If you can think if a good evaluation function I'd be glad to hear it.
  13. I recently stumbled upon a small flash game called Gridlock that is a fun puzzle game. Now I'm trying to write a program to solve it. How the game is played The game consists of a 6x6 board with horizontal and vertical blocks of length 2 or 3 and width 1. The objective is to move the horizontal blue block out through the hole on the right side of the board. To do so, you will need to move other blocks out the way. The horizontal blocks can be moved left and right and the vertical blocks can be moved up and down. Writing a program to solve any puzzle My initial attempt to solve this puzzle was with brute force. I started by looking at the initial board and figuring out all possible moves that could be made (There are generally ~4-10 moves that can be made given a board state). Then I create new boards with these states and check if any of them are in the winning state (the blue block is out to the right). If there are no winners, I repeat the process of analyzing all possible moves and creating new boards. The problem with this attempt is that the space we are searching grows too fast. Generally it takes me ~15-50 moves to solve the puzzle. So a conservative estimate of the number of boards checked with brute force (breadth first search) would be 4^15 (could be 10^50 or worse). The next step What I plan to do next is play the game some more and try to figure out the strategy I am using the solve it. And by "figure out" I mean I want to be able to write down in words or explain to someone else steps they can take to solve the game. Once I figure this out, I think it will be much easier to implement an efficient algorithm. Has anyone played the game and come up with such a strategy? Another idea that I have is creating a heuristic to evaluate how "good" a board is. Meaning a board that is only a few steps away from being solved will get a higher score than a board that is not close to being solved. If this was possible then the N best boards could be evaluated (beam search) at each depth in the search tree. The problem with this is rating what a good board is. Usually a better board is one where there are fewer blocks in between the blue block and the exit. This is similar to saying the blue block is closer to the exit on the right side (but not quite - there are slight differences). I think this might run into problems though in cases where you need to make your position worse before you can make it better. Any suggestions on this idea or any other ideas?
  14. I switched to QueryPerformanceCounter() and that didn't seem to fix it....until I rebooted. Now it is running smooth. I'm wondering why it was performing so poorly before though? I still had 1+ GB of free memory and there were no other processes eating up serious processor time in the background while the program was running and I was watching the task manager. (Its a Pentium M 2.13 GHz - btw) Maybe windows had just been running for too long - that and I think I may have put it to sleep last night instead of shutting down - sometimes it behaves strangely after coming out of sleep mode. Anyway, thanks for the help and advice guys - I wish I hadn't wasted so much time on something as simple as restarting.
  15. timeGetTime() should have 1 ms resolution and 1 ms accuracy shouldn't it? The times between frames that I'm getting are in the 50-100+ ms range. You say timers are not the best to be using...what do you mean by that - what's better?