R0J0hound's Forum Posts

  • C2's render is quad only so the vertex shader would have only 4 vertices to manipulate, so there wouldn't be much variety in shaders. Also there is the overhead of changing the shader and sending the parameters to the gpu. My argument is it would probably be slower with such a low vertex count.

    Vertex shaders could be useful if a plugin was made that had a high polygon mesh, but you'd be doing custom webgl to render that anyway so that would be the place to do it.

    I'm impressed with the one year time frame you give yourself. I wish I had that kind of patience for a project.

    Choosing to do it in Construct is probably not the fastest method, but it makes for a challenge.

    I know you already plan on supporting a subset of the plugins but I'd recommend only implementing only a subset of the engine's features, at least initially. The idea is to get something working early on so you can get motivation and/or a better picture of the work involved early on. This will lead to needing to refactor your code later as you add stuff, but you'll be doing that anyway if you tried to implement everything at once.

    You may find it interesting that events aren't converted to javascript. They are run by the event engine which in turn runs the javascript in plugins and the engine, while it also updates the picked object lists.

    Anyways I'm sure it will be very good coding practice no matter the result.

  • Cherico

    You need to built the text with the & operator. For example: "rgb(" & variable1 & "," & variable2 & "," & variable3 & ")"

    andykenobi

    I haven't worked on this in a bit. I think I fixed the sampling in the paster plugin but I'm avoiding working on plugins.

    You can paste a sprite with the "destination-out" blend to erase. I'm probably not adding anything more to this plugin.

  • All the effects are just pixel shaders. Vertex shaders applied to quads aren't too interesting so I can see why they wouldn't be included.

    Now if you were to learn how to use webgl you conviably could write a plugin that uses a custom vertex shader.

  • The effect parameters could possibly be tweaked to do that but idk. It would probably be done by figuring out the perspective transform of it, then picking apart the math in the effect to see if they can be matched somehow.

    In the end I don't think this effect is actually useful for something like in that video or fzero/Mario cart type stuff. It's just too tedious to use.

  • Waltuo

    The only limits are how much video ram you have available and the maximum texture size supported by your device.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pick the object you want to copy, store Sprite.asJSON into a variable, create a new object, and use the "load from json" action to load the value you saved to a variable.

  • You can't use an expression like that when setting the text property in the editor. For that it's easier to do use some placeholder text and then replace it later with events.

    something like this:

    Hi $hero, do you like jalapeños?

    Then in events set text to replace(self.text, "$hero", heroNameGlobal)

  • It's not too hard. The idea is you can request the header instead of the file and get the file size with that. It uses the "head" http request, which isn't implimented in the Ajax plugin (only "get" and post are implimented).

    Whatever works though.

  • BereLaDD33

    First set gravity to zero. Then you can google two formulas.

    The first is "universal gravitation". It's a formula for calculating the force between two objects. Basically every tick you'd apply the force calculated by that equation toward another object.

    The "G" value you'd tweak to be more of the scale that fits onscreen. You may also tweak the object masses.

    The second formula is "orbit velocity". Basically take the angle from the moon to the earth, add or subtract 90, and set the velocity of the moon in that direction with the result of the formula.

  • What the ajax plugin can do is all listed. You could google how it would be done via JavaScript. "Ajax file size" yielded an answer in the first three results. Next you could see if that can be duplicated with what the plugin provides or use the browser object to run that js directly. Since it's an asycronous thing you could make a C2 function be the callback when it finishes.

  • While the Ajax plugin doesn't provide the size it does give the progress of the download in percent. Shouldn't that be enough feedback for the user? You could figure out the rate of the progress and give the user an eta as well.

  • There may be a way to do it with regex.

    Another way would be to use the find() expression to find the first occurrence. Then use the mid() expression to get the text after that occurrence. Next use find() on that again to get the location of the second. Then you could rebuild the text around it.

    Basically this. It's untested so there may be a few off by one issues.

    Var text="Hi, Bill. My name is Bill."

    Var temp=""

    Var index=0

    Index=find(text, "Bill")

    Temp=mid(text, index+len("Bill"), len(text)-index-len("Bill"))

    Index=find(temp, "Bill")+index+len("Bill")

    Text= left(text, index) & "bob" & mid(text, index+len("Bill"), len(text)-index-len("Bill"))

  • The only solution I can think of would be to not use pin and implement something like pin with just events. But that can be tricky as well.

  • Pin locks the position, so you'll probably need to unpin it first, then re-pin after repositioning.