dop2000's Recent Forum Activity

  • I do something similar in my projects. All texts are added to a single Texts family. It has a "tag" instance variable defined on it. I can specify unique tags for each text object on the layout, for example "player_score", "game_over" etc.

    There is an array containing all these tags with strings translated to different languages.

    And I have a single "Texts On Created" event, which looks up the string in the current language for each text by its tag.

    I chose to use an array because it's easy to edit, but this can be a dictionary or JSON.

    Here is a (paid) template with this and a few other useful mechanics for game localization:

    construct.net/en/game-assets/game-templates/multi-language-support-c3-2407

  • The only issue with Tween is that it will choose the shortest way. For example if you tell it to rotate from 0 to 270, it will rotate 90 degrees counter-clockwise.

    If you want to rotate 270 degrees clockwise, you need to use "Tween Value" action and set the angle to Sprite.Tween.Value("tag") while the tween is playing.

  • So a web game? Use Browser.QueryParam and Browser.QueryString expressions

  • Oof..

    I would suggest parsing the entire works of Shakespeare into a list of unique words first. This task itself is going to be tricky. You need to remove all punctuation, line breaks and other non-letter characters, replace them with spaces. Then extract every word using tokencount/tokenat. I suggest writing these words to a dictionary as keys, this is the easiest way to get rid of duplicates.

    Then you can start generating that continuous string, and after adding each letter loop through all dictionary keys and check if the string contain such key.

    For Each key in Dictionary
    find(LongString, Dictionary.currentKey)>=0
    ... // word found!
    ... Dictionary delete Dictionary.currentKey
    

    You'll need to use expressions like tokenat, tokencount, find, trim, replace etc. See this link:

    construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

    Oh, and the string doesn't need to be endless. If no words were found, you can safely trim the string, leaving only the last 20 or so characters. This should help with the performance.

  • I think it should be something like this. But it won't work in preview, you'll have to export it to NWJS to test.

  • What do you mean by "directly" - without prompting the user? You can only do this in NWJS export. Use NWJS action Write Binary File. I guess you'll have to load CanvasSnapshot into the BinaryData object first.

  • See this demo:

    howtoconstructdemos.com/chess-game

    Note, it's for two human players, it doesn't have an AI.

  • 1StepCloser Whoa, I'm guessing you are starting to push the limits of Construct. That's why you still have lags even after garbage collection. I suspect the number of object types is the main factor.

    Our project is much smaller: about 50MB in size, 10K events, 500 object types.

    Looks like we might have to condition ourselves to "F12 + Click Collect garbage icon", just as we've conditioned ourselves to "Ctrl + S".

    I now keep DevTools constantly open on a second screen, together with C3 Search window.

  • Again, without any WAIT actions, would this be correct, or would "Change SOMETHING ELSE into ONE MORE THING" still take place before the sub-event "Create SOMETHING ELSE" and thus fail?

    I Construct, both SOMETHING and SOMETHING ELSE will be created before the second top-level event. (if there are no waits)

    Yeah, Construct logic is a bit different from other languages, it takes time to get used to it. One of the most important concepts in Construct is picking. Once you understand how it works, it all starts to make sense!

  • If you export to NWjs, you can use NWJS.ArgumentCount and NWJS.ArgumentAt(n) expressions.

  • I was going to suggest using families. I don't think there is a better solution possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley Every time you tell to file a bug with Google, I'm at a loss, because I really have no idea how to explain this in technical terms to their engineers. "An app I'm using in Chrome starts to lag until I force garbage collection"? They will probably redirect me back to you.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies