Lncredible's Recent Forum Activity

  • Hi all,

    I want to create an auto-runner that uses real words to influence terrain generation. My idea is to create pieces of the environment using only ONE Sprite that has 26 frames (representing the entire pool of the English alphabet).

    Example:

    The word "CARS" is selected and stored in an Array. The game will loop through the array spawning instances of "Sprite" and setting the frame to the equivalent number in alphabet (-1).

    "CARS"

    For 1 to TotalLettersInWord

    -> Spawn Sprite at XY

    -> Set Frame to WordArray[CurrentLetter]

    -> Add 1 to CurrentLetter

    All sprites will be moving to the Left with behaviour "Destroy outside of layout"

    Once the last letter has been spawned it goes back to the first letter, looping indefinitely (another part of the game will change the word).

    I am using this method because I think it will be an interesting way to create patterns within the game's landscapes based on the patterns in word construction in the English language, i.e., vowels are only used after certain letters, and certain combinations NEVER come up, such as X followed by R.

    SO MY QUESTION IS - What is the best method of creating a list / table of words that the game chooses from? I want to be able to sort them by character length, but other than that I could practically include a whole dictionary as long as it wouldn't slow the game down to a crawl. Any ideas?

  • Crossworks performs much better than Cordova

    Hi,

    Only option I have is to export with cordova - was Crosswalk a few versions ago? how else can I do it?

  • Hi there,

    I am exporting my project using Cordova and then using intel XDK to create an APK. I test my game regularly on my OnePlusOne and Nexus 4 and they both have around 50 - 60 FPS. I sent my game to a friend, however, who is using a Samsung Galaxy S3 and the game runs at 3 FPS! The real frustration is that, a few months ago, the game worked at around 40-50 FPS on the same Galaxy S3 and if anything I've made huge improvements to performance since then.

    Have you any suggestions?

    Thanks!

  • Are you checking the collision with all the blocks in the game?

    Usually I create a turning point for the enemy using a invisible block, so the turning will be triggered on collision instead of checking collision every tick.

    Hope it helps.

    Hey! thanks for replying.

    The problem is that the enemy can end up anywhere on the map (he can fall through part of the world but must still keep moving). I too have used invisible blocks to do "left right" before, but these enemies must continue where-ever they go within the destructible blocks, and must be able to collide with any of them if it hits them.

  • Hi there,

    I have an *Enemy* in my game that moves Left and Right with the default Platform behaviour, with an instance variable the toggles in the code.

    -> When var "LEFT" = 1

    -> Simulate control moving left

    -> When var "RIGHT" = 1

    -> Simulate control moving right

    I am assuming that these both run at 60 times a second as default. The behaviour of the enemy is that he should keep running LEFT until he hits a *Block* then he goes RIGHT. Here's where it gets intensive - there are usually about 50 - 200 blocks in the game at any one time, so if he's always checking collision with *Block* it generates "60*#ofBlocks" collision checks per second, per *Enemy*.

    Is there a better way of checking collision so that it doesn't swamp my game down whenever these enemies are put in?

    P.S. - *Enemy* is 128 pixels wide. Would checking his X - 64, X + 64 for an instance of block work better?

  • yeh, it's gonna be nice removing all this clutter from around the edges and the unnecessary "destroy when outside of layout" to get rid of some of them...

    Thanks for your help.

  • Best method:

    Put all your sprites and objects you do not want to be on the layout on layout start, in a dedicated layout for that.

    near ALL my projects have a "Objects" layout. In which I stuff and prepare all my sprites.

    And create/spawn the objects you need on the layout you want to run.

    So yes, the "Object Store" is a very very good method.

    Great. Do you need to explicitly start with the Object Store and immediately "on start of layout" move to the first intended layer?

  • OK, good suggestion. So in any layout following the first I can have a clean sheet to work from and it'll keep the data loaded from Layout1?

  • My game has a layout per level, but I noticed you only have to store objects in one layout for them to be usable in every layout... MY question is... Can I have one dedicated layout (that is never used) as an "object store" with all the usable objects in it that aren't part of the level-layout specificallys? (created by event instead).

  • Hi,

    I just tried your suggestion (compare two values [loopindex = 100]) as a sub event of "on created" and also as a sub event of the loop. Neither spawns a Pipe_pump at any time.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found it helpful to follow this guide: "Performance Tips for Mobile Games" (google it as I can't post URLs - it is on the Scirra website...). But it sounds like you are doing the right thing - keep testing on the device you want to use every time you add a new feature.

  • Hey,

    As you can see in the picture below - I want the following to happen;

    • Pipe_base is creased and it spawns Pipe_tubing
    • Pipe_tubing grows by 2 height 100 times
    • Then as the loop ends Pimp_pump spawns on top of the Pipe_tubing (image point 1)

    at the moment the Pipe_pump is spawning straight away before the loop has completed. Is there a way of doing this? I've tried using a for loop as well...

    Thanks

Lncredible's avatar

Lncredible

Member since 10 Sep, 2014

None one is following Lncredible yet!

Connect with Lncredible

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies