Weekend Stories ( part 1 )
- Theodoros Doukoulos
- Aug 27, 2022
- 4 min read
So apparently, I woke up and felt like coding a little bit.

( Ups, that is way too little I guess )
Anyway…
But just a little bit. Since I knew that I must do my design things first to be satisfied.
In any case as a continuation of the previous post, I always wanted to build some nice game with turn-based mechanics, variety of classes ( some nice surprises will come in a future post about this section ), with multiple spells that would be selected from a pool freely ( kinda ), and that the units would be organized in teams.
Sounds COOL, doesn’t it ?
--no response from anyone—
Oh, darn I must make more posts I guess to even hope for an answer.

So I opened my favorite software of developing fast game prototypes ( Unity ) and I started by making the typical C# file where I wanted to start coding. Turned on the volume of my YouTube which was playing the most amazing chill step playlist of all time and…
“They were afraid of him…”
??
!!
Oh yeah, I was silly. I have forgotten some NBA video on with comments about MJ ( my GOAT ) and his ruthless approach of destroying every single one of his opponents. Love the NBA world.

-Brain : Ahem! How about then show to the world how much you love the NBA??
-Me : What on earth do you want again? How about letting me start a project for a start.
-Brain : Ok. Let’s go again. N B A !!! The League. DA LEAAAAGUEEE!!
-Me : Da jaaaaa. (Images of a league of teams which consist of RPG heroes come into head).
5 minutes passed and I was already thinking about the most important part of my project. The one that usually people that want to do a very fast prototype do last.
-Brain : Shut up and work.

Ok ok. Jeesusss!
So yeah, I decided to develop first the algorithm that would generate the schedule of the teams of the league. Thought I had some questions in mind.
1) How many divisions shall I have? Since the NBA has 6 divisions.
2) How many teams per division since the NBA’s divisions have been of varying size through the years.
3) How many matches are going to be played and according to what kind of pattern.
So as of 27-08-2022 the NBA has 6 divisions. Oh, that is super cool, I thought. For some reason 6 is a number I like when playing with such datasets. And the number of teams is 5 per division. NOOOOOeeess! Ok that is easy. I will just increase the number to 6. So, 6 divisions times 6 teams we have 36 teams. Nice!
And every team should get a win or lose rating according to the NBA formula. That is super nice. A little bit complicated for some but believe me it is dead simple.
Lets say we have two teams. Teams A and B! Team A has won 8 out of the 10 games and this means its record is 8-2. Team B has won 6 out of the 10 games and this makes its record to 6-4.
Now the formula (TeamA wins – TeamA loses ) - ( TeamB wins – TeamB loses ) / 2
((8 -2) – (6 -4)) / 2 = 2 And this calculates our GB or games behind formula. Some say that this is not enough, and that we may also need to know win percentage to be able to give more persistent statistics data …. ( BOOOOOM ).
Yeah, this is where my mind cracked. Since I realized that this is something that I love. Generating frameworks that are so data driven and can be manipulated to give to a variety of apps this data to be presented. Sweet.
So, then epiphany came.
I want the project to be able to:
a) Be run on a server so that I can feed multiple clients(web, desktop or mobile) with this data.
b) Be able to generate data that are needed and provide statistics depending on the user’s liking using feature toggles.
Wow so this means that I will not use Unity as my main development tool. I am quite far from it.
I opened Rider and I created a .net core lib project to start with the basics.
And right away I created a Test project and installed all (lolz) the dependencies needed for XUnit.
I also added this beautiful library that I am planning to include in my Unity project as well ( I will need some sort of client at the end of the day, right ? ) The cscore Library | cscore (cs-util-com.github.io).
Please check the repo. It is cool and very nicely documented.

So wow wow wow. How about the league ? Of yes the League. So apparently, I needed to start with how many matches I would like the teams to play together.
And I came up with this pattern.
The schedule should be 4 matches with each of the teams in your division 4 * 5 = 20 GroupA
2 matches with each of the rest divisions 5 * 6 * 2 = 60 GroupB
total = 20 + 60 = 80 total matches.
Composition in schedule must be A - B - B - B - A - B - B - B - B - A - B - B - B – A
Not bad right? So practically now I have started a weekend project.
A weekend project just for what Theo?
I am a geek. Quite a big one. And writing software is part of my life not because of my job. But because I like what I do. So why not ?
There is always something wonderful down the road!
Till the next time…
(Next post) What kind of classes would I include in the game starting with the “Fighter” and all its tricks (😉)! POSTSCRIPT: Original Text: Theodoros Doukoulos Pictures: memegenerator.net and google images.
Post Disclaimer: Any images’ owners that they believe they deserve credit from the pictures posted on this post please contact me and I can add you to the list.
Comments