• 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.

whitenose

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

124 Neutral

About whitenose

  • Rank
    Member
  1. [quote name='alvaro' timestamp='1350840683' post='4992490'] It looks to me like you got the sign wrong. But you should learn how to debug your code. That position seems to be solvable with a depth-1 search, and that should be relatively easy to debug. [/quote] What do you mean by wrong sign ? Where ? For both players ("computer" or "human") the function returns a positive score, i.e. everybody is trying to maximize score, right? You're saying that at depth=1 , the function should return best move (score) ? If so, i can confirm that (it returns biggest score for current player) ! Please help .
  2. @alvaro : correction made to code.(sorry)
  3. Hello, I'm sorry i keep coming back to this subject, but i have some issues wich i help you can give me an answer. I have this EvalFunction : [source lang="java"] public int evaluateBoard(int sign) // -1 = "computer" and +1 = "human" { int total = 0; int computer_closedmills = this.checkMills(-1); // count how many closed mills AI has (3 tokens in a row/column). int computer_openmills = this.checkFormers(-1); // count how many 2 in a row/column tokens AI has. int computer_blockers = this.checkBlockers(-1); // count if one AI token -> blocks 2 player's tokens int computer_tokensleft = this.checkTokens(-1); // count how many tokens AI has. int computer_openspaces = this.checkOpenSpaces(-1); // count how many move possibilities AI has (in current board) int player_closedmills = this.checkMills(1); // count how many mills "human" has int player_openmills = this.checkFormers(1); // count how many 2 in a row/column "human" has. int player_blockers = this.checkBlockers(1); // etc. int player_tokensleft = this.checkTokens(1); int player_openspaces = this.checkOpenSpaces(1); // compute total score total -= ((computer_closedmills * 20)+ (computer_openmills * 40) + (computer_blockers * 30) + (computer_tokensleft * 10) + (computer_openspaces*5)); total += ((player_closedmills * 20) + (player_openmills * 40) + (player_blockers * 30) + (player_tokensleft * 10) + (player_openspaces*5)); if(sign==-1) return total; else return -total; } [/source] Ok, now i have [u]this situation[/u] as you can see below represented in this [i][b]Picture [/b][/i]: [url="http://imageshack.us/photo/my-images/688/evalfuncnotworking.jpg/"]http://imageshack.us...notworking.jpg/[/url] Note that red tokens represent "computer". Instead of moving token 22 to position 19 (wich will form a new mill) , my evalFunction() makes another decision and moves something let's say like token 21 to position 9 , or 18 to position 10. Can you help me improve my eval function so that token 22 moves to 19 ? ([i] so that mill 21-22-23 breaks and token 22 forms a new mill on 18-19-20[/i]) thanks !
  4. yes, that's correct. thanks for all the help ! i really appreciate that.
  5. @alvaro [quote name='alvaro' timestamp='1350315133' post='4990405'] ... EDIT: Wait, why are you passing a sign around? [/quote] Sign value is: +1 or -1 (it alternates between MAX = +1 and MIN = -1 teams). It's not correct ?
  6. It seems to work now , final functions here: negamax (returing a best score): [source lang="java"]public int negamax(board board, int depth, int alpha, int beta, int sign) { if (depth == 0 || board.checkWinner(sign)) { return board.evaluateBoard(sign); } int max = Integer.MIN_VALUE+1; ArrayList<board> boardsArray = board.generateNextPossibleBoards(sign); for(board nextBoard: boardsArray) { int score = -negamax(nextBoard, depth-1, -beta, -alpha, -sign); if (score>max) max = score; if (score > alpha) alpha = score; if (score >= beta) return score; } return max; } [/source] and function returing a move (helped by negamax() function) : [source lang="java"] public board returnBestMove(board board, int depth, int sign) { board bestMove = null; int best = Integer.MIN_VALUE+1; ArrayList<board> boardsArray = board.generateNextPossibleBoards(sign); for(board nextBoard: boardsArray) { if (bestMove == null) bestMove = nextBoard; int score = -negamax(nextBoard, depth, Integer.MIN_VALUE+1, Integer.MAX_VALUE-1, sign); if (score > best) { bestMove = nextBoard; best = score; } } return bestMove; } [/source] bestMove = it's a board also, when function returnBestMove() finishes I just compare [i][b]bestMove [/b][/i]board with[i][b] initial Board[/b][/i] and identify wich [i][b]token [/b][/i]has been moved (from wich pos, to wich destination pos). If i've made some mistakes - your suggestions will be highly appreciated ! Thanks .
  7. Hello, I'm so sorry for the late reply. I had a car accident, all it's ok... Thanks for all your answers ! As i said first, i'm trying to do a simple 9Men's Morris game (for Android). This game has 3 phases: PlacingTokens, PlayGame, EndGame as you well know. I have switched to [b][i]negaMax()[/i][/b] but the problem persists, and i think I know where/when it happens (i will explain) but dont know how to fix it. [img]http://public.gamedev.net//public/style_emoticons/default/wacko.png[/img] The problem is returning final "bestMove" to the main calling function . Had some time today to implemeent [i][b]negaMax()[/b][/i] and i hope didn't made mistakes - and it seems that at "depth=1" when PlacingTokens phase is active -> all it's OK. (meaning that the "computer" plays good enough). The calling code for this looks like this now for [i][b]negaMax()[/b][/i]: [code] // as you can see "depth=1" (MAX = "computer" turn !) case renderer.GAMESTATUS_PLACETOKEN: //PARAMETERS: simulationBoard, depth, alpha, beta, sign (or color wich wil alternate between +1 or -1) negaMax(simulationBoard, 1, Integer.MIN_VALUE+1, Integer.MAX_VALUE-1, 1); [/code] My "negaMax()" function looks like this: [code] private int negaMax(board board, int depth, int alpha, int beta, int sign) { // if depth reached or we DO have a winner on "this" board if(depth<=0 || board.checkWinner(sign)) { // evaluateBoard() evaluates board from "sign"'s point of view and returns a positive or negative score. return sign*board.evaluateBoard(sign); } int max = Integer.MIN_VALUE+1; // -VERY SMALL value. // generate all available possible moves ArrayList<board> boardsArray = board.generateNextPossibleBoards(sign); // loop thru all generated boards for(board nextBoard: boardsArray) { // recurse and store result to "x" . int x = -negaMax(nextBoard, depth-1, -beta, -alpha, -sign); // sign alterantes between +1 & -1 (computer & human) // got a "better/best" move ? if (x>max) { // save the "best" move so far. max = x; chosenBoard = nextBoard; chosenBoard.showBoard("FOUND BEST MOVE"); } // alpha-beta pruning if (x>alpha) alpha = x; if (alpha>=beta) return alpha; } // clear boards when done. boardsArray.clear(); // return best move so far. return max; } [/code] allright, and now the checkWinner(sign) method (wich returns true or false[u] [i]if a team is Winning[/i][/u]) [code] public boolean checkWinner(int sign) { board board = this; // --------------------------------------------------------------------------------- // 0. get current team // --------------------------------------------------------------------------------- int team = renderer.TEAM_NOTEAM; int opponent = renderer.TEAM_NOTEAM; if(sign==1) { // if "computer" turn team = renderer.TEAM_OPPONENT; opponent = renderer.TEAM_PLAYER; } else { // if "human" turn team = renderer.TEAM_PLAYER; opponent = renderer.TEAM_OPPONENT; } // --------------------------------------------------------------------------------- // 1. check if only 2 tokens (from opponent team!) are left on current board. // --------------------------------------------------------------------------------- int counter = 0; for(short i=0;i<24;i++) { if(board.gNode[i].gOccupiedByTeam!=renderer.TEAM_NOTEAM && board.gNode[i].gOccupiedByTeam==opponent) counter++; // count opponent tokens } switch(team) { case renderer.TEAM_OPPONENT: if(counter<=2 && renderer.gPlayer.gTokensToPlaceOnTable==0) { return true; // opponent has won. } break; case renderer.TEAM_PLAYER: if(counter<=2 && renderer.gOpponent.gTokensToPlaceOnTable==0) { return true; // player has won. } break; } // --------------------------------------------------------------------------------- // 2. all opponent tokens are blocked! (no more possible moves, all tokens are blocked) // --------------------------------------------------------------------------------- for(short i=0;i<24;i++) { // go thru all tokens in this board, if opponent is not blocked -> return false. if(board.gNode[i].gOccupiedByTeam==opponent) { // check if any empty neighbours for this token for(short n=0;n<4;n++) { // get neighborur id int id = board.gNode[i].gNeighbourId[n]; // check if neighbour is empty space. if(id!=-1 && board.gNode[id].gOccupiedByTeam==renderer.TEAM_NOTEAM) { // still having empty spaces to move. (NOT BLOCKED!) return false; } } } } // opponent is BLOCKED! so this team is winning -> return true! return true; } [/code] and this is the evaluateBoard(sign) function wich evaluates current board from --> "[b]sign[/b]" ("computer" or "human") point of view : [code] // evaluate current board. public int evaluateBoard(int sign) { int score = 0; int formers = checkFormers(sign); // if 2 tokens on same row/column has been found, then a former has been found. int blockers = checkBlockers(sign); // if 1 token blocks a token form other team, then we have a blocker. int mills = checkMills(sign); // if a mill has been formed (3 tokens in a row/column), then we have a mill. int tkcount = checkTokenCount(sign);// count token (team - opponent) difference on this board. score = score + formers*250; // multiplier is 10 here for the "formers" score = score + blockers*500; // multiplier is 500 here for the "blockers" score = score + mills*1000; // etc. score = score + tkcount*10; if(sign==1) // is it "computer" turn? { return -score; // return score for "computer" } else { return +score; // return score for "human" } } [/code] OK, now generating boards in 1st phase (PlacingTokens) is done like so: [code] public ArrayList<board> generateNextPossibleBoards(int sign) { // copy current board board currentBoard = new board(this); // instantiate a empty array. ArrayList<board> boardsArray = new ArrayList<board>(); // current team is unknown. int team = -1; int opponent = -1; int game_status = -1; // update current team (can be "computer" or "human" player). if(sign==1) { team = renderer.TEAM_OPPONENT; opponent = renderer.TEAM_PLAYER; game_status = renderer.gOpponent.gGameStatus; } else { team = renderer.TEAM_PLAYER; opponent = renderer.TEAM_OPPONENT; game_status = renderer.gPlayer.gGameStatus; } // according to current player's (computer/human) game-status: switch(game_status) { case renderer.GAMESTATUS_PLACETOKEN: // simulate a single place token (on this board) and save this new board to boardsArray. for(short i=0;i<24;i++) { // go thru all empty spaces on this board , and if not occupied by any token if(currentBoard.gNode[i].gOccupiedByTeam==renderer.TEAM_NOTEAM) { // place (a opponent) token to the empty neighbour found currentBoard.makePlaceToken( i , opponent ); // place a opponent token !!! boardsArray.add(new board(currentBoard)); // undo previous move currentBoard.undoPlaceToken( i , renderer.TEAM_NOTEAM); } } break; ... ... return boardsArray; // return all generated boards. [/code] OK , all it's good so far, the "computer" finds best moves and plays good against "human" . -------------------------------------------------------------------------------------------------------------------------------------------------- The problem is when swithcing to phase2 -> i.e the "PlayGame" phase ! The code doesn't change EXCEPT generating "moves" when in "PlayGame" phase. Now, generating "moves" is done like so: [code] public ArrayList<board> generateNextPossibleBoards(int sign) { // copy current board board currentBoard = new board(this); // instantiate a empty array. ArrayList<board> boardsArray = new ArrayList<board>(); // current team is unknown. int team = -1; int opponent = -1; int game_status = -1; // update current team (can be "computer" or "human" player). if(sign==1) { team = renderer.TEAM_OPPONENT; opponent = renderer.TEAM_PLAYER; game_status = renderer.gOpponent.gGameStatus; } else { team = renderer.TEAM_PLAYER; opponent = renderer.TEAM_OPPONENT; game_status = renderer.gPlayer.gGameStatus; } // according to current player's (computer/human) game-status: switch(game_status) { .... .... case renderer.GAMESTATUS_PLAYNORMAL: // generate a move (a board) and save this new board to boardsArray. // if no moves left, return all boards so far! for(short i=0;i<24;i++) { // go thru all tokens in this board. if(currentBoard.gNode[i].gOccupiedByTeam==team) { // check if any empty neighbours for this token for(short n=0;n<4;n++) { // get neighborur id int id = currentBoard.gNode[i].gNeighbourId[n]; // check if neighbour is empty spot. if(id!=-1 && currentBoard.gNode[id].gOccupiedByTeam==renderer.TEAM_NOTEAM) { // make move for this token to the empty neighbour found above. currentBoard.makeMoveToken( i , id ); boardsArray.add(new board(currentBoard)); // undo previous move currentBoard.undoMoveToken( id , i ); } } } } break; // end PLAYNORMAL. .... } // end function generateNextPossibleBoards() [/code] I have done [i][b][u]a picture[/u][/b][/i] for you to see what happens when [b][i]depth>1[/i][/b] and [b][i]why[/i][/b] the chosenBoard is [u][b]not [/b][/u]correctly chosen. [url="http://imageshack.us/photo/my-images/600/mistaker.jpg/"]http://imageshack.us...0/mistaker.jpg/[/url] step1) As you can see, token from node=3 (depth=3) generates a new "move" to node=4 (depth=2). step2) After that negaMax() recurses itself again and the token from node=4 generates again a new move to node=7(depth=1). step3) Similar, from node=7 a token is generated again and set to node=8 (when negaMax() recurses again). Now token from node=8 is selected as the "[b]chosen[/b]" best move --> and return it to main function, right ? (because we have Win or good score) But...when moving from starting node=3 to node=8 there's a problem (because node=8 token is "far" away from token=3) [u][b]This is what i must solve, how do i return best move when depth > 1 ?[/b][/u] Im sorry for the long post. I hope you accept my appologies ! LE: @alvaro : OK, ill try that and get back to you. THANKS!
  8. [quote name='alvaro' timestamp='1349732686' post='4988137'] Wow, I just noticed something crazy in your code. What are you calling showBoard in the middle of the search? EDIT: If you expect that code to only be executed at the root, but it turns out it's getting executed in internal nodes as well, the output will be very confusing. Perhaps that's what you are experiencing... I recommend separating the search of the root of the tree into its own function. There is a little bit of code duplication, but there are enough differences to justify it (returning a move, reporting progress, iterative deepening, time control, looking up the opening book, clearing the hash tables or at least making them obsolete...). [/quote] showBoard() function only displays the current board to the debug window, it's just a debbugging function - i dont care about performance now . I was trying to see what happens when getBestMove() calls itself recursively - so i've made this function (wich doesn't modify the content of the board) I will keep this in mind - separating the search of the root (level 0) into its own function. But also must say that i'm thinking using negamax algorithm if i will not figure where i go wrong.... [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img]
  9. [quote name='Druzil' timestamp='1349732608' post='4988136'] I think I see the problem in the code. The chosenBoard looks like a global variable, and it will be overwritten at a lower level from a future cutoff from the current 'best board'. Avoid global variables in recursive code, rather return the best board and let the parent decide what to do with it. [/quote] That is correct mr Druzil, and i think you are right ! I must return chosenBoard recursively (as a reference parameter) to the previously function call and decide what to do with it. So far the chosenBoard is overwritten and the last value is always the value of "last best board" found at lower levels.
  10. [quote name='alvaro' timestamp='1349727261' post='4988097'] I don't really know Java, but I don't see any obvious bugs in the code you posted. It's easier to get things right by adopting the negamax convention (in every node positive score means good for the player to move, so you flip the sign of the result of the recursive call and treat every node as a max node). [/quote] Thank you for replying mr. alvaro. The algorithm should be the same, and it looks ok to me so far also ... but i still dont get it [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img] Why it returns some invalid moves when [b]depth [/b]is greater or equal than 3 (i.e depth >= 3) ?? With depth>2 the algorithm should "see" ahead further moves and return them. I only get moves from "player"'s team (not the "computer" team as it should). But with [b]depth = 1 or 2[/b] all is just [b]Fine[/b] ! (it returns best board/move from all of possible boards'/moves) But this has a disadvantage: it cannot anticipate further moves of the "player" . Only the "power" of the evaluateBoard() function is used then (a local board evaluation).
  11. Hello, Im new to this so please escuse my mistakes. I'm trying to implement a 9Men's Morris game and i'm using minimax with alpha-beta pruning finding BestMove for "computer". The problem is that if depth >= 3 then getBestMove() returns invalid move (board) , meaning that it's returning a move (board) from other team sometimes - and I don't know where i go wrong. Is my algorithm implementation done right ?! What i'm missing ? Please Help !! Here is my Java code , and getBestMove() function : [code] private int getBestMove(board board, int depth, int alpha, int beta, boolean bIsMax) { // is depth reached ? or do we have a winner ? (checkWinner() returns 0 if nobody is winning so far!) if (depth == 0 || board.checkWinner()!=0) { // if depth reached, or we DO have a winner. return board.evaluateBoard(); } // is "computer" turn if (bIsMax) { // generate all possible boards for "computer" (MAX). ArrayList<board> boardsArray = board.generateNextPossibleBoards(bIsMax); // loop thru all possible previously generated boards for(board nextBoard: boardsArray) { // recurse int score = Math.max(alpha, getBestMove(nextBoard, depth - 1, alpha, beta, !bIsMax)); nextBoard.showBoard("next-max[" + boardsArray.size() + "]"); // display to user current board.(debbuging purpose) // found a better board ? if ( score > alpha ) { alpha = score; chosenBoard = nextBoard; // save best board so far to "chosenBoard" } if(beta<=score) break; // prune } // clear boards array when done. boardsArray.clear(); // return alpha. return alpha; } else { // generate all possible boards for "player" (MIN). ArrayList<board> boardsArray = board.generateNextPossibleBoards(bIsMax); // loop thru all these possible boards. for(board nextBoard: boardsArray) { // recurse beta = Math.min(beta, getBestMove(nextBoard, depth - 1, alpha, beta, !bIsMax)); nextBoard.showBoard("next-min[" + boardsArray.size() + "]"); if(beta <= alpha) break; // prune. } // clear boards array when done. boardsArray.clear(); // return beta. return beta; } } [/code] and the calling of this method is: [code] short depth = 2; // get best move for "computer" on this phase getBestMove(simulationBoard, depth , Integer.MIN_VALUE+1, Integer.MAX_VALUE-1, true); [/code] and this is the evaluation function : [code] // evaluate current board. public int evaluateBoard() { int score = 0; score = score + (checkWinner()); // checkWinner() returns -1000000 if player wins, +1000000 if computer wins. score = score + (checkMills()*1000); // checkMills() returns -10000*mills_count if player has some mills formed, or +10000*mills_count otherwise. score = score + (checkBlockers()*500); // checkBlockers() returns -1000*block_count if player has bloked some tokens, or +1000*block_count otherwise score = score + (checkFormers()*50); // etc. score = score + (checkTokenDifference()*10); return score; } [/code] and the generateNextPossibleBoards() function wich chooses "default" switch case here : [code] public ArrayList<board> generateNextPossibleBoards(boolean bIsMax) { // copy current board board currentBoard = new board(this); // instantiate a empty array. ArrayList<board> boardsArray = new ArrayList<board>(); // current team is unknown. short team = -1; short game_status = -1; // update current team (can be "computer" or "human" player). if(bIsMax) { team = renderer.TEAM_OPPONENT; game_status = (short) renderer.gOpponent.gGameStatus; } else { team = renderer.TEAM_PLAYER; game_status = (short) renderer.gPlayer.gGameStatus; } // according to current player's (computer/human) game-status: switch(game_status) { ... default: // generate a move (a board) and save this new board to boardsArray. // if no moves left, return all boards so far! for(short i=0;i<24;i++) { // go thru all tokens in this board. if(currentBoard.gNode[i].gOccupiedByTeam==team) { // check if any empty neighbours for this token for(short n=0;n<4;n++) { // get neighborur node id short id = currentBoard.gNode[i].gNeighbourId[n]; // check if neighbour is empty spot (empty node) if(id!=-1 && currentBoard.gNode[id].gOccupiedByTeam==renderer.TEAM_NOTEAM) { // make move for this token to the empty neighbour found above. currentBoard.makeMoveToken( i , id ); boardsArray.add(new board(currentBoard)); // undo previous move currentBoard.undoMoveToken( id , i ); } } } } break; }//end switch. // return all possible boards so far. return boardsArray; } [/code] thak you. P.S: sorry for the bad view of some of the code. just could not succeded making it "java" (using [source lang="java"]) because it was "eating" my code and the functions were displayed partially .
  12. @[url="../../user/92781-dpadam450/"]dpadam450[/url] : thank you very much for your reply. i will think about what you said and ill try to implement it . thank you again.
  13. Hello, I'm having some trouble , and no ideeas yet, on how to link different triangle NavMeshes ([i]or make connections between them[/i]) . Here is a screnshot with 3 triangle Navmeshes - first in wireframe view : [url="http://imageshack.us/photo/my-images/10/wireframepic.jpg/"]http://imageshack.us...reframepic.jpg/[/url] ... and here is the same scene from almost same point of view, ths time textured and lit : [url="http://imageshack.us/photo/my-images/88/texturedlitpic.jpg/"]http://imageshack.us...uredlitpic.jpg/[/url] ...and 2 more screnshots again , wireframe view , with [b]neighbour connections[/b] drawn between triangles, please take a good look and you can notice that between [b]red , brown and gray[/b] [b]Navmeshes[/b] - there are NO CONNECTIONS : [url="http://imageshack.us/photo/my-images/810/unledpov1.jpg/"]http://imageshack.us.../unledpov1.jpg/[/url] and [url="http://imageshack.us/photo/my-images/72/unledpov2.jpg/"]http://imageshack.us.../unledpov2.jpg/[/url] [color="#8b0000"]OK,now go back please, and look at the very first picture . [/color] My problem is that : [i]I dont have no ideea on [u][b]how to[/b][/u] [b][u]connect[/u][/b] [b][u]these three NavMeshes[/u][/b] between them ?! [/i] I know that i have to somehow connect those two "[b]last stair[/b]" triangles with --> some triangle (or both triangles) wich belong to the GrayNavMesh . Same thing , dont know how to connect those two triangles wich belong to the RedNavmesh with "[b]first stair[/b]" 2 triangles ? Thank you. PS: still continuing my hobby on this, [url="http://www.gamedev.net/topic/560218-funnel-algorithm/"]http://www.gamedev.net/topic/560218-funnel-algorithm/[/url] , but lost my pass and had trouble with my email .. anyways, thank you.
  14. EDIT: i'm sorry - didnt' seen [url="http://www.gamedev.net/user/89015-buffaloj/"]BuffaloJ[/url] [url="http://www.gamedev.net/user/89015-buffaloj/page__f__9"][img]http://public.gamedev.net/public/style_images/master/user_popup.png[/img][/url] replyed already, my appologies. Hello, Hou can use Octree partitioning and organise your triangles . After that, you can search your Start and End point within the Octree and find the leaf in wich one of these 2 points lies in . When found the leaf the Start point is , loop thru all triangles in this leaf and draw rays heading down ! Every ray starts from that Start Point and it is oriented downwards ! - and check wich triangle is hit by this ray . Hope it gives you a ideea . At least this is what i've used . (escuse me, my english is not so good)