dop2000's Recent Forum Activity

  • It's really difficult to understand the issue without an example. Can you share a small demo project?

  • My main concern is that construct is not a robust text editor.

    I agree, it's not. It has got much better since early versions, but still nowhere near the convenience of Excel or Google Sheets.

    If I need to add a lot of strings to the array at once, I usually prepare them in Excel and then copy over to the construct array.

  • Glad it worked!

    To make the code even shorted you can use ternary operator

    For each Room 
    ..Room set frame to (ArrayMap.at(Room.RoomNumber)=0 ? 7 : ArrayMap.at(Room.RoomNumber))
    

    This means - if the value in ArrayMap.at(Room.RoomNumber) is 0, then set frame 7, otherwise set frame to the value in the array.

  • Since you are loading/populating the dictionary only once at the start of the game, you should not worry about the performance.

    Anyway, the array thing seems good but I have already implemented the dictonary in my game on which I am working on since 2019 and it would be a pain to switch to that.

    Yeah, I also prefer working with a dictionary. But the array is much easier to manage, especially when you have many hundreds or even thousands of translations in the game. I have a template in the Asset Store which converts that 3D array into a single dictionary, extracting only the strings for the current language.

  • You can also run a loop for instances:

    For Each RoomFamily
    ...ArrayMap value at (RoomFamily.RoomNumber)=1
    ......RoomFamily set frame to 0
    ...Else
    ......RoomFamily set frame to 1
    
  • Do you have 1000 room_x objects? This too should definitely be optmized.

    You can add all room_x sprites into a family and make a simple loop:

    For "x" from 1 to 1000
    System Pick By Evaluate: RoomFamily where RoomFamily.ObjectTypeName="Room_"&loopindex
    ...ArrayMap value at loopindex=1
    ......RoomFamily set frame to 0
    ...Else
    ......RoomFamily set frame to 1
    

    Another way to pick RoomFamily instance is by an instance variable - create a variable RoomNumber and assign a value to each room_x sprite.

  • Try installing the latest version of the addon from this post:

    construct.net/en/forum/construct-3/plugin-sdk-10/erens-ported-plugins-modules-159391

  • No, when you download an update to the same app, the localstorage data is preserved.

    But you need to be careful though to ensure that the data from previous versions is compatible with the new version of your game. For example, if you added a new key to be saved in localstorage, make sure that the game still works when this key is not available.

  • What do you mean by "creating dictionary in code"? You will have to set each dictionary key with an action on the event sheet. If you only need like 5 keys, I guess this solution is fine. But for 30 keys multiplied by 5 languages - that's too much code!

    I want to switch to this solution because it is easier to have every language in a seperate file...

    I actually did this in my first game and regretted it later. When there are a couple of hundreds strings in each file, it becomes really difficult to sync them, you need to make sure that the key names in each file are the same.

    I now prefer putting all translations into a single array.

  • Not sure I understand. When an enemy stands still, the knockback works. But when the enemy is moving, the knockback doesn't work. Is this correct?

    Maybe the MoveTo has priority over the 8direction behavior. Try changing their order in the list of behaviors:

    If this doesn't work, try disabling MoveTo for a brief moment when the arrow hits the enemy. Or maybe set its max speed to 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If most objects are off-screen and the game still slows down, then the problem is not with rendering them. You need to keep the object count reasonable, disable behaviors when they are not used, optimize collision checks etc.

    If the game is 2D, consider replacing blocks with a tilemap - it should be massively faster.

  • He's setting Y coordinate to random(170-387). The correct expression is random(170,387) - there should be a comma between two parameters.

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