Skip to content

Feature/new game#6

Merged
RomanCantu merged 7 commits into
RobbieKiwi:mainfrom
RomanCantu:feature/new_game
May 25, 2025
Merged

Feature/new game#6
RomanCantu merged 7 commits into
RobbieKiwi:mainfrom
RomanCantu:feature/new_game

Conversation

@RomanCantu

Copy link
Copy Markdown
Collaborator

Create new game.
The logic to generate the assets and transmission in the new game need to be decided. Transmission could come from predetermined topologies (like a library of game maps). The location of the ice cream buses could also be predetermined via game maps or decided by the players and given as input when creating a new game.

Comment thread src/engine/new_game.py Outdated
Comment thread src/models/buses.py Outdated
id: BusId
x: float
y: float
# x: float

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that we need to somehow handle the fact that some transmission lines are more expensive (and maybe has more impedance) than others depending on how far away the buses are from each other.
Either we define X Y coordinates explicitly and calculate distances, or we could use the network distance between the two buses, or current impedance between the two buses or we could say that all transmission lines have the same cost/impedance regardless of distance

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like the idea of length dependent attributes (cost, impedance,...) but can also be complicated to implement it coherently with the visuals and make sure that lines are visually tidy (for instance, Manhattanizing them) in the UI.

Were you thinking about euclidian distances?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in the UI we will need to have diagonal lines. In terms of distance indeed I was thinking to calculate euclidean distance so that it makes sense visually as well. I don't think it would be too much work to make lines that go diagonally and space themselves out and jump over each other etc. It would be good to somehow incentivize connections between close buses rather than lines from one side of the map to the other, for game dynamics reasons and also for visual reasons.
Perhaps we could pre-select the possible transmission line routes? For example you can only connect to the adjacent bus. Or you can only connect to The adjacent bus + 1. But then it might be difficult (or even infeasible) to generate a UI bus layout in which every bus to bus distance is the same and every two bus distance is the same. It would be nice if the impedance of the bus was proportional to the distance on the map but I guess it is not 100% necessary

@RobbieKiwi RobbieKiwi May 25, 2025

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking that maybe the cost of a line should be somehow proportional to network distance^1 or physical distance^2 or something like that

Comment thread src/engine/new_game.py
@RomanCantu RomanCantu merged commit d950488 into RobbieKiwi:main May 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants