Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK R.U.B.E Editor Exporter and Loader (Physics Editor Exporter)

Author
Message
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 26th Jan 2014 01:26 Edited at: 28th Jan 2014 17:28
** Update 28/01/2014 Added C++ Loader.

** Update 26/01/2014 Added support for Motor speed, Motor torque and joint collide connected. Chris over at iforce2d kindly added these today to the script so that I could export them for AGK. Now requires version 1.5.4 of the Rube Editor.

** Update 26/01/2014 Fixed image depth sorting (Order reversed in rube).

** Update 26/01/2014 added support for group, collide bits and category bits.

Hi,
Just finished the first version of a script exporter for the rube editor and a loader for AppGameKit T1 (currently works in v1 and v2 alpha).

https://www.iforce2d.net/rube/

For anyone who does not know the rube editor it’s a box2d editor which allows the layout of physics worlds and testing via it’s built in simulation. The editor also allows the placement and manipulation of physics attached and static images.
The source for AppGameKit and the script for the rube editor can be found here:
https://github.com/trezsoft/AGK-Rube-Loader

Because the editor is using the latest version of box2d it will allow you to perform operations that are not legal inside AppGameKit I have added some warnings to the script output to help.

I have not implemented the custom properties as yet but if people are interested and start using it I can add these to the exporter. In theory all the sprites in an AppGameKit game could be placed with the editor with or without physics and exported form the editor into AGK.

Supported features

Image sprites
Translation
Scale
Rotation
Colour Tint
Flipping

Physics Sprites
Dynamic, static and kinematic types
Bullet
Fixed rotation
Linear damping
Angular damping
Mass
Centre of Mass
Position
Angle
Linear and Angular velocity
Friction (Average of all fixtures (shapes)
Restitution (Average of all fixtures (shapes)
Sensor
Dummy Sprites (Physics sprites without images)
Single image per sprite only
Shapes ( Box, Circle, Polygon, Line)
Multiple fixtures (Shapes) per body
Translation
Scale
Rotation
Colour Tint
Flipping
Sprite collision groups and bits will be finished off in the next few days. They will only take into account the settings from the first fixture (shape) attached to the physics body.

Joints
All joints use Anchor point A only.
Revolute (Motor and Limits)
Prismatic (Motor and limits)
Distance
Wheel ( Line and distance combined )
Rope (Distance joint)
Weld
Friction and Motor joints are not currently supported.
Gear and pulley joints are not currently supported in the rube editor
Joint collide ( Currently waiting for this to be implemented in the script inside rube )
Motor torque and speed ( Currently waiting for this to be implemented in the script inside rube )

Feedback welcomed from anyone who gets around to using it.

Stuart
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Jan 2014 10:35
Fantastic!, I'll give this a go as soon as I can. This will make creating physics based machines much easier!

oct(31) = dec(25)
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 26th Jan 2014 12:34
Thanks baxslash let me know how you get on when you have chance to try it out.

Just updated the exporter and importer now adds support for:

CategoryGroup
CollideBits
CategoryBits

* Note it takes these values from the first fixture (shape) attached to the body in the rube editor as AppGameKit only allows these to be set against the main body (sprite).
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 26th Jan 2014 16:51
Final update for now.

Now requires version 1.5.4 of the rube editor (iforce2d kindly added support in the script language for the missing bits I needed for AGK).

Image depth sorting is now working correctly.
Motor Speed, Motor Torque and Joint Connect Collide are now exported and imported.

Ill try and get a demo app later today.
TrezSoft
AGK Tool Maker
12
Years of Service
User Offline
Joined: 8th Nov 2012
Location: UK
Posted: 28th Jan 2014 17:27
Update:

Rube Script Exporter now attempts to detect and wind polygons (Shapes in the correct direction for AGK). The Exporter also attempts to check for complex polygons and displays a warning message during the export.

https://github.com/trezsoft/AGK-Rube-Loader

AGK C++ Loader added to the repository. (I don’t pretend to be a C++ expert and this is my first Attempt at C++ with AppGameKit so let me know if I need to change anything. I know some things could be improved but I have tried to keep the Basic and C++ versions as much alike as possible for maintenance.)

Some Minor changes to the BASIC version to keep it aligned with the C++ version.
DennisW
16
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 29th Jan 2014 16:14
Looking Good
Looking forward to the demo app.

Ham and Eggs Breakfast
The Chicken was involved the Pig was Committed
AGK Community Tester

Login to post a reply

Server time is: 2024-11-25 02:39:12
Your offset time is: 2024-11-25 02:39:12