Starting new project - top down grid iron - care to collaborate?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Starting new project - top down grid iron - care to collaborate?

Post by togFox »

It's been a few months since I've LOVEd so time to get back into it.

In 2021, I created a top-down grid iron (American football) football game that lets you pause and choose actions - then play and watch the outcome. Real-time with a pause button, I guess.

The best part was it involved top-down circles but those circles used the physic engine and with real life stats about speed and body mass, those circles pushed each other around the field in a way that gave a real feel to the game. The defensive line would hold back the offense, tackles created holes to move through and wide receivers needed speed like in real life.

Anyway - that was my first project - 2 years ago - and I've learned so much since then so going to revive this one and do it better. It will use physics and a db database SQLite. My first attempt used SLAB out of ignorance. This one won't do that.

Happy to take on collaborators that might be interested in learning more about grid iron, physics engine or SQLite. I'll be using github because github is awesome.

I take a pretty structured approach to any project but it typically goes 'organic' after a while. :) Here is the logical flow-chart for the game so far. Not sure if it's readable.

Image

https://postimg.cc/nMZQwpt7

Wish me luck!
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Starting new project - top down grid iron - care to collaborate?

Post by togFox »

So I'm thinking about the structure of the 'tournament' and I've decided, for prototyping. to have 4 teams. 3 of those will be 'bot' or non-player.

I've decided on a round-robin format meaning each team will player the three other teams. The top two will have final round to decide the winner. That means, for prototyping, each season is 4 games long at most.

Now I'm thinking of a 'data structure' to track those 3 or 4 games. Is it as simple as a 7 element array/table that tracks who has played, who hasn't and optionally, scores?

1) team1 vs team2
2) team1 vs team3
3) team1 vs team4
4) team2 vs team3
5) team2 vs team4
6) team3 vs team4
7) 2ndplace vs 1stplace

I guess I'd 'pre-load' that table at the start of the season and just go through the motions, tracking scores and determining the 7th round is as hard as it gets? If this becomes 16 or 32 teams then would I need a smarter way?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
darkfrei
Party member
Posts: 1168
Joined: Sat Feb 08, 2020 11:09 pm

Re: Starting new project - top down grid iron - care to collaborate?

Post by darkfrei »

togFox wrote: Mon Jan 30, 2023 5:48 am So I'm thinking about the structure of the 'tournament' and I've decided, for prototyping. to have 4 teams. 3 of those will be 'bot' or non-player.
<...>
I guess I'd 'pre-load' that table at the start of the season and just go through the motions, tracking scores and determining the 7th round is as hard as it gets? If this becomes 16 or 32 teams then would I need a smarter way?
The easiest way (no GUI):
1. You have a list of players. Amount of players can be 2, 4, 8, 16, 32 or 64 (or higher, any 2^n).
2. Taking two first of them to play the game:

Code: Select all

local playerA = table.remove(players, 1) -- taking the first
local playerB = table.remove(players, 1) -- taking the first after the first
3. After the game, add the winner to the end of list:

Code: Select all

table.insert (players, playerWinner)
4. If the amount of players is 1 then you have the winner of tournament.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Starting new project - top down grid iron - care to collaborate?

Post by togFox »

I think what you described is a knockout format - which is very elegant. In fact, so elegant, I might switch my round-robin format to this!! lolz.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Starting new project - top down grid iron - care to collaborate?

Post by togFox »

Two weeks after my OP I'm very happy with my progress. I know my weak point is not planning out all the necessary scenes and I get discouraged when I need to "add just one more scene" and then another and blah - I quit. The image in my OP (hard to see) is me planning out my scenes and they are now all coded. It's a big win. :)

Now the scenes are largely place holders. They have some raw text printed to the screen and very clunky buttons to move forwards and backwards but the point is - they're all in place and I'm pretty sure I've got them all accounted for. From here on, it's a matter of fleshing out and iteratively improving each scene until the game is finished. (Sounds easy huh!!).

I've also got SQLITE3 for lua working quite well. I lost a few days working out a database locking problem but got that sorted and now know what to look for.

In addition, I can click through all the screens and the game 'plays' in the sense that I start a football game and rng will give me a score/result. There is no interaction. Nothing to watch. Nothing to do - just an instant and meaningless random result. What this does is let me test the 'end game' mechanism and progress through the season. I can then 'play' another game that has another meaningless rng. I do this enough times and I can 'play' a full season and then I can test how the season rolls over and resets to the next season. I'm now at a point were I can pointlessly click, click, click, click and rng my way through an unlimited number of seasons. This tell me that mechanism is done and working.

It was then I realised I have the start of "coach mode" where the player doesn't actually play the game. :) Coach mode will let the player manage trades and manage training and call plays on the field and I guess I accidentally laid the foundations for this coach mode.

Anyway, lots of words and no screenshots to show for it. Achievements after two weeks:
* all the scenes are in place
* save and load game now works
* SQLite database is proven to work well
* the end-of-season mechanics are now coded
* the beginnings of coach-mode is in place

Out of interest - I updated the graphic in the original post. This is what it looks like after coding. It's a little more simplified in the end and I'll take that win!

Image

PS: I adopted the knockout format that darkfrei suggested!
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Starting new project - top down grid iron - care to collaborate?

Post by togFox »

Another fortnight has passed and I've found a comfortable rhythm of doing a little bit of code each night and then stopping. It might be one function or a feature or an image or a sound file but doing a little bit each night lets me finish on a win, not sink hour and hours into my evening, I avoid burnout and I get to think and plan lots between each coding session. There really are no drawbacks except productive and meh - it's a hobby so that's not actually a drawback!!

I now consider my project 'function complete' (almost). It is very ugly and very bare bones but all the functions are there. The features are not - but the functions are. All the functions I want to do can be accessed and invoked through ugly hacks and buttons but they are there (except the 'trading' screen). It is not only a mental milestone but it demonstrates the proof-of-concept. When all the functions are done, I can iteratively improve by introducing and refining features. For example, this project only does 'coach mode' so I'll iterate over that function and add a feature that allows the player to interact and play the game. I'll then iterate over that again and introduce a dumb AI. I'll then iterate and introduce a smart machine-learning AI. It's my way of not biting off too much at one time.

Here are some very ugly screenshots to demonstrate how awful this is atm.

Image <--- I couldn't find a lightweight button/gui library that works
Image <------ this is the "bracket" format for knock-out. Ugly!
Image

I might attach the love file if I can get some semblance of presentation in the next fortnight. Thanks for following. :)
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests