Nepeo's Recent Forum Activity

  • The autocomplete data isn't in a format that other editors would understand. I don't expect many editors have a standard format anyway. If there was enough demand we could probably publish some TypeScript definitions, which should give you autocomplete for VS Code.

  • I was actually going to add optional diagonal movement but it highlighted some flaws in the existing logic which are hard to work around unfortunately. It's something I've been meaning to revisit.

  • There's a few questions about the exact results that the Tile Movement produces under edge cases. This being one of them. While I do consider it slightly odd it's also kind of correct. Also this would be considered a minor breaking change if we did modify it at this point.

  • The browser is currently restricted in it's ability to open external editors for files, although the experimental local folder projects might work around.

    I generally advise that you basically just have function calls in event sheet scripts, then have the actual functions in script files. Makes it easier to work with.

    The text editor we use does have an automatic indentation option, but it's currently turned off as it incorrectly indents curly braces if you follow the brace on newline style. We could make this configurable, but it would likely be off by default.

  • Timing wise calling a function is the same as say... a nested event block. So it should complete during the current tick. Provided you don't have something like "wait N seconds" or "wait for previous async actions" inside the function.

    Yeah it sounds like you could fix it by stashing the data into a variable, or some other data structure. I don't think I have the CSV plugin lying around to check, but you might be able to check my guess by looking at the debug values. If it has something like "current iterator value" you can step through the event block and see what it changes to.

  • I think Chrome leverages at least part of the system text renderer, as I suspect Firefox does. So it might be an edge case related to the macOS font system used in this specific context. I'm not super familiar with our text rendering system, but I expect it's treading the pass less travelled when it comes to text rendering in the browser.

    Managed to find this mention of the Chromium text rendering.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • While at the Schools and Academies show with Laura_D last week we talked a bit about mapping touch and gamepad controls to tile movement. I think she's planning to put some tutorials out about it, but I'll put the gist of the maths up here for you.

    This example is for a player that moves towards the touch location.

    	// 10 is rather arbitrary here, it needs adjusting based on your usage
    	DEAD_ZONE = 10
    
    	neutral_x = Player.x
    	neutral_y = Player.y
    	target_x = Touch.x
    	target_y = Touch.y
    
    	delta_x = target_x - neutral_x
    	delta_y = target_y - neutral_y
    	
    	magnitude = sqrt(delta_x * delta_x + delta_y * delta_y)
    	// add 180 to the angle, so that it's in the range 0..360
    	theta = angle(0, 0, delta_x, delta_y) + 180
    	
    	// checks to see if we have a sufficient offset from the neutral position
    	if (magnitude > DEAD_ZONE) {
    		// rotate the angle by 45 degrees ( range is now 45..405 )
    		theta = (theta + 45);
    		// divide by 90 to get a value from 0.5..4.5
    		// then round the value so that is is an whole number ( 1/2/3/4 )
    		// finally modulo the value by 4 so that it wraps around
    		// the range will now be 0..4
    		theta = round(theta / 90) % 4;
    		// theta is now 0 for west, 1 for north, 2 for east and 3 for south
    	}
    
    

    This should be relatively easy to map to a virtual analog stick, just use the center of the stick for the neutral position. You can ditch the math inside the if block if you just want the angle, it's just for mapping the angle to a 4 direction value. Also that math could be tweaked for 8 direction if wanted.

  • I'm going to hazard a guess that the plugin clears the current iterator value after it's finished a loop. Which is fine, except if you have a nested loop then the iterator value isn't usable after the inner loop has completed.

    loop {
    	// current iterator = outer
    	loop {
    		// current iterator = inner
    	}
    	// current iterator = null
    }
    

    The expected behaviour for using an expression at an invalid time it to emit some sort of null value ( empty string for string expressions, 0 for numerical ) so accessing iterator values when the plugin doesn't have an iterator would probably return zeroes.

    Typically a plugin can solve this by storing the current iterator before starting a loop then restoring it after the loop has completed.

  • The example you sent actually appears to render correctly for me, the emoji is in the Twemoji font and the text is mostly in the default font. The piece of text AFTER the emoji appears in a different font for some reason.

  • Might be that something in our BBCode parser doesn't like emoji, you got a minimal project I can take a peek at?

  • Are you using actual unicode emoji or something like emoji short codes like :smile:? It should be as simple as pasting the emoji into your text field, then setting the font.

  • fredriksthlm Yeah it is quite a confusing issue. In my mind you shouldn't need to set "child directed" as setting your content rating to "G" should imply that it's suitable for children.

    I expect the method to set content rating from the app is an additional method to allow more specific control ( per user as opposed to per app ).

Nepeo's avatar

Nepeo

Member since 8 Mar, 2016

Twitter
Nepeo has 583,792 followers

Trophy Case

  • 8-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies

Blogs