R0J0hound's Forum Posts

  • Fun list. I haven't spent a whole lot of time with C3 yet, but I like your ideas to push the limits. I especially like the conditionals idea, it makes me wonder how deluxe a game could be made with one event. Anyways in the spirit of the topic here are a few more ideas:

    8. Utilize behavior's as much as possible instead of events. A behavior won't always fit with what you want to do but it sure is nice when it does or even is just close enough.

    9. Make a simple scripting language to control your game. Admittedly it may be pretty tricky to cram that in 25 or 40 events but if successful you'd be able to have a lot more logic. Being able to type multi line text for text properties in c3 is useful for this.

    I'm drawing a blank for any other general ideas, no doubt there others.

  • One way to find it is to was console.log(this); somewhere in your plugin. Then you can open up the developer console and you should be able to click the arrow by "this" and browse the object tree.

    But off the top of my head since I was messing with this recently:

    this.inst.type.plugin.prototype.acts.zmovetoobject.call(this.inst, ...)

    Sorry I neglected the capitalzation, I'm on my phone.

  • You can have the javascript code call a C2 function.

    See javascript intergration section.

    https://www.scirra.com/manual/149/function

  • Custom Draw Plugin

    Download:

    https://www.dropbox.com/s/lm5b6l4mhr3vy ... 0.zip?dl=1

    Features:

    * This plugin allows you to use any sprite's texture to draw quads or points.

    * They can be transformed with translation, rotation, scale and shear.

    * It has a transformation stack to do nested transformations.

    * There's an expression to transform any x,y value with the current transformation.

    * The uv's of the texture can be specified. Some actions are included to make selecting a sub-texture easier.

    Use notes:

    * This is a webgl only plugin. A canvas fallback hasn't been implemented at this time.

    * The drawing is relative to the object's center and the object's size and angle aren't automatically used.

    * The drawing can be bigger than the object's bounding box, but the bounding box is used to determine if it should be drawn.

    * Stuff will be drawn only if this object is on screen. Typically this is solved by putting it on a non-scrolling layer.

    Example:

    https://www.dropbox.com/s/n78c9dywrulcz ... .capx?dl=1

    https://www.dropbox.com/s/0b08fcy5ienxb ... .capx?dl=1

    https://www.dropbox.com/s/w5hmjdohlyher ... .capx?dl=1

  • jogosgratispro

    Updated that chain of links.

  • This replicates the 8 direction behavior with events except solids won't affect it.

    https://www.dropbox.com/s/0jfbslxhy9ded ... .capx?dl=0

    The custom movement behavior would add little other than handling the actual motion and max speed clamping.

    Zebbi

    Pretty much constant 60fps vs about 45fps. I benchmarked my old system and new system with this:

    http://www.passmark.com/products/pt.htm

    and found that:

    95% of systems are faster than my old system and

    75% are faster than my new one.

    Jayjay

    Windows version is only relevant for the nwjs export since they're dropping support for xp and vista as I recall. Also I'm fairly certain only one core is utilized by Construct's runtime, with maybe the exception of webworkers used for pathfinding and perhaps some other things.

    Sorry I think I'm off topic from the rest of the topic.

    To be fair, since my post that jayjay quoted me with I have since got a replacement for my 10 year old computer so the graphics are no longer a bottleneck on my system. Also the few times I tried mobile export the performance was much better than my old system.

  • Here's something similar to ethan's idea. Doesn't use any behaviors.

    https://www.dropbox.com/s/a2cbp1qc04qd6 ... .capx?dl=0

    It will remove/skip waypoints if a closer wp is found.

  • the Mnk

    The paste action will draw the selected object onto the canvas wherever it overlaps the paster object.

    So just position the object any way you want before pasting it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No idea. Assuming the chipmunk behavior is the only behavior on the object then it should be fine. Chipmunk objects collisions depend on the collision group, shape, and layers. The sprite action to disable collisions does nothing for the behavior. If the objects are going relatively fast and the the objects are thin then they could pass through each other since the chipmunk physics library doesn't do continuous collision detection.

    Also if the collision polygon is concave then it gets split into multiple convex ones. Not sure if that would cause an issue. The collision response in the physics library is done by pushing convex polygons out of each other.

    Other than that the behavior just converts c2 positions to physics sim positions and back, and the physics library does the rest.

  • I don't think there is an abstracted render pipeline if I understand that right. C2's renderer mainly just deals with quads and sometimes points for particles. Most plugins then just use functions like setTexture and quad to draw stuff. If you look at the glwrap.js file in construct's install you can see all the rendering functions. It's not too deluxe but as it is to be friendly with c2's batching you'd be limited to just drawing with quads.

    The effects system c2 has is pretty much just useable from the editor. It doesn't look like it was designed to be manipulated from a plugin.

    It just seems more straightforward to end the batch, use any webgl you want, and be sure to restore the relevant states used by c2 back to what they were.

  • castor2d

    Here's the sdk documentation if you're curious to take a look:

    https://www.scirra.com/manual/15/sdk

    You can get the webgl context in the drawgl function of a plugin. C2's renderer assumes it's the only thing changing the state of the context so if a plugin changes something it should be changed back when it's done or it will break things. Also c2's renderer is batched so the current batch should be ended before drawing directly with webgl.

    Also, c2 uses an old version of gl-matrix which isn't compatible with the new one used by your library. I ended up renaming everything in the new version to avoid conflicts. I was unable to find a cleaner solution.

    As far as making a plugin the only types available are numbers, text and object types, which can make it tricky to access other kinds of types. I guess you could look in the plugin's section and look at the spine, spriter, and creature2d plugins to see how similar things were done. I think there was another plugin that I can't think of.

  • C3 has only been in public beta for a day. I'd expect them to iron out issues first before adding third party addons into the mix. Waiting longer to get the sdk is no big deal to me.

    I'm pretty sure they explain your other questions in the blog. As I recall, beta for a month, game jam last week and for sale after that.