I'm trying to figure out how to use mouse movement and 3d rendering to create a world in which the user can use the mouse to look around as you would in any 1st person game. Eventually I want to get the keyboard working on moving you around too, but I want to get this part right first. So I've set up a class that defines where you, the person, exists in the world. You have x,y,z (cartesian) coordinates that define where in the world you are. You also have two angles that define which way you are looking (azimuth/horizontal and elevation/incline/vertical). I'm definitely a bit rusty on my spherical coordinates, but I've got my program at least kind of working. On each frame I record the distance of the mouse from the center of the screen and then reset the mouse position to the center using the java Robot class. I then use these distances to change the azimuth and elevation angles. So this works, but the mouse movement is not very smooth. Sometimes it seems smooth but then it *randomly* gets very choppy. Help very much appreciated
I tried using the G4P gui library to create a couple text boxes for my sketch. Because I didn't want the textboxes to always show, I disabled the autodraw and used the draw function when needed. This worked great locally on my computer if I run from the IDE or even from the generated index.html. But when I embedded an applet online, everything BUT the textboxes worked. What happened?
I could really use some help getting a high score system online. I've been working on a pacman game and I've just about got the actual game completed. You can check out its current state
here. I plan on embedding the applet on my site. If a player gets the highscore, then I want them to be able to submit their name and a comment along with their score to a database to be displayed on a high score list. I was thinking that it would be nice if the applet could open a little form in a new window to do this, but is it even possible to open a form like this triggered from an applet? Would I have to implement text boxes inside the applet itself? I think I can send data to a PHP page via the loadStrings() function.
Help very much appreciated because I'd like to get this hosted before my girlfriend's birthday!