R0J0hound's Recent Forum Activity

  • It only accepts a paticular Json form for it to load.

    You can see the format by setting a text box to array.asJSON.

    If you need to read any json value the use one of the plugins made for json or use some js from the browser object

  • There have been a few before. I think they help automate create the ace’s.

    It’s not really useful though. It’s simple to add more of those. The bulk of a plugin is interacting with some JavaScript library or the guts of construct’s runtime.

    I haven’t touched the c3 plugin sdk though. I know that it’s a bit more repetitive, maybe a tool could be made to help with that.

    I wouldn’t use construct to make such a tool though.

  • how about use touch.x instead of touch.absoluteX. The later is typically not what you want to use. I've almost never wanted to use it.

  • Web browsers only see one mouse. That alone makes it not doable.

    On mobile there is no mice, but you can have multiple touch. It can’t tell one finger from another so typically you’d have one player on one half of the screen and the 2nd on the other.

    Outside of the browser there are ways to get each mouse input independently. Typically you’d hide the operating system cursor and draw your own.

    Apparently you can add more features to nwjs exports to make it possible for windows exports. But I think it would be more worthwhile and easier to just remake your game from scratch in something else.

    So shorter answer, not possible in html5/JavaScript and in turn not possible in construct.

  • Here's a capx:

    dropbox.com/s/8q7n27kfdc5n431/ball_3Dish.capx

    I did it slightly different than my description and I got carried away with some tangents, but it hopefully will give some ideas.

    Edit:

    What happened? I made a post, then posted again and it ate my previous post. This forum... oh well, it probably needs more bug testing.

    Anyways to answer your question sin and cos will work with any angle whatsoever.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    1. You can use any angle with sin and cos and it will work.

    2. You can make the ball slow by setting the vx and vy to self.vx*0.5 and self.vy*0.5 in the bounce event.

    I’ll post a capx shortly. Ended up eating dinner so that delayed me.

  • Two ideas come to mind.

    One is to think back to grade school and just use two numbers, the numerator and denominator, for each number. Then you’d never actually do a divide, just multiply the denominator.

    You’ll probably need to simplify the fractions, before displaying them. But algorithms for that are easily found. It’s GCD (greatest common denominator) as I recall.

    The other idea is to find an algorithm to find the closest matching fraction to a decimal number. I used one before.

    Google is your friend here. Both ideas would be the same in most programming languages.

  • You can covert an x, y to an index and back again. Since your goal seems to be sending only one number.

    Index = x + 10*y

    X = index%10

    Y = int(index/10)

    Where 10 is the number of horizontal tiles. Change as needed.

    You could also alternatively send multiple values in some text with commas in between, and use tokenat to separate them later.

  • Picking by instance variable is like a filter.

    It loops over all the picked instances to find matching to pick.

    It’s O(n) which means time it takes is proportionate to the number of instances

    Pick nth instance should be more or less instant. It’s just an array lookup.

    Pick by uid is like a dictionary lookup. Should also be basically instant. Js impliments dictionaries very efficiently.

    Both of those are O(1) which means they take the same amount of time regardless of the number of instances.

  • Releasing "early and often" is fine for things where you can continue using the old one if the new one gets broken. I'd probably change that policy for website stuff.

  • first do something like this for a timer that goes from 0 to 3 and stops.

    global number t=0

    every tick

    -- set t to min(t+dt, 3)

    then use

    lerp(1,3, t/3)

    lerp(0,5, t/3)

  • They updated the forum and the links were lost in the transition. They say they are working on fixing that, but it's been weeks.