dop2000's Recent Forum Activity

  • So the correct path is "message.content.background_rgb"

    Also, you can't send "rgb(4,107,109)" in JSON, because it's a string. Well, you can, but then you will have to parse it into three individual numbers 4, 107 and 109..

    So you need to send three separate numbers - "background_r":4, "background_g":107, "background_b":109. And then use this code to set color:

    JSON Set Path to "message.content"
    Sprite set color to rgbex255(JSON.Get(".background_r"), JSON.Get(".background_g"), JSON.Get(".background_b"))
    

    Another option is to pre-generate the rgb colors which Construct will understand and send them from the server. For example, if you run this small event

    TextInput Set Text to rgbex255(4,107,109)
    

    ... you will see that it returns the number -4405244385279. So you can just send this number in JSON key "background_rgb" and then use this:

    JSON Set Path to "message.content"
    Sprite set color to JSON.Get(".background_rgb")
    
  • If each enemy type has one animation and they are not too big, then you can probably use one sprite for all enemies.

    If there are multiple animations per enemy (for example, idle, walk, attack), they may be difficult to manage when they are in one sprite. Then make different objects and combine them into a family.

    Another thing to consider is memory usage. A single sprite with many heavy animations can use a lot of memory. So if your game has different enemy types on different levels, I would definitely suggest keeping them in separate sprites to save on memory.

    When I'm at "choo" while typing, I'd personally only want "choose" and "chooseindex" to populate in the dropdown list, not "clocktext".

    I agree. Not only these long lists are slow, they become less and less useful when they contain hundreds of objects mixed with expressions and variables.

    Filtering them as you type is one solution. Another option would be splitting the list somehow, perhaps displaying two or three lists side-by-side - one with expressions, another with objects, and the third with variables.

    In your gif, once you select the choose function, the dropdown list has to clear the elements, could this be a factor?

    Not sure what you mean, which elements? Theoretically, the number of objects and variables in the project should not affect system expressions like "choose" at all.

    Another possibility is that its actually Chrome that causes these freezes (as Asmodean suggested in his comment), because it does something as I type, like performs a spell check. I disabled the spell check yesterday, but I can't tell yet if it helped or not..

  • I believe you can specify any delimiter in the addon. You can use a special character like % or ^.

    1StepCloser I know what you are talking about. C3 begins to lag when populating long lists of objects or expressions/variables. But these lags are relatively small, in largest projects I've seen the lags were about a second or two. It definitely doesn't explain random 10-20 second freezes in my case. They are probably related to the same functions, but something else makes the issue much worse.

    Maybe it's a HD issue. Did you try running defrag and chkdsk?

    It's unlikely. The drive is a fairly new very fast SSD. I don't have any issues running large modern games from it. Edit: I ran chkdsk and it didn't find any errors.

  • Try JSON.Get("background_rgb") without the dot.

    If it doesn't help, please post the full JSON string.

    Also, you can't just use a number to set color in C3, unless you encode it properly. You need to use one of these expressions - rgbex, rgbex255, rgba, rgba255

    For example: rgbex255(0,255,0) is 100% green.

  • Don't use Rotate behavior with Physics.

    dropbox.com/scl/fi/eeq8tque3omz3m00s0ght/PhysicsGears.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you talking about DrawingCanvas in Construct 3? Its JSON doesn't have image data.

    Another unlikely idea, but perhaps computer temperature?

    No, the laptop is running cold. And like I said other apps are not affected, the issue is isolated to C3 in Chrome only.

  • Odineye Have you tried it yourself? Canvas.AsJSON doesn't contain image data.

  • With only two objects the code may be even simpler. You don't have to loop through them. You can do this:

    Set minX to min(player1.x, player2.x)
    Set maxX to max(player1.x, player2.x)
    etc.
    

    Or you can add both sprites to a family.

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