Results 1 to 1 of 1
Thread: Simple Hit Test?
- 11-01-2010, 04:44 AM #1Member
- Join Date
- Jan 2010
- Rep Power
Simple Hit Test?
I'm trying to make a simple physics platformer. I know how it could be done but I don't know the best method. There is an obviously brutish way to create a platformer, and that's to check if the player is touching any and every platform, check what side, and determine which direction you cannot move. Like so-
But that seems primitive and a waste of processor time. It also would seem to bog the system down if you had many objects and many players to make a hittest. A good example of where I think this would fall flat on its face is the massive game minecraft or Oblivion.
(I'm estimating a possible 250 million blocks to calculate hittest for each person if it were full. Perhaps 30-50 million in this image; some y-depth not seen)
(Not as easy to visualize. But probably more complex then minecraft)
So these games obviously aren't using my method. Are they using a smarter version of my method? Like trimming the area down to around your person? In a tile system like minecraft it might be easy to pinpoint any tile are over pretty easily. But that doesn't apply to oblivion. Anyway, this is more of a general programming question.
- By AJArmstron@aol.com in forum New To JavaReplies: 7Last Post: 05-07-2010, 02:22 AM
- By webbusiness23 in forum New To JavaReplies: 9Last Post: 08-03-2009, 02:55 AM
- By Java Tip in forum java.awtReplies: 0Last Post: 06-23-2008, 11:16 PM
- By cakeman in forum New To JavaReplies: 2Last Post: 05-04-2008, 05:27 PM
- By michelle in forum Jobs OfferedReplies: 0Last Post: 04-05-2008, 12:38 AM