shinkan's Recent Forum Activity

  • yeah. Don't use official SpriteFont. Use third party SpriteFont+. Basically SF+ have one option that makes things a lot easier and faster - without spamming your event sheet with pointless events. I'm really surprised that this feature was never added to official plugin... It's like theirs motto, add new stuff and never improve them, which is really sad :/

  • Ashley

    I asked about that in some random post, but I decided to make a "official" request, so here I am. Please

    In other post you mentioned that objects place on a layout are automatically loaded into a memory and will stay loaded until layout is changed. Objects that are not placed on a layout but spawn/created in runtime are then loaded into a memory and when last instance of it will get destroyed object will be unloaded from memory. But then it turns out that even if you create or spawn objects they will stay loaded for entire layout, even when last instance is destroyed

    And this is nice and good in overall, but not everytime. Sometimes you only need to create an object to do something specific and after that you don't need it anymore. But unfortunately object loaded into a memory will stay there until next layout and of you have few that kind of object then this is simply a waste of memory. Especially on mobiles where memory is very limited.

    In my previous and current project (and probably any future project that will need it too) I'm using very simple yet very powerful technique (sound a bit like some super martial arts killing moves ;P). And by the way a little tip for everyone.

    It involves using a R0J0hound Paster plugin. Basically all my backgrounds and UI's in game are made of a lot of instances of different sprites, tiled background, sprite fonts, 9-patched and whatever I need to make it all pretty. When everything is placed or spawn and set how I wanted then I paste it all into one Paster instance and delete them all.

    This make's my layout nice and clean because I don't need to do anything with them anymore - in my current project objects count drop to 1 (just the Paster) from initial 276!

    So object count is no more an issue. Unfortunately memory usage still is. Current background objects only are using over 100MB - this is after a lot of time spent on assets optimization and trying dozens of different things to do same thing. Adding one image that represents same content and same resolution takes only about 16MB! But doing it like this, using an image instead of all the assets, I'm loosing all randomness on level generation. And here comes the Paster. After pasting everything I get more less same memory usage as with normal image but I still have my randomness every time layout is started! And even that I still have control over Paster resolution, so I can make it a bit less pretty and save extra few MB.

    So once again, pretty please for adding an "Unload" action

    I don't want to make a hard choice between making my game pretty or playable on as many mobiles as I can

  • > If you need multiple characters to be customized then instead of global variables (which you probably need a lot) use Array or Dictionary object.

    >

    could you explain that to me please

    Could you tell me a bit more about your current setup?

    How your player sprite looks like (animation, animation frames), do you want to change appearance for only one sprite or multiple? Basic stuff so I can guide you with what you already have.

  • Nice and simple. Thank you!

  • That's great!

    Sorry my internet went offline for some reason and could not respond earlier :/

    One thing

    +Dictionary: For each key

    ++Dictionary: Is not empty

    +++BTLevelSelect: LayoutName = Dictionary.CurrentKey

    this do not need to be a sub-events

    You can make only one event with this 3 conditions - works the same but takes 2 events less

  • This makes it even simpler.

    Instead of this Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    use Dictionary: Add key "Layoutname" with value [score]

  • >

    > Hope I make any sens, it's almost 4 AM over here ^^

    >

    >

    Same here... Wesolych Swiat shinkan

    Thanks!...

    Haha, nice! Wesolych to You too

  • Try

    +BerryBush = Frame 0

    +Trigger once -> Wait 5 seconds, Set berry to true.

  • If you need multiple characters to be customized then instead of global variables (which you probably need a lot) use Array or Dictionary object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • let's make it simpler. Imagine you have 3 variables:

    1. Number variable [episode] = 1 - this will keep track of current episode you are playing

    2. Number variable [level] = 1 - this will keep track of current level you are playing

    3. Number variable [score] = 0 - to keep track of current player score

    When player finish any level you make an event:

    Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    So when player finish level 2 of the episode 1 and his score is 1234 it will add a key [ "1level2": 1234 ]

    when he finish level 5 of episode 3 with score 5432 it will add a key [ "3level5": 5432 ]

    so key name is made of a combination of: variable [episode] a string "level" and a variable [level] - which gives for example "3level1". And value of that key will be a variable [score].

    korbaach

    if you know how many levels and episodes you have you can make a simple loops

    For example there is 5 episodes with 4 levels each and you already have finished all 4 levels of episode 1 and 2 levels of episode 2. Each level have it's own score.

    "1level1": 1234,

    "1level2": 567,

    "1level3": 432,

    "1level4": 674,

    "2level1": 33,

    "2level2": 8,

    Now on start of the layout you want to create and set text to score for each level:

    +On start of layout

    ++For "ep" from 0 to 5

    ++For "lvl" from 0 to 4

    ++ Dictionary: Has key [ loopindex("ep") & "level" & loopindex("lvl") -> Create Text on layer "zzz" at (X,Y) - > Set text to Dictionary.Get(loopindex("ep") & "level" & loopindex("lvl")) Hope I make any sens, it's almost 4 AM over here ^^ EDIT: and yes you only need Webstorage if you are actually want to save/load current game state. With Dictionary it's super easy. You only need one event Webstorage: Set local key "key name" to Dictionary.AsJSON. This will save entire dictionary object as a one webstorage key.

  • nope

    Dictionary: Has key "Episode" & counter -> do your events.

    And if you run it through a loop you will only have one event to rule them all

  • Object is berry bush

    Berry bush has a boolean called "Berry" set to false.

    False = Frame 0

    True = Frame 1

    You need a Trigger event for "Wait" to work properly.

    and one more tip for you.

    Berry boolean can be only either 0 or 1. And if your BerryBush have only 2 animation frames that represent Berry boolean state you can do something like that.

    On something: BerryBush: Set animation frame to self.Berry

    this will always set your animation to Berry boolean state.

shinkan's avatar

shinkan

Early Adopter

Member since 21 Nov, 2008

Twitter
shinkan has 8 followers

Connect with shinkan

Trophy Case

  • 16-Year Club
  • x5
    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
  • Email Verified

Progress

25/44
How to earn trophies