Fengist's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies