Good vs. Evil

Discussion in 'Forum Games' started by Randomguy404, Oct 12, 2014.

  1. lenscas

    lenscas Over-Achiever

    9 and.. I decided to bring multi threading to my game for the pathfinding section.

    That does mean that the WASM build is broken now.

    edit: Fixed the WASM build by swapping the multi threaded code out for a simple loop when it compiles to that. I also updated the github page to host the new WASM build :)
     
    Last edited: Jun 28, 2019
  2. GamerwithnoGame

    GamerwithnoGame Forum Addict

    8. Code stuff!
     
  3. duckfan77

    duckfan77 Well-Known Member

    7 Drayano!
     
  4. lenscas

    lenscas Over-Achiever

    8 decided to look how long I could keep my game open using a release version of the native build before it would crap itself.

    The game runs at a tps of 60 and every fifth tick a new object gets spawned that will run my basic pathfinding function. Which it will run EVERY tick.
    The game started to crap itself only after 3 minutes. Or if my math is correct it took 2160 of those objects. Also, I accidentally left in a print statement inside of the calc_path function, meaning that I probably could've gotten better performance out of it.

    Now, just replace my simple pathfinding thing for a real one and also put in some sort of cache so it doesn't have to run every update tick. After that, I don't think I need to fear pathfinding being a source of lag.
     
  5. duckfan77

    duckfan77 Well-Known Member

  6. triggerfinger12

    triggerfinger12 Well-Known Member

  7. lenscas

    lenscas Over-Achiever

    7
    LIAR!

    Oh well, at least I have a real pathfinding algorithm implemented (A*)
     
  8. duckfan77

    duckfan77 Well-Known Member

    6 Going to see Endgame in an hourish
     
  9. lenscas

    lenscas Over-Achiever

    7 I... need to think of a better way to implement guis/huds into arena_keeper.

    ITS SO MUCH BOILERPLATE JUST FOR A SINGLE BUTTON!
    First, you need this piece of code:
    upload_2019-6-30_23-12-3.png
    This basically sets up an object that will act as the button. It will render the text as an image using the provided font when you create the object.

    However, we need to load it together with the font using this piece of code: (Here ImmiExample is an earlier provided struct that will just be used as a container)
    upload_2019-6-30_23-14-36.png
    Here, we load font.ttf, make a style for it and then pass it all to Buttonstate so it can do its pre-render magic.

    However, we are not there yet as we still haven't actually drawn anything. To do that we need this piece of code:
    upload_2019-6-30_23-16-51.png

    And all we have done now is create some text in the middle of the screen that says "normal button" when nothing is happening and "Hovered button" or "Clicked button" if you hover or clicked on it. It will also print "Test!" to the console when you click on it.

    Also, if you want your assets to load before running the game you will need to implement that yourself. Luckily there is the "execute_or" method that takes 2 functions. One will run when its done loading when you call it and the other if you call it while it is still busy.
     
  10. GamerwithnoGame

    GamerwithnoGame Forum Addict

    6. Shia la Boof?

     
  11. duckfan77

    duckfan77 Well-Known Member

    5 sneaks down
     
  12. lenscas

    lenscas Over-Achiever

  13. duckfan77

    duckfan77 Well-Known Member

    5 *hides*
     
  14. GamerwithnoGame

    GamerwithnoGame Forum Addict

    4. What, like the stuff you get off buffalo?
     
  15. LordPINE

    LordPINE Well-Known Member

    5. You guys are getting the score get too low again, aren't you...
     
  16. lenscas

    lenscas Over-Achiever

    6 I finally got the results of the F# exam. These are the results for the practicum part:
    Total number of people : 130
    Amount of people who passed: 11 (8.5%)
    average grade: 1.72
    My grade: 7
    5% of people scored my grade or higher

    Note, the scale is from 1 to 10 with 10 being the best sore possible.
     
  17. duckfan77

    duckfan77 Well-Known Member

  18. lenscas

    lenscas Over-Achiever

    6 and I just watched an MTG Arena match where the amount of triggers got so out of hand that it took seconds for the game to actually calculate what the triggers where and several minutes for them all to happen.

     
  19. duckfan77

    duckfan77 Well-Known Member

  20. GamerwithnoGame

    GamerwithnoGame Forum Addict

Share This Page