Good vs. Evil

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

  1. lenscas

    lenscas Over-Achiever

  2. duckfan77

    duckfan77 Well-Known Member

  3. lenscas

    lenscas Over-Achiever

    11 and I made a simple point/coordinate struct.
    It isn't much but it allows me to more easily work with coordinates as I used to just use tuples and it has some nice functions already. All of which are subjected to automated testing using doc tests.

    Now, time to expand the PointWithItem struct to expose similar methods as the point struct. Just with also exposing a way to set the contained item and stuff. I probably should also look if I can easily implement .map and all that fun stuff on it :)
     
  4. GamerwithnoGame

    GamerwithnoGame Forum Addict

  5. lenscas

    lenscas Over-Achiever

  6. GamerwithnoGame

    GamerwithnoGame Forum Addict

    10. The second season of ST Discovery is really quite good.
     
  7. lenscas

    lenscas Over-Achiever

    11 so... it turns out that the code I copied to create diagonal lines is bugged. It also turns out to not exactly be the easiest algorithm to implement so I may decide to just remove it all together.

    As a work around I just decided to limit the player to selecting horizontal and vertical lines only. Also, I added code allowing the player to place "walls". So.... here is a picture of how the "game" looks right as of now:
    upload_2019-6-25_20-15-45.png
    the white square is supposed to be the square that your mouse is hovering over. No idea why it isn't covering a whole square, that somehow broke when making the screenshot.
    the indigo lines= walls that are placed
    orange =ground/dirt
    green = grass
    blue=water
    gray = stone

    next on the list is to add random terrains, rather than this rather obnoxious pattern that I only used so I could test if scrolling and zooming worked.
    After that, a way to place characters which move around randomly. Then, making them unable to move through certain cells.

    Also, fix that weird mouse position problem......
     
    GamerwithnoGame likes this.
  8. duckfan77

    duckfan77 Well-Known Member

    10 I very much understand creating a point struct/class, I've done so myself to make dealing with them easier.
     
  9. GamerwithnoGame

    GamerwithnoGame Forum Addict

    9. One episode of Star Trek: Discovery season 2 left to watch...
     
  10. lenscas

    lenscas Over-Achiever

    10 generating the terrain may be harder than I hoped it would be.....
    [​IMG]
    I found a crate that implements various kinds of noise algorithms. I was hoping I could just use those as if but clearly, I can't.
    For those interested, the crate that I use is https://docs.rs/noise/0.5.1/noise/#structs
    and my code to turn the returned floats into my terrain types is:
    Code:
    let num = num +1.0;
    if num <=0.5 {
    CellType::Water
    } else if num > 0.5 && num <=1.0 {
    CellType::Grass
    } else if num > 1.0 && num <=1.5 {
    CellType::Ground
    } else {
    CellType::Stone
    }
    
     
  11. GamerwithnoGame

    GamerwithnoGame Forum Addict

  12. lenscas

    lenscas Over-Achiever

    10 managed to make it a lot better:
    [​IMG]
    and a weird one
    [​IMG]
    They aren't the most impressive maps yet but its good enough for now :)
     
  13. duckfan77

    duckfan77 Well-Known Member

    9, yeah, complete random noise isn't going to work well, you need some more order
     
  14. lenscas

    lenscas Over-Achiever

  15. GamerwithnoGame

    GamerwithnoGame Forum Addict

    9. Busy day today.

    Could someone help me carry on with the Up To 9000 thread?
     
  16. lenscas

    lenscas Over-Achiever

    10 and I now have a square that walks around semi randomly on the map. It can not go through walls and its speed is depended on its own walk speed and the cell type that it is currently standing on.

    edit: I decided to deploy the project to github pages. https://lenscas.github.io/arena_keeper_quick/index.html
     
    Last edited: Jun 27, 2019
  17. GamerwithnoGame

    GamerwithnoGame Forum Addict

    9. busy day indeed
     
  18. lenscas

    lenscas Over-Achiever

    10 and another massive cleanup pushed.

    This time I didn't really touch any code but just started using pub use and cleaned up every use statement. The result? 17 files changed, 206 additions and 140 deletions.
     
  19. duckfan77

    duckfan77 Well-Known Member

    9 More swimming today
     
  20. GamerwithnoGame

    GamerwithnoGame Forum Addict

    8. *sings* # Just keep swimming... #
     

Share This Page