Colludium's Recent Forum Activity

  • Thanks radbrothers!

    Update to the WIP plugin and the demo: Now added raycast. Left click/drag to draw a raycast line.

  • Box2d+

    This is an ongoing project to port the emscripten/asm.js version of Box2d v2.3.0 to Construct 2. The performance is amazing - more stable than Chipmunk and much more stable than the standard asm.js physics. Plus there are some useful game-dev friendly features. It is easy for a beginner to use but powerful enough to keep the more experienced happy. At least, that's the plan. Of note, it doesn't play nicely with the standard physics plugin and will cause your browser to vanish into a singularity if both are used in the same project (the emscripten libraries interfere at runtime).

    There main demo has 4 parts:

    1. The start screen gives you an idea of performance and demonstrates one-event conveyor belts with kinematic bodies. Collision points and polygons can be selected to be drawn and objects can be thrown around.

    2. Bitmap / scan image. This is a demo with 2 objects - one fixed and one that will be re-spawned; when running, both types can be dragged. You can use the default images or upload your own into the demo. When you press Start the engine will scan the images and assign collision polygons from the image alpha.

    3. Stress test. A comparison with Chipmunk (which, from my previous testing, is the best non-emscripten physics library in JavaScript) and the standard asm.js physics behavior. The test creates a pyramid of boxes that you can interact with or just watch collapse....

    4. Draw objects. Draw some physics shapes, convex or concave, and watch them fall down. The shape vertices are stored in a c2 array which is loaded into the Box2D+ plugin to form the collision polygon.

    Here's the demo (v1.0.1.8): link

    Summary of features:

    Plugin features already completed:

    Scan image to create polygon from its alpha (uses adjusted versions of hull.js and simplify.js)

    Circle, polygon and box shapes

    Speed clamp

    Rotational speed clamp

    Collision point

    Dynamic, Static and Kinematic bodies

    Collision filtering (category and mask bits)

    Object gravity scale

    World x and y gravity values

    Load collision hull from c2 json array

    Get collision hull as c2 json array (create polygons outside your game and upload from string)

    Raycast world queries

    Assimilate Joint - demo: link

    All joints are demo'd here: link

    AABB world queries (find objects in a defined box area)

    Gravity attractor

    Polygon editor capx (demo: link)

    Platformer behavior capx. Demo (with one-way doors/floors and wall-climb): link

    Instructions!

    More joint helper expressions added

    Obtain collision impulse and collision impulse angle*

    Obtain pre-collision and post-collision velocity (x and y values)*

    Collision Pre-Solve trigger and an action to disable the collision.*

    Features to do:

    A platform behavior helper plugin, so you won't need to mess with complicated events to control the movement and doors etc.

    The test is just about finished....!

    Ideas and suggestions are welcome.

    Not included / what's been excluded:

    Mouse joint (no need, better done using events and hidden object).

    Friction joint.

    Rope joint. The box2d rope joint stretches and breaks far too easily to be useful. Work-around: use revolute joints.

    *latest changes

  • I am making a behavior plugin. All works well when the export is un-minified. If I minify the export then I receive the following error:

    TypeError: q is not a constructor[/code:37gsw7j8]
    
    The "q" corresponds to "behavior_ctor" in the c2runtime.js when un-minified:
    
    [code:37gsw7j8]Line 4420ish
    if (!behavior_plugin)
    				{ 
    					behavior_plugin = new behavior_ctor(this);
    					behavior_plugin.my_types = [];						// types using this behavior
    					behavior_plugin.my_instances = new cr.ObjectSet(); 	// instances of this behavior
    					if (behavior_plugin.onCreate)
    						behavior_plugin.onCreate();
    etc[/code:37gsw7j8]
    
    I hope that this is enough info.  If anyone has any idea where I should focus my efforts then that would be very much appreciated.  I imagine that I am missing something obvious here...  I am about to embark on a long process of rebuilding my plugin from scratch to see what causes the export to break.  But I need to sleep!   
    
    Edit:
    
    Solved.  Apparently you cannot preserve the name of your plugin like this: ["myplugin"].
  • C3 is reliant on Chrome, isn't it? Chromium is open source, but Chrome is not - just ask Mr Google. C3 is reliant on the product of another business, so the precedent has already been set by design...

  • Ashley

    I haven't set up performance benchmarks before. If you could link me to a good benchmark capx, I'd be happy to try and recreate those conditions in GMS to see how they compare.

    I think these were the performance tests discussed in this thread. I remember that Godot was roughly equivalent to slightly worse than the c2 exports and that Unity was a clear performance winner in every respect.

    I would be very interested if you could put together a GMS/C2 bunnymark comparison!

  • Shameless *bump* for great justice.

    Any more news on the latest status?

    ~Sol

    This is one thing that's keeping me tinkering with c2. The Kestrel Moon dev has updated the plugin, see here, and it looks to include all of the features you'd hope it would (animation blending, skin swapping....). I gotta say thanks to R0J0hound for his work on the first plugin that made this possible.

  • Nope. I've spent the last 5 months learning to code in Godot Engine and then in Unity. It was challenging at first, but now I've seen the flexibility in the alternatives I'm unlikely to return...

    For me, the simplicity and appeal of not having to code in c2/c3 is offset by their lack of an animation editor (one that's like having Spine built in) -and- not ever being able to use prefabs. Those are powerful tools that c2/3 architecture won't ever support (at least in the next couple of years). Then there's lighting effects and export options that don't jank with just 5 sprites on screen. I almost forgot the forthcoming runtime rewrite...

    If you've ever considered making a plugin then I suggest you could do the same work in c# and you'll never look back.

  • and this:

    http://www.goodboydigital.com/pixijs/bunnymark/

    gives me 60fps up to 20,000. I guess js isn't actually that slow?

    Amazing! I get 40000 bunnies before a slowdown in Chrome...!!

  • Jayjay - awesome results! Fascinating that your Godot tests ran better than NWjs - the opposite of mine - were you using the latest version of NWjs v22? I found that v20/21 performed far worse on my lowly machine.

    My Unity WebGL results:

    render: 3500

    no render: 9500

    PS - how did you render html5 using dropbox?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • , TheRealDannyyy, happy to help. I did have the old apks on my phone (all but Godot's).

    30fps no render

    Godot: 1200

    C2: 1800

    Unity: 5500

    30fps with render:

    C2: 1600

    Unity: 2000

    The Unity version was smoothest because of the framerate lock.

  • Sure TheRealDannyyy - I'll take a look at Unity webgl as well. It'll be some time in the next couple of days, though. Work is hectic... I also wondered about why Chrome beat NWjs - I put it down to the NWjs engine dev being in lag behind Chrome.

    I think 30 fps stress testing won't give any good info - most players will have gone home by then, and it might just test aspects of the engines that are irrelevant for normal gaming.

  • Ashley - Godot compiles c++ from the user's GDscript (python) at export. It is run in a wrapper that's the same .exe as the editor runs from in windows (not sure about android export). It does show html5 can perform ok, but I think Unity is the only native engine in this group - which is why it's so much faster.

    Havok - Unity's graceful degradation from 60 to 30 fps was a clincher. No jank....

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies