Philip Vaughn

Greenhorn
+ Follow
since Jan 04, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philip Vaughn

I have another question about javafx actually. I need to be able to adjust the "z" values of nodes within a javafx pane. I know you can use a stackpane but stackpane does not work for me because I need absolute positioning of the nodes (ie the player walking around the map). So I've resorted to using just regular Pane but whenever I try to change the index of a node within the Pane it doesn't draw it above or behind another. I'm not sure why. I've went as far as clearing the node and adding all the children back in a certain order but the depth is never changed for some reason. Basically, my player that is walking around the screen needs to be on top of other characters if his "y" value is greater than theirs. If the player's "y" value is less than it needs to appear that he's behind the other characters. Any ideas?
10 years ago
Sorry for the double post but I wanted to let John Damien Smith know that the code you posted worked absolutely perfectly! Everything about it is streamline. There's no glitchiness (not a word, I know lol) in the movement and the running works just like it should. Thanks much!
10 years ago
Well being 1AM I'm not going to test this tonight but your code looks very good. I'll test it tomorrow and let you know. I'm still trying to get used to JavaFX with all the timers and and animation abilities.
10 years ago
Ok, I'm creating an RPG style game with FX and need help with key inputs. Basically whenever the user presses the arrow keys (down, left, right, up) the player character will move on the map. This all works well enough but I need to be able to have the player run. So I'm using the SHIFT key for running. The problem comes when I press the shift key. If I have one of the arrow keys pressed down when I press the shift key it cancels the current arrow key and I have to press it again to move. So basically if I press shift and then an arrow key it works fine but if I press the arrow key and then shift the player stops moving. The code for when I press the shift key simply increases a variable called "moveSpeed" by 1 ( it should do this without cancelling the keys I already have pressed) and when I release the shift key it decreases "moveSpeed" by 1. I've tried key combinations with arrow keys and "shift.down" and I've tried just single keycode.shift but it always stops the current key press. I have a <KeyEvent> that handles all of this together.

Can anyone give me a hand with this?
10 years ago
I basically only load one image every 10 frames but I actually figured it out. I was double looping my update on accident. I was calling that update from a global class (class made just for updates) and I also called an infinite cycle count in the update that was changing the image view so it was multi updating each time it ran. I've since fixed it though. It had me stumped for a while though. I'm going to stick around this site though and see what all I can do to help/learn.
10 years ago
Hi! My name is Phil and I'm new to these forums.

I have an issue that has been bugging me a couple of days. First, let me be clear about what I'm trying to do. I am building an RPG style game and have a map class that extends an FX Pane.

I am trying to have animated water. I have about 72 farely large png files created with Adobe After Effects that are the animated water image files. They are about 1200 x 1200 pixels. At first I just tried popping these in an ImageView by calling
myImageView.setImage(my water name); but the program freaks out and crashes. I'm guessing because the files are so large and I'm setting the image every 100 millis (10 frames a second basically). I need a better way to do this obviously.

Any suggestions? I'm not above using a different method (ie. not using ImageView) if necessary. I'm not a beginner programmer by any means so feel free to leave me code if you want. I'm more familiar with ruby though

Anyways thanks for any help.
10 years ago