Fengist's Forum Posts

  • Looking into this, looks like a possible Azure network problem. It seems to of resolved itself as of time of writing.

    raikoification what version are you using? The saves are not tied to our network at all as far as I am aware.

    It was strange. In the editor I could keep reloading and sometimes it gave me the right version, sometimes it logged me in and sometimes it didn't.

  • So I was goofing off with some solids and ran into a head scratcher. The more solids I added to the layout, the slower it became... by a lot. So, I created this little test project. Have a look and you'll see what I mean.

    twistedvoid.com/c3examples/collision1

    *Edit

    Here's a new version compiled in r161 after the patch for a comparison:

    twistedvoid.com/c3examples/collision2

    *end Edit

    There are 4 tests that are conducted and I recommend running them in Chrome. If you want to see how bad Edge is when running a Construct project, try these tests with it.

    Test 1: Creates 3000 ants on the layout. This is the control. Each ant has a 4 frame animation. It has 3 behaviors: Bullet, pathfinding and bound to layout. In particular pay attention to the time at the top. This is the time in ms it takes to perform a tick. Depending on your machine, you shouldn't see it change a lot even when it gets close to 3000 ants on the screen.

    Test 2: Same conditions as above with this following exception: 20 square sprites with the 'solid' behavior have been added. Again, watch the timer as it gets closer to 3000 ants.

    Test 3: This is the serious wtf. Same ant parameters as the control except that the 'solid' behavior has been added to the ants however, it's disabled. This test only has 500 ants and if you watch the timer again, you'll see why it's only 500.

    Test 4: Same test as above except, the ant's 'solid' behavior has been enabled (more or less to prove that it was disabled in the previous test.) This test only has 300 ants and there's a good reason. 500 ants will turn most any machine into a snail. This test, has pretty predictable results.

    The second test is the one that clued me in to the 'solid' behavior and the affect that even a few of them can have on a project. The 3rd test was totally unexpected. Why should there be that much lag caused by adding a disabled behavior????

  • Getting the same error with Chrome.

    Switched to Edge and get this... it came up with a big red warning letting me know the site was unsafe.

    And it's crashing incessantly in Edge as well.

  • getting the same error trying to load the editor.

  • And here's newt 's example modified to use an array of 5 possible switch combinations.

    https://www.twistedvoid.com/c3examples/ArraySwitches.c3p

    Take note of the added file "SwitchList.json"

  • There's not going to be any easy answer to this since it's not built into C3. You're either going to have to find a plugin that works as mentioned above or

    do a JS version using JQuery

    jqueryui.com/datepicker

    or, an HTML version using the HTMLElement plugin

    w3schools.com/tags/att_input_type_date.asp

  • The simplest method would be to use a string variable.

    Each input set the variable to the current value and the new input.

    On input variableString set value to variableString& input

    You would also need a counter to tell it when to check.

    When it's time to check, compare varaibleString to another variable with the correct order.

    Newt has the solution with one suggestion. An array.

    As they turn the switches on, build a string of switch numbers. When the last one has been turned on, compare that to a string in an array. This way, you can have as many sequences as you wish.

  • I used a rather crude method in this experiment and it mostly works, even when the lines take bends and slight curves.

    twistedvoid.com/antz

    To see it working, left click to drop food and click the button to turn pheromones on and watch their behavior when an ant finds the food.

    When an ant finds food it uses pathfinding to head back to the nest. As it travels, it creates a sprite on the layer under it (the red arrow) pointed in the direction it's travelling.

    When another ant encounters the red arrow sprite (is overlapping) it turns to face the opposite direction that sprite is pointed in and moves in that direction, constantly checking to see if it is overlapping.

    You can download the source at:

    twistedvoid.com/Antz.c3p

    Checking sprite collisions or the 'is overlapping' should help solve your other problems.

  • You do not have permission to view this post

  • The problem you're going to have with any algorithm to properly capitalize a sentence is none are really going to know what to do with names like David and Sarah. Most work by either splitting the string apart at the spaces looking for things that should be capitalized, like the single letter 'I'. Unless you stuff specific proper names into a structure like an array or dictionary, the algorithm won't know to capitalize them. The other solution is brute force guessing capitalization by running every word through a full dictionary and even that won't get it right all the time.

  • Yep, dop called this one correctly. In Construct you don't need to declare private or public. They're considered private to the event sheet you're working with. For 'public' functions I create a separate event sheet to hold them and then, include that event sheet in any others where I want to access them. And, you don't need to declare the (int) return value either.

  • Well, the Thunkable feature I hope they don't include is the fact that I crashed it to a white screen in about 5 minutes of goofing off. What I'd rather see is the ability for Construct to CREATE the Thunkable site rather than compete with it.

  • The first question to ask isn't how well does your game perform on x platform. The question to ask is, how will my game perform on a target customer's device. So that begs the question, what kind of device and OS does my target customer use. Part of that answer lies here:

    gs.statcounter.com

    Unless you're target is something very specific, the best approach is a bottoms-up. For example. If you look at Android OS's over the past year, you'll see that Android 9.0 is really starting to take off. But you'll also see that good ole' Lollipop 5.1 still has a fair chunk of market share. Same thing with Windows OS's. Win 10 is slowly taking over. But you still have a lot of 7.0 users out there (31%). So I know that if I develop a game that runs on old hardware from when Lollipop was released, then I've got 7 versions of Android above that which it should haul ass on. If I write my game on an old piece of Windows hardware (like this Core i3 2.1ghz with 4gb of ram that I'm writing this reply on) that was from the Win 7 heyday and it runs well enough that I don't get frustrated, I'll have no issues on my 8 core 4.0ghz AMD with 32gb ram.

    So, pick a piece of older hardware you either already have or can get cheaply that you want your game to run on. Make THAT your 'minimum recommended hardware.' If you write everything with that minimum in mind, it should fly on anything bigger and better.

    Now, that being said, compatibility testing is a whole new can of worms.

  • Just thought of another way this could be done. Fractals. It would take a good bit of tinkering to get a formula that you could use but, by changing parameters each iteration it could generate your layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you study the code I wrote, you'll learn that it already centers horizontally using the viewport left and width. Centering vertically is done the same way. Creating different shapes is just a matter of playing with the math.

    Two ways that come to mind to make irregular shapes is 1. using unique formulas like I did for the one above or 2. predefine the layouts with arrays with 0's and 1's whereby the 1's indicate that a sprite should be created.

    But, you're planning on 500 levels which would be a LOT of arrays. What I would look at doing is writing a formula that randomly creates 1/4 of the array which would say, draw the top left quadrant. By reading the array back in different directions, you could draw the other 3 quadrants and they'd be symmetrical like the image you have above. The trick would be to consider the fact that the rows alternate in even and odd numbers of sprites.

    But, you have lots of other things to consider. If this is a typical memory match game where you match 2 images you'll have to figure out how to keep the layout to an even number. You'll have to figure out how you're going to display those sprites, how to 'match' them and how to get them to layout with the proper number of each using the same layout you did for the blue ones.