Possible Bug Thread

This forum is currently in read-only mode.
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • I don't know whether the Devs agree, but rather than filling the forums with multiple posts, and the bug tracker with bugs that aren't bugs, it may be a good idea to have a thread like this to allow others to confirm people's bugs before they are added to the tracker.

    As an ex Beta tester, I know this approach can save the Devs a lot of time, with a lot less "non-bugs" appearing on the tracker.

    I'd like to start off with the possible bug that I posted earlier today:

    "On Bounce" not triggering in car behaviour.

    Can someone confirm this please.

    Sponge.

  • Custom image not working with MiniMap

    I can't seem to get an image to work as a backdrop for the MiniMap object.

    I'm using a PNG file, and I haven't tried other formats yet (will do later).

    Can someone confirm please.

    Sponge.

  • Another image beneath the MiniMap and set the minimap as transparent?

  • Another image beneath the MiniMap and set the minimap as transparent?

    Yeah, that works...

    ...but there's an option in the MiniMap to load a bitmap directly into it to get the same effect, which doesn't seem to be working.

    Sponge.

  • I believe that is for minimap points/objects rather than the background.

  • I believe that is for minimap points/objects rather than the background.

    You're absolutely right!

    I've just checked this, and it works.

    This is why this thread was a good idea.

    That's one "bug" that isn't cluttering up the tracker.

    Cheers mate.

    Sponge.

    EDIT: It's a shame that there's a time limit on editing posts.

    I'd like to go back and update the earlier post, showing that it's not a bug, but "User Foo" instead.

    That way, this thread could also be a good source of common problems new users have, and new material for the FAQ.

  • I'd say generally if you do have something which users may mistake as a bug, then you should add it to the FAQ.

    In this case, clicking the property in question shows what it is intended to do, which should be clear enough if you have doubts over why it isn't working.

  • Using a Global Variable as a range for a random number produces a floating point number

    I'm sure this is a bug, and it was bugging me for ages, until the penny dropped.

    I'm using Global variables "SizeX" and "CurrentCellX", and I'm only using integer calculations throughout, but I wasn't getting conditions firing when comparing CurrentCellX to an integer, and the debugger revealed why.

    Having set "SizeX" to 10, and then setting "CurrentCellX" using

    Set "CurrentCellX" to random("SizeX")+1

    the debugger showed that "CurrentCellX" was producing values like 2.09159510755603 and 3.46251876045338

    So it looks like using a Global variable as a range in the random statement produces a floating point value.

    Could someone else confirm this please.

    Sponge.

  • I don't think it's a bug. Random() generates a float if you pass it a float and an integer if you pass it an integer. If the global variable contains a float, random() will generate a float. Using integer only calculations is not guaranteed to result in an integer. For example, 1 / 3 gives 0.33333... instead of 0. If you want rounding, you should explicitly use int(), round(), floor() or ceil(). I believe this is more useful behavior (since you can't calculate a ratio with a / b if both are integers, you get 0 with integer division).

  • Yeah, INT works, but what I couldn't understand was why it was throwing back a float when there was no divisible maths going on.

    In fact, just creating a new cap with Global variables "CurrentCellX"=0 and "SizeX"=10, and the statement:

    "CurrentCellX" = random ("SizeX")+1

    will produce floating point numbers like 4.22801958731946 every time, without any other maths going on.

    Is that expected behaviour?

    I suppose as long as people are aware of it, it'll be ok, but I wouldn't have thought that floating point would have been used until it was forced to by maths that involved or resulted in a floating point value.

    Sponge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, I think the initial values for global and private variables are always floats. I think you need to set them to int(current_value) on start of layout to make them integers, or just call random(int(value)).

  • Well that makes sense of the results that I got.

    Is this mentioned anywhere in the docs or on the wiki?

    Couldn't find anything on there, but I think it needs to be.

    Sponge.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)