• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Jeremy Stover

  • Content count

  • Joined

  • Last visited

Community Reputation

104 Neutral

About Jeremy Stover

  • Rank
  1. :edit, accidentaly posted twice. Sorry
  2. [quote name='Jaap85' timestamp='1340828179' post='4953441'] i dont see the error in your code here yet. What happens to the value of nValidMoves.Count in the endless loop? Does it decrease and increase? Or does it stay the same? Also, what does the SetSquare function do exactly. Do you have the code for that? [/quote] The set Square function only sets the square in the copy of the current game board. And to be honest, it seems like nValid moves is working fine. Towards the start of the game, the count is 6, and after I let it run for a little while, the count is at 2, never at zero as far as I can see though. I do know that I never reach past the' int nscore = Min(allNodes[0,0]);' BTW, setSquare is now setNewMove, It takes the board that we are testing, the position to place a chip, and either player, or an empty space to play there. You see at the bottom of the Min() and Max() function, I get rid of all the new spaces tested. I think at least. That what I intended. the code for setNewMove() is... [source lang="csharp"] /// <summary> /// Sets the new move into the boardArray /// </summary> /// <param name="newMove"> vector2 position in the board array to set the new move</param> public void setNewMove(Vector2 newMove, int player) { boardArray[(int)newMove.X,(int) newMove.Y] = player; }[/source] and that is part of my board class, which just holds the actual version of the board, and the one that is being cycled through. :Thanks for your help btw, I really appreciate it.:
  3. Ok, I have been looking through this relentlessly, Still throwing me into an infinite loop. Could you guys look through my new code when you have a chance and see what my problem is. Thanks a bunch for all your help. [source lang="csharp"] public Vector2 updateMINIMAX() { int bestscore = -1000; List<Vector2> bestMoves = new List<Vector2>(); List<Vector2> nValidMoves; nValidMoves = allNodes[0, 0].validMoves(); while (nValidMoves.Count != 0) { allNodes[0, 0].setNewMove(nValidMoves.First<Vector2>(), 2); int nscore = Min(allNodes[0,0]); if (nscore > bestscore) { bestscore = nscore; bestMoves.Clear(); bestMoves.Add(nValidMoves.First<Vector2>()); } else if (nscore == bestscore) { bestMoves.Add(nValidMoves.First<Vector2>()); } allNodes[0, 0].setNewMove(nValidMoves.First<Vector2>(), 0); nValidMoves.Remove(nValidMoves.First<Vector2>()); } return bestMoves.First<Vector2>(); } private int Min(Board tempBoard) { int moveScore = tempBoard.winCheck(); if (moveScore != 0) return moveScore; int nBestScore = 1000; List<Vector2> nValidMoves; nValidMoves = tempBoard.validMoves(); while (nValidMoves.Count != 0) { tempBoard.setNewMove(nValidMoves.First<Vector2>(), 1); int nScore = Max(tempBoard); if (nScore < nBestScore) { nBestScore = nScore; } allNodes[0, 0].setNewMove(nValidMoves.First<Vector2>(), 0); nValidMoves.Remove(nValidMoves.First<Vector2>()); } return nBestScore; } private int Max(Board tempBoard) { int moveScore = tempBoard.winCheck(); if (moveScore != 0) return moveScore; int nBestScore = -1000; List<Vector2> nValidMoves; nValidMoves = tempBoard.validMoves(); while (nValidMoves.Count != 0) { tempBoard.setNewMove(nValidMoves.First<Vector2>(), 2); int nScore = Min(tempBoard); if (nScore > nBestScore) { nBestScore = nScore; } allNodes[0, 0].setNewMove(nValidMoves.First<Vector2>(), 0); nValidMoves.Remove(nValidMoves.First<Vector2>()); } return nBestScore; } [/source]
  4. I was lookign through my code, and I founf my problem. It wasn't returning the game over right, and it was throwing me into an infinite loop lol. Sorry for being an ahole
  5. Sorry, I put this up and then saw it, very relevant info lol So I will attempt to delete this if I can, if not, have at it mods
  6. Hey everyone, I am developing a connect four clone, I have just about all the features developed that I want, but the AI is to easy. As of right now, I have a list of "Attack" moves that will make the Computer Win, and a list of "Defend" moves that will block the players wins. If it cannot see either of those possible moves, it places randomly. The game plays, but it is far to easy to trick the computer. I find it to be far to close to equivalent of a novice player. I see the problem that it cannot look into the future. It can only 'see' what is currently being played. So I decided to implement the MINIMAX tree, with a simple pruning algorithm. As I have no experience in this area, and only have a general idea of MINIMAX, could I get some help? I under stand the basic premise of the algorithm, yet I cannot seem to get an idea of how to implement this. I have an array holding the play field data, 0 being empty, 1 being the player, and 2 being the computer. Player one goes first. And the loser goes first the next game. Regardless, I have no idea on how to start implementing this. Would I hold an array of the play field for each possible move? Or would I have an array for a set of moves and score that array? I guess the latter would save a lot of memory, Then, would I use a for loop on each set of moves to create an array for a different move? Then check to see if that move is a win or lose, and if not, do it again? I guess what I am looking for is a very simple pseudo code version of what I have to do. Thanks for your help guys.