Java-Gaming.org Hi !
 Featured games (91) games approved by the League of Dukes Games in Showcase (757) Games in Android Showcase (229) games submitted by our members Games in WIP (843) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
 Show Posts Pages: [1]
 1 Game Development / Game Mechanics / Re: Collisions between Planets[solved] on: 2013-09-09 21:11:07 thanks this is what I needed. I was near doing this, but was confusing the area/ mass with the diameter.
 2 Game Development / Game Mechanics / Collisions between Planets[solved] on: 2013-09-09 20:46:48 For a 2d sprite simulation I have a grouping of different sized planets. Their size represents their mass. The each have a randomly generated color. When they collide I would like to mix the colors based on their mass, ie a small black + a big white should be slightly gray. How can I do this in a RGB system?
 3 Game Development / Game Mechanics / Re: Collision detection with trochoids on: 2013-01-24 14:52:39 It's more about the collision response, I did basically an OBB check with out realizing it
 4 Game Development / Game Mechanics / Collision detection with trochoids on: 2013-01-24 06:42:30 I'm trying to do some really slick collision detection with pictures. Please try to follow my logic, it's not that clear, sorry.  I want an image to bounce off the edge of the window, perfectly. Also, I want to understand how it does it, so I can later make 2 images interact.basically, i realized all pictures are rectangles, and all a rectangle is is 4 points(or 4 lines).If a rectangle is spinning, the corners move in a circle. If a spinning rectangle is also moving it forms a trochoid(http://en.wikipedia.org/wiki/Trochoid)I still need to figure out the equation for a trochoid moving in 2D, but once I do, collisions will be easy. just solve the equation for x or y, and set the other to a known value(example: if the x of a point is greater than the boundary, y = f(x) and x = the boundary)If anyone can point me in the right direction I would greatly appreciate it.
 5 Game Development / Newbie & Debugging Questions / Re: [SOLVED]can someone help me fix this? on: 2012-12-19 01:55:59 sorry everyone, but I ended up rewriting the code, and it just worked. No idea why or where the error came from, but it's gone now(hopefully )
 6 Game Development / Newbie & Debugging Questions / Re: can someone help me fix this? on: 2012-12-19 01:21:43 there is an error I can get rid of or explain. It would be cool if someone could like at it and possibly tell me if I did something wrong. (this was pretty much a last resort, I have no idea what could be causing my error)the problem is that occasionally words that use a certain letter and are valid will return false, but I can't find an pattern to it(if you know how to play boggle)like any word that uses the e in the upper right corner is returns falseps this was pretty much just a hail mary pass, I think something is wrong, but not with my code
7  Game Development / Newbie & Debugging Questions / [SOLVED]can someone help me fix this? on: 2012-12-18 22:24:40
I'm making the game boggle, and it works 95% of the time. but when it checks if a word is valid, occasionally it will 'forget' where one of the letters were. I can't figure out how or when it decides to mess up. could someone take a look at it?
 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137  138  139  140  141  142  143  144  145  146  147  148  149  150  151  152  153  154 `private boolean checkIfBuildable(String wordToCheck){      Point[] lettersUsed = new Point[wordToCheck.length()];      int letterToCheck = 0;            while(true){         boolean letterFound = false;                  if(letterToCheck == 0){                        //first letter, first time            if(lettersUsed[letterToCheck] == null){               for(int row = 0; row < letters.length; row++){                  for(int col = 0; col < letters[row].length; col++){                                          if(!letterFound){//we have to keep looking                        if(wordToCheck.charAt(letterToCheck) == letters[row][col]){                                                      //it's found                           lettersUsed[letterToCheck] = new Point(row, col);                           letterFound = true;                        }                     } else {                        break;//if letter is found, move to the next                     }                  }               }                           //first letter, any time            } else {               for(int row = (int)lettersUsed[letterToCheck].getX(); row < letters.length; row++){                  for(int col = (int)lettersUsed[letterToCheck].getY(); col < letters[row].length; col++){                     if(!letterFound){                        if(wordToCheck.charAt(letterToCheck) == letters[row][col]){                           if(row > lettersUsed[letterToCheck].getX() ||                                  (row == lettersUsed[letterToCheck].getX() && col > lettersUsed[letterToCheck].getY())){                                                            //it's found                              lettersUsed[letterToCheck] = new Point(row, col);                              letterFound = true;                           }                        }                     } else {                        break;//if letter is found, move to the next                     }                  }               }            }         } else {                        //any letter, first time            if (lettersUsed[letterToCheck] == null){               for(int row = 0; row < letters.length; row++){                  for(int col = 0; col < letters[row].length; col++){                     if(!letterFound){                        if(wordToCheck.charAt(letterToCheck) == letters[row][col]){                           if(row > lettersUsed[letterToCheck - 1].getX() - 2 && row < lettersUsed[letterToCheck - 1].getX() + 2                                 && col > lettersUsed[letterToCheck - 1].getY() - 2 && col < lettersUsed[letterToCheck - 1].getY() + 2){                                                            //check if repeated                              boolean isRepeated = false;                              for(int check = 0; check < letterToCheck; check++){                                 if(lettersUsed[check].equals(new Point(row, col))){                                    isRepeated = true;                                 }                              }                                                            if(!isRepeated){                                                                  //it's found                                 lettersUsed[letterToCheck] = new Point(row, col);                                 letterFound = true;                              }                           }                        }                     } else {                        break;//if letter is found, move to the next                     }                  }               }                           //any letter, any time            } else {               for(int row = (int)lettersUsed[letterToCheck].getX(); row < letters.length; row++){                  for(int col = (int)lettersUsed[letterToCheck].getY(); col < letters[row].length; col++){                                          if(!letterFound){                        if(wordToCheck.charAt(letterToCheck) == letters[row][col]){                           if(row > lettersUsed[letterToCheck - 1].getX() - 2 && row < lettersUsed[letterToCheck - 1].getX() + 2                                  && col > lettersUsed[letterToCheck - 1].getY() - 2 && col < lettersUsed[letterToCheck - 1].getY() + 2){                              if(row > lettersUsed[letterToCheck].getX() ||                                     (row == lettersUsed[letterToCheck].getX() && col > lettersUsed[letterToCheck].getY())){                                                                  //check if repeated                                 boolean isRepeated = false;                                 for(int check = 0; check < letterToCheck; check++){                                    if(lettersUsed[check].equals(new Point(row, col))){                                       isRepeated = true;                                    }                                 }                                 if(!isRepeated){                                                                        //it's found                                    lettersUsed[letterToCheck] = new Point(row, col);                                    letterFound = true;                                 }                              }                           }                        }                     } else {                        break;//if letter is found, move to the next                     }                  }               }            }         }                                    //if we found the letter, we move on to the next one         if(letterFound){            if(letterToCheck > 0  && wordToCheck.charAt(letterToCheck - 1) == 'Q'){//if it's q               lettersUsed[letterToCheck] = lettersUsed[letterToCheck - 1];//q and u have the same spot from qu               letterToCheck++;            }                        letterToCheck++;                              } else {//we need to look for a different spelling            lettersUsed[letterToCheck] = null;                        //if the letter is the u from qu, skip back to the q            if(letterToCheck > 0 && wordToCheck.charAt(letterToCheck - 1) == 'Q'){               letterToCheck--;            }            letterToCheck--;         }         //it's done         if(letterToCheck >= wordToCheck.length()){            return true;         }         //if we can't find the first letter, or can't find a valid combination         if(letterToCheck <= -1){            return false;         }      }   }`

ps. i hope this looks alright, i'm pretty new to this site
 8 Discussions / General Discussions / Re: Spell checker dictionary for a game on: 2012-12-12 06:26:44 i had the same problem for a while, it depends on what your using. notepad, word, other text editors should work fine. eclipse or anything that else won't be able to handle it. try dividing up the data also, like certain letters in one file.
 9 Discussions / Miscellaneous Topics / Re: Age is just a number.... on: 2012-12-12 04:51:04 I'm 18 and I loved java from the 1st "hello world"! also, why did this tread become about drugs and alcohol? not judging, just curious.
 10 Discussions / General Discussions / Re: Spell checker dictionary for a game on: 2012-12-12 03:56:35 ra4king thank you so much! this is perfect!
 11 Discussions / General Discussions / Re: Spell checker dictionary for a game on: 2012-12-12 03:19:27 thanks for the suggestions, but I was actually look for a text file of some such. I guess I should have been clearer. I just don't want to have to rewrite the entire English language.
 12 Discussions / General Discussions / Spell checker dictionary for a game on: 2012-12-12 02:42:12 I'm making the board game boggle, and have finished almost all the code portion. However, the one thing I am lacking is a a dictionary to see if a string is actually a word. Basically, i want to make a method that, given a string, will iterate through a text file and see if it is there. I have tried spell checkers like jazzy, and they are not what I want. If anyone would help me with this, that would be awesome.
 Pages: [1]
 EgonOlsen (37 views) 2018-06-10 19:43:48 EgonOlsen (20 views) 2018-06-10 19:43:44 EgonOlsen (39 views) 2018-06-10 19:43:20 DesertCoockie (186 views) 2018-05-13 18:23:11 nelsongames (122 views) 2018-04-24 18:15:36 nelsongames (121 views) 2018-04-24 18:14:32 ivj94 (861 views) 2018-03-24 14:47:39 ivj94 (122 views) 2018-03-24 14:46:31 ivj94 (758 views) 2018-03-24 14:43:53 Solater (139 views) 2018-03-17 05:04:08
 Java Gaming Resourcesby philfrei2017-12-05 19:38:37Java Gaming Resourcesby philfrei2017-12-05 19:37:39Java Gaming Resourcesby philfrei2017-12-05 19:36:10Java Gaming Resourcesby philfrei2017-12-05 19:33:10List of Learning Resourcesby elect2017-03-13 14:05:44List of Learning Resourcesby elect2017-03-13 14:04:45SF/X Librariesby philfrei2017-03-02 08:45:19SF/X Librariesby philfrei2017-03-02 08:44:05
 java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org