Randomly Generated Tiles & Pathbuilding

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
jfcaron
Prole
Posts: 6
Joined: Fri Apr 12, 2013 7:12 am

Randomly Generated Tiles & Pathbuilding

Post by jfcaron »

Heo, I have an ambitious project to implement a board game idea of mine. The board is a 3x3 grid of tiles which are randomly drawn from a set. The tiles have paths on them, and the connected tiles form closed loop paths. It is difficult to code because the tiles themselves don't automatically know what forms a "closed loop". I have just recently added code that constructs the closed loops from the tiles.

My next goal is to put some sprites on the board that will follow the lines in the closed loops.

I'd welcome any feedback or suggestions.

Edit: uploaded a proper .love file.
Attachments
Transit.love
Transit
(23.64 KiB) Downloaded 366 times
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

Re: Randomly Generated Tiles & Pathbuilding

Post by Hexenhammer »

I don't like the low-res anti-aliased lines. I think they look worse than non anti-aliased ones at that resolution.
jfcaron
Prole
Posts: 6
Joined: Fri Apr 12, 2013 7:12 am

Re: Randomly Generated Tiles & Pathbuilding

Post by jfcaron »

Thanks for the feedback Hexenhammer. I'll eventually do real art and beautifying for the game (with assistance, probably). For now I'm focusing on the programming under the hood. I tried using the "rough" lines instead of the "smooth" lines, but they looked even worse! Maybe my OS is automatically doing some extra stuff to the lines. If I'm using line art, is there a better way than simply using thicker lines/higher resolution?

Graphics aside, I have made some progress. The program now forms the board from the random tiles, then figures out what are the closed loops. It then draws the loops as actual things, instead of as segments on the tiles. I added a simple triangle sprite that moves along the paths and I'm using hump.gamestate to pause/start the animation from point to point. The new version is attached.
Attachments
Transit.love
(24.88 KiB) Downloaded 267 times
User avatar
Ragzouken
Citizen
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am
Contact:

Re: Randomly Generated Tiles & Pathbuilding

Post by Ragzouken »

It's looking pretty cool, what is the general game idea?
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

Re: Randomly Generated Tiles & Pathbuilding

Post by Hexenhammer »

jfcaron wrote:If I'm using line art, is there a better way than simply using thicker lines/higher resolution?
Maybe a different AA algorithm? Sorry, not really my area of expertise.
jfcaron
Prole
Posts: 6
Joined: Fri Apr 12, 2013 7:12 am

Re: Randomly Generated Tiles & Pathbuilding

Post by jfcaron »

It's a board game idea that I had, but it turns out that prototyping and playtesting a physical board game is a lot of work and the materials cost money. It also turns out programming with love2d is pretty fun, so I'm prototyping it as a computer game to explore different mechanics.

The general idea is that players have workers which can pick up & deliver goods for points, but the players don't get the move the workers themselves. There are trains/buses/teleporters/theme-transport-device which the workers can board and disembark from, and when those move (automatically between turns), they take the workers themselves. The workers have to deliver goods further away to get more points. I'm calling it "Transit" because in my head the transporters are either buses or urban trains or some kind of common transport, and the workers live in some sort of post-car society where it's normal to deliver goods via public transport. I guess they could be covert drug dealers/smugglers/software pirates who take subways, but I'm hoping for a family-friendly theme.

The basic mechanics are already worked out, the most I need to tweak is the reward system (points for goods and bonuses).
User avatar
adekto
Prole
Posts: 35
Joined: Thu Dec 06, 2012 11:42 am

Re: Randomly Generated Tiles & Pathbuilding

Post by adekto »

i like the software pirate idea, and a metro transport, but anyway i dont know if u heard of the bord game carcassonne, it got a similar map structure, but its allot more tiles

if i may ask since this is still gona be like a beord game, how wood a game of transit play?
jfcaron
Prole
Posts: 6
Joined: Fri Apr 12, 2013 7:12 am

Re: Randomly Generated Tiles & Pathbuilding

Post by jfcaron »

In the physical board game, each train/bus/metro (I'll just call them vehicles), each vehicle would be assigned to a certain player. When all the players have had a chance to take actions, all of the vehicles need to be moved. The players are responsible for moving their assigned vehicles. In no way are the vehicles "belonging" to the players, it's just convenient to have each player only keep track of 3-4 vehicles, instead of one player needing to move all of them.

In my physical prototypes, the vehicles are 2x8 lego bricks, and the workers are 1x1 lego bricks. When a worker boards, you actually put the worker "on" the vehicle. The goods to be delivered are thin 1x1 dots, which the workers carry on their heads.

In the computer version, there is no need to assign vehicles to players, since the computer can move all of them automatically when needed.

Yes, I've played Carcassonne, and Metro also has a similar connected-square-tiles thing. In those cases, though the connections are important parts of the game and are represented by rails and paths, no actual game pieces travel along those paths (except maybe in a Carcassonne expansion). The unique feature in my game is the auto-moving vehicles that the workers must use.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests