Greetings ,
Update *
I decided to focus this project solely on JavaFX. I originally wanted to port this over to Android and html but I don't have the time. The framework is in place is you want to move it over to swing or Android. I also renamed the packages to match my website.
Dyn4games is a 2D game engine I made based on Dyn4j. The idea was to make an easy to use and understand 2D game engine for Java developers.
Download the complete kit and source from here.
http://www.angrycomputernerd.com/dyn4games.html
Here is a short video of the scene builder in action. The scene builder uses the core Dyn4games engine.
https://www.youtube.com/watch?v=_YUwQ-jpK0I
Dyn4games a video game engine based on dyn4j
Dyn4games a video game engine based on dyn4j
Last edited by sarama on Mon Jun 26, 2017 1:45 pm, edited 6 times in total.
Re: Dyn4games a video game engine based on dyn4j
I updated the package recently. It's still in a beta stage but everything is stable and ready for use. Anything from this point on will be bug fixes and added features. I'm also extending it out beyond JavaFX into web browser and mobile use.
Re: Dyn4games a video game engine based on dyn4j
Looks good. One comment though - it looks like you are using pixel values for the shape sizes and positioning, I suspect this is why the simulation looks like it's in slow motion.
dyn4j has a number of settings that define how it operates. These are defaulted with MKS (meters-kilograms-seconds) units - not pixel units. Typically, this is handled by using a meters to pixel conversion. For example:
Don't do:
Do:
To make things easier, you could setup some global methods to aid with the conversion back and forth.
William
dyn4j has a number of settings that define how it operates. These are defaulted with MKS (meters-kilograms-seconds) units - not pixel units. Typically, this is handled by using a meters to pixel conversion. For example:
Don't do:
- // dyn4j code
- int size = 300; // pixels
- Circle c = Geometry.createCircle(size);
- // Java FX code
- Circle circle = new Circle(0,0,size);
Do:
- // dyn4j code
- int size = 300; // pixels
- final double metersPerPixel = 1/100; // for example, 1 meter for every 100 pixels
- Circle c = Geometry.createCircle(size * metersPerPixel);
- // Java FX code
- Circle circle = new Circle(0,0,c.getRadius() / metersPerPixel);
To make things easier, you could setup some global methods to aid with the conversion back and forth.
William
Re: Dyn4games a video game engine based on dyn4j
Thanks for the tip. It's actually not that slow. I was updating the entire table each frame in the editor. Which was lagging the application hard. The tableview isn't cut out for 60 updates per second.
I am using pixels though as its easier for most graphics artist to understand. Next chance I get to work on it. I'll try out the conversion and see how well it works.
I am using pixels though as its easier for most graphics artist to understand. Next chance I get to work on it. I'll try out the conversion and see how well it works.
Re: Dyn4games a video game engine based on dyn4j
I updated this. Version 1.1 is now out and it's about how I originally imagined it. I also did a demo video this time with audio.
https://www.youtube.com/watch?v=_YUwQ-jpK0I
https://www.youtube.com/watch?v=_YUwQ-jpK0I
Re: Dyn4games a video game engine based on dyn4j
Just a little update I'm still working on this. I've added in some new features. If anyone is an environment design artist and wants to help me make a demo level let me know.
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 2 guests