braingame's Recent Forum Activity

  • Hi all together,

    in my game I want to display a count down timer. It counts from 30.0s down to 0.0s

    The deciseconds always must be displayed but what I'm getting is a missing ".0" at

    30, 29, 28, ... 3, 2, 1 and 0 seconds - so it looks like:

    30

    29.9

    29.8

    29.7

    29.6

    29.5

    29.4

    29.3

    29.2

    29.1

    29

    28.9

    29.8

    ...

    Every tick I calculate the variable gTimeLeft to display how much time is left.

    • using round(gTimeLeft*10)/10 cuts off the required ".0"
    • zeropad() is only usefull for adding leading zeros, but I need a trailing zero including the decimal point

    So how can I format my timer like "ss.s" without slowing down the frame rate?

    Thanks for hints and/or solutions in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was glad to find this topic!!!

    As Ashley already said:

    " You should make sure you use valid and complete XML documents, which start with "<?xml ...". "

    First I made the same mistake and played around only with XML elements and didn't bother about the XML header. But when my PHP file echoed the missing starter line "<?xml ..." all was well

    For your info:

    For XML output in PHP I use the object XMLWriter() and the method startDocument('1.0','UTF-8') does the trick with the needed header.

  • Hi all together,

    according to my nickname I'll make braingames with C2.

    I already played a bit around with the free version of C2, then I needed more than 100 events. I decided to buy C2 because

    1. I think it's a powerfull tool and

    2. the community is very active, friendly and helpfull

    Happy gaming

    best regards

    braingame

  • Great forum, allways very helpfull.

    I had the same exporting problem (Win7 32bit). After reinstalling Java the C2 export worked fine.

    Thank you Ashley!

braingame's avatar

braingame

Member since 16 Jan, 2014

None one is following braingame yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies