piranha305's Recent Forum Activity

  • Ashley will mesh distortion feature respect image points like it respects the collision polygons? the image points currently stay static when mesh is distorted

    Tagged:

  • I parse and stringfy data back and fourth between the event sheet and the JS scripts, I normally try and handle all the data manipulation in the scripting API and then have a wrapper functions that read or updates the JSON object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Especially when the auto complete is misleading because you have used the lower case variant of the string...

  • Agreed, but it should be documented as such..

  • doing something like this is also a bad idea unless you cache the value for recursive function (dynamic programming) this gets really expensive on the bigger the number, you can run out of stack memory very quick

  • here is a recursive Fibonacci example

  • just in case I created this bug ticket because it seems like its unintentional github.com/Scirra/Construct-3-bugs/issues/3858

    it's really not a big deal, just something that should be documented so noobs like me don't spend hours trying to figure out why my simple assignment statement is not getting the correct value.

  • So in construct defining instance variable is case insensitive

    so doing something like this fails because Damage & damage are the same considered the same thing

    when referencing these variables from scripts, they are case sensitive, thus considered 2 separate value. is this by design? or is this a bug?

  • agree with newt the performance benefit you get from scripting vs events is negligible, the real benefit from scripting comes from complex data structures imo. you have alot more freedom to freely manipulate data and store data. that said with that extra freedom you can fine tune some algorithms that you have on the event sheet and you might get a bit more performance. but it really depends on what you are doing, for general game play logic you wont see that big of a boost. just take a look at the ghost shooter example it implemented using full scripting and full events and the performance is very similar, mind you its a very simple implementation. one thing i noticed from comparing both scripting had a few frame drops to like 57 fps every once in a while and the event based one stay at a constant 60 fps. mind you i was just looking at the debugger and did not dig too deep into the metrics. you should explore it on your own for the use case of you game. i'd say the way to go is a mix, pure scripting does not seem like a full replacement for the evening system, they should be used in conjunction to get the most out of construct, but like i said just my opinion.

  • It's all good man, the more info the better.

  • construct arrays are actually 3 dimensional, so the array represented as json looks like this

    { "c2array": true, "size": [ 1, 1, 1 ], "data": [ [ [ "stuff" ] ] ] }

    you would need to do something like this

    + System: On start of layout

    -> Array: Set value at 0 to "{""enemies"":[2,2], ""position"":[1,2], ""wait"":[0,0]}"

    notice you have to escape the double quotes

  • the action that loads an array from json expects a very specific format. if you just wanted to store a json string in the array, you have to set one of the index of the array to json "string".

piranha305's avatar

piranha305

Early Adopter

Member since 26 Apr, 2016

Twitter
piranha305 has 34 followers

Connect with piranha305

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x5
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x3
    Lightning Draw First person to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies