Blog

  • Maybe it’s just me

    Who makes myself feel guilty…

  • When you feel guilty

    People treat you like you’re guilty. So a very lot of people have treated me like garbage for a very long time. But they’re not the actual problem. It’s the ones who make me feel guilty that are.

  • BooBoo 3.0.18

    • Support single quote ‘a’ chars
    • Fix parsing of hex numbers in expressions and fish
    • Add while/do_while loops
    • Add cd_box_box, cd_line_line and dist_point_line collision detection functions
    • Allow registering numbers and strings with DevSettings (+debug and F9)
    • Fix parsing of cfg files with = in values
    • Allow accessing shim5.json in code using NULL for json handle
    • list_directory now returns two vectors, filenames and is_dir flags
    • font_draw now has a flag (before rtl) to disable colour/glyph codes
    • %(c) %(d) %(x) can now be used in string formatting (numbers will be cast to ints)
    • Speed up firing in CoinHunt so it’s more like it originally was. It was doing a fuck tonne of checks but now it’s using dist_point_line and it runs faster even though I also increased max bullets from 7 to 16 and increased fire rate from every 7 frames to every 5 frames.

    EDIT: next version I’ll make it 20 bullets max, I still get 30 FPS on my Celeron N5095 with 20. 25 is too much (18 FPS).

    EDIT2: Maybe one day I’ll do what I suggested on the bug tracker and keep track of quadrants everything is in for even fewer checks. Then maybe I can put it back to “infinite bullets” (dead on exiting the area)… it’s just too slow on any of my computers I have left.

    btw, i checked the fps by firing along the biggest diagonal so there would be no bullets dying out of bounds

    EDIT3: I get 60 FPS with unlimited bullets on i5 9500T. So that Celeron is really slow. You can get unlimited bullets by putting a semicolon at the start of line 945 in game.boo. Then it’s exactly like the original which had fire rate of every 5 frames and unlimited bullets.

  • When everything changed

    I still played hard into my twenties, but it was a downhill slope since grade 8.

  • Is BooBoo fast enough?

    Here is show CoinHunt running at 16x speed. That’s 16x as much code being run per frame. It knocks the framerate from 480 to 380 FPS. So it goes to show you could run 64x+ as much code as CoinHunt on a low end PC. CoinHunt’s main loop (run function) is 1266 lines including many function calls called in loops. So it’s probably 2000+. So you could run 128,000 lines of BooBoo per frame in your run function on a low end PC.

    EDIT: Running CoinHunt with +ops shows my guess was way off. I get 15,750 lines per frame (stock speed). So crunching the numbers, it’s a little over a million lines per frame you could do on this PC at 60 FPS.

    EDIT2: It doesn’t scale that way though. It seems there is a lot more code in the draw function than I thought. My original estimate wasn’t bad… but it’s actually about 3125 not 2000. So it seems like 200,000 lines of run function is the closer estimate. This draw function has tens of thousands of lines per frame just drawing stars.

    EDIT3: This includes all code in loops (each time it’s run counts as 1) and function calls. I think 200,000 “big instructions” per frame is a perfect level of challenge for a single or small team of developers, which is what BooBoo is designed for. Keep in mind this measurement is based on “somewhat average lines of code”.

  • BooBoo 3.0.17

    • Add +no-obfuscate <filename> switch
    • Make string_set_char_at utf8 compliant
    • Fix texture coordinates of ground in DOOMED
  • BooBoo Linux Version

    If you buy it on Humble, you get a redistribution license and the Linux version.

    EDIT: The Linux version is free to try now too

  • JSON changes

    Some of the changes were sparked by thoughts about how I’m going to create save states. I came up with the idea of something like this:

    "entities": [
        { "chest", [ x, y, opened... ] },
        { "person", [ x, y, ... ] },...
    ]

    You would read the name and use toptr something like:

    = name (json_get_string json "entities>[0]")
    = name (string_format "create_%" name)
    var ptr
    = ptr (toptr name)
    ; create a vector from the array after "chest" /etc, which can be fully automated
    var entity
    call_result entity *ptr vec
    vector_add entities entity

    Now the load code doesn’t need to know about the types. Typically you see:

    if (type == chest) {
    }
    if (type == person) {
    }
    ; a million others

    By the way, if you use this trick, it won’t work if you obfuscate your code. I can allow it though through a command line switch to list your create_ functions/etc.