Hello, Tesselation

So progress is super slow as i have little to no time, but i have now had some time to think about what shape i want the “grid” of my map to be.

PS: I am thinking about making a game with diplomacy inspired rules, so each turn you queue up an action, and at the end of a “tick” the actions are executed in parallel. The intrigue of this comes in that if two forces have equal attack-score, which they do. (1 unit per square, 1 unit = 1 attack or defense). But you can get other troupes or friendly troupes to “give aid” in your attack or defense. So how many neighbors each square has should drastically change the nature of the game. BUUUT, I’m still a programmer and require something that is easy to generate and tessellates, because the alternative would be that i create a dynamic, organic map with my human brain. And that’s not how i function.

These are our candiates

Triangle

Tesselation_triangle.jpg Neighbors: 12

Square

Tesselation_square.png Neighbors: 8

Hex

Tesselation_hex.png Neighbors: 6

Octo

Tesselation_octo.png Neighbors: 8 4 diagonal and 4 cardinal

Looking at the numbers alone it seems that Octo and Square are in the same league, but i like that Octo gives you an offset of 0.5 on every other line. This makes it harder to create “battlefronts”, so hopefully this will make you defences less static, creating a more unstable game, setting the stage for more interesting interactions.

Got something working today, where each cell also know who it’s neighbors are Screenshot_20211122_213217_webrts_hex.png

Hopefully i will get more done later, who knows.

Hello, WebRTS04

Yesterday i said that i will have to focus on core game play going forward, so i have used what little time i have today to make the background more colorful. WebRTS_04.gif

I tried to fix so it pans with the camera, not easy. So Look at this neat paralax effect to show the grand size of space.

Hello, WebRTS day 3

Day 2

WebRTS_02.gif

Day 3

WebRTS_03.gif

Hello duckies🦆

Now day 3 is coming to a close i’m facing steady progress, i think it’s time to put an end to that. I will have to do something which is the bane of many projects and a stopper for any popper enthusiasm, create a spec💀!

I did imagine this project to be a async multiplayer game, and was thinking i could write a REST api and just do HTTP request for all communication.

But i don’t know how to make this design “turn-based”.

Like the transport routes, should they show the travel path as segmented parts? ✔️ probably And planets should they gain “energy” every turn or wait a set amount of time to give a bigger amount? I guess this is game design, and my mantra for this project was to create something so easy, i could iterate quickly. So to a certain extent i think getting an MWP together is the way to go. I will let that be my guiding principle.

Lets now try to define what this MVP should contain:

  • We have unmoving “Planets” scattered around
    • These generate “Energy” when “Owned”
    • A player can send energy from one planet to another with transportships
      • Doing that to an unowned planet will lay claim to it
      • Doing that to an “enemy” will claim if the sendt energy is bigger than the stored energy in the planet
  • Complete monopoly or biggest empire when timer runs out is victor
  • The game will move in “ticks”
    • One tick can be each hour during waking time
    • Users can submit their move at any time in between ticks
    • It will be executed at the time the next tick starts

That is the spec for now, tomorrow i will have changed direction. Stay tuned….

Hello, WordPress

I’m currently in the process of setting up a more streamlined bloggin pipeline from my trusty emacs config. Hopefully this will enable me to share snippets and thoughts for my own sick pleasure.

Currently i’m working in spacemacs and org mode, i will check if some features are working

for x in range(0,10):
    print(x)

OMG yes it can print code with syntax, this is the best shit 🙂

#[system(for_each)]
fn pathfinding_human(
    _human: &Human,
    transform: &mut Transform,
    pathfinding: &mut PathfindingAgent,
    #[resource] _view_rect: &CamViewRect,
) {
    if pathfinding.path.is_empty() {
        let result = astar(
            &crate::util::Vec2::to_ivec2(transform.position),
            |&pos| linear_successors_ivec2(pos),
            |&pos| pos.distance_to(pathfinding.target),
            |&pos| pos == pathfinding.target,
        )
        .unwrap();
        println!("PATH IS: {:?}", result);
        pathfinding.path = result.0;
    }

    let cur_position = transform.position;

    let dir: crate::util::Vec2 = IVec2::to_vec2(pathfinding.path[0]) - cur_position;
    println!("Direction :{:?} \n Mag:{:?}\n Norm:{:?}", dir, dir.mag(), dir.norm());
    if dir.mag() > pathfinding.speed {
        // if transform.position.to_ivec2().distance_to(*pathfinding.path.first().unwrap()) == 0 {
        transform.position += dir.norm() * pathfinding.speed;
    } else {
        println!("Popping point on path: {:?}", pathfinding.path);
        transform.position = pathfinding.path[0].into();
        pathfinding.path.remove(0);
    }
}

Hell yea, thats some saxy saxy shit