Dyn4games a video game engine based on dyn4j

Posts that don't fit into other categories.
sarama
Posts: 5
Joined: Mon Apr 03, 2017 10:31 am

Dyn4games a video game engine based on dyn4j

Postby sarama » Mon Apr 03, 2017 10:48 am

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
Last edited by sarama on Mon Jun 26, 2017 1:45 pm, edited 6 times in total.

sarama
Posts: 5
Joined: Mon Apr 03, 2017 10:31 am

Re: Dyn4games a video game engine based on dyn4j

Postby sarama » Mon May 22, 2017 5:44 pm

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.

William
Site Admin
Posts: 345
Joined: Sat Feb 06, 2010 10:23 pm

Re: Dyn4games a video game engine based on dyn4j

Postby William » Mon May 22, 2017 6:40 pm

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:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.html)
  1. // dyn4j code
  2. int size = 300; // pixels
  3. Circle c = Geometry.createCircle(size);
  4.  
  5. // Java FX code
  6. Circle circle = new Circle(0,0,size);


Do:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.html)
  1. // dyn4j code
  2. int size = 300; // pixels
  3. final double metersPerPixel = 1/100; // for example, 1 meter for every 100 pixels
  4. Circle c = Geometry.createCircle(size * metersPerPixel);
  5.  
  6. // Java FX code
  7. 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

sarama
Posts: 5
Joined: Mon Apr 03, 2017 10:31 am

Re: Dyn4games a video game engine based on dyn4j

Postby sarama » Tue May 23, 2017 9:17 pm

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.

sarama
Posts: 5
Joined: Mon Apr 03, 2017 10:31 am

Re: Dyn4games a video game engine based on dyn4j

Postby sarama » Mon Jun 26, 2017 1:46 pm

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

sarama
Posts: 5
Joined: Mon Apr 03, 2017 10:31 am

Re: Dyn4games a video game engine based on dyn4j

Postby sarama » Wed Aug 09, 2017 10:00 am

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: Baidu [Spider] and 1 guest