Front Office Football Central  

Go Back   Front Office Football Central > Main Forums > Dynasty Reports
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 07-22-2016, 02:22 PM   #1
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Failing out loud - A python racing text sim

Inspired by Groundhog's excellent diary, I thought I would start my first ever thread after lurking on this site for somewhere in the neighborhood of 15 years.

I have the attention span of a squirrel and I've taken a number of runs at this project. Each time I've found my skill level lacking, so this may end up being a short ride....

To counter that negativity, my last few projects have gone pretty well. I'm starting to feel like I have just enough skill in Python to crudely implement what I want.

My ultimate goal with this project is to create a text sim that's similar to an old game called Grand Prix Manager 2. I've been steering more towards a NASCAR type game world - but I want the world to feel dynamic, with rules changes, sponsors coming and going, etc.

Eventually I want to implement a relationship/personality management aspect into the game, but that may end up being a bridge too far. I'll focus more on general team management in the next prototype.

I want to start with the race day engine for this project. I already know the cars will be rated on a 100pt scale in 4 different areas, and also by track type.

So far, I've created prototypes for the race engine based on:
1) The excellent board game Red White and Blue Racin'
2) A seriously misguided attempt at using a Star Wars RPG dice pool system that....errrrr....didn't go well.....
3) A homemade system that's more of a lap by lap "sim". It's basically a calculation of car and driver performance, which feeds into a "floor" and "top speed" to come up with a result."

My fear with the simulation route is that I may end up losing sight of the fact that I'm trying to make a game....and I have a tendency to keep layering on complexity until it gets silly....

But the prototypes have taught me that the sim route is the path that's feeling the best for me at this point in time.

I'll sporadically post progress and will definitely appreciate any feedback, opinions, advice, etc. from the crew here.


Last edited by SirBlurton : 07-22-2016 at 02:22 PM.
SirBlurton is offline   Reply With Quote
Old 07-22-2016, 02:28 PM   #2
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
I can't wait! This is going to be cool...
GoldenCrest Games is offline   Reply With Quote
Old 07-22-2016, 02:37 PM   #3
SirBlurton
High School Varsity
 
Join Date: Feb 2007
I googled your handle and have to say I'll be keeping an eye on your projects too - they look incredible!
SirBlurton is offline   Reply With Quote
Old 07-22-2016, 05:06 PM   #4
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
Thanks!

Staying focused on my projects is a lot easier when I see other people making progress. I'll be checking in on this regularly, even if I don't have a lot to say.
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 07-23-2016, 07:14 AM   #5
Balldog
Pro Rookie
 
Join Date: Jan 2002
Location: Macomb, MI
Sweet! Following


Sent from my iPhone using Tapatalk
Balldog is offline   Reply With Quote
Old 07-23-2016, 11:04 PM   #6
Young Drachma
Dark Cloud
 
Join Date: Apr 2001
Good luck
__________________
Current dynasty: OOTP25 Blitz: RTS meets Moneyball | OOTP Mod: GM Excel Competitive Balance Tax/Revenue Sharing Calc | FBCB Mods on Github
Young Drachma is offline   Reply With Quote
Old 07-26-2016, 12:46 PM   #7
SirBlurton
High School Varsity
 
Join Date: Feb 2007
This weekend I worked on "scaffolding" for the project.

This means I've:
-created a very rough 2016 data set of drivers, crew chiefs, teams and owners in excel
-created json files for each of these items
-created classes for each item in the data set
-created a rough "Career Controller" class that will hold the team data and control movement between different "phases" of play

I debated whether or not to include the "owner" class because it may tend to make it difficult to readily access team information. I decided to start with it and see how much more difficult it is. The benefit of using it is that down the road, multi-car teams should be easier to handle. Another stock car type game I've been following got some negative feedback on only being able to have one team per owner.

Version 1 is intended to get a really loose version of qualifying working to test out some different mechanics for determining performance. Because it's been on my mind and I like the potential narrative benefits, the first performance mechanic will be to take another run at a die pool mechanic.

Right now, Drivers and Crew Chiefs only have one skill, but that should be adequate for testing.
Will share results once I get the die mechanic up and rolling (literally).
SirBlurton is offline   Reply With Quote
Old 07-26-2016, 01:09 PM   #8
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
I'd love to see more info about the racing engine, and how it works!
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 07-26-2016, 07:22 PM   #9
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
Good stuff - I'll be following along!
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 07-29-2016, 09:58 AM   #10
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
Thumbs up

Don't give up, brother!
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 07-29-2016, 10:32 AM   #11
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Hah - thanks for the encouragement, definitely won't be giving up. I've been playing around with different mechanics for the race engine....probably should have done a bit more of this ground work before posting! Thought I was close but even in a really basic test there were some big issues.

Definitely moving away from the "dice pool" idea within the race engine, I really should have known it would be too swingy in the results generated.

If I'm going to do a lap-by-lap sim (which I'm starting to question more and more) then the mechanic has to be pretty tight.
SirBlurton is offline   Reply With Quote
Old 07-29-2016, 02:02 PM   #12
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
The down and dirty "things didn't go as expected" stuff is sometimes the most interesting!

I'd love to hear more about the race engine development. What's your overall strategy for the race engine?

1. Are you starting with a set of ratings you want to use, and then building the engine to properly utilize them?

-or-

2. Are you building an engine that behaves a certain way, and then creating the ratings you need as you go?

I'm using #2 right now, but I've used strategy #1 before. I'm always curious about how other people do it.
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 08-02-2016, 12:18 PM   #13
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by GoldenCrest Games View Post
The down and dirty "things didn't go as expected" stuff is sometimes the most interesting!

I'd love to hear more about the race engine development. What's your overall strategy for the race engine?

1. Are you starting with a set of ratings you want to use, and then building the engine to properly utilize them?

-or-

2. Are you building an engine that behaves a certain way, and then creating the ratings you need as you go?

I'm using #2 right now, but I've used strategy #1 before. I'm always curious about how other people do it.

Hi, sorry, was away for a few days. I would say that approach #1 is definitely closer to what I'm working with right now.

The only thing I know for (relative) certain is that the cars will be rated from 1-100 in 5 performance categories (Engine, Suspension, Aero, Braking and Transmission). Also debating a 6th category, which would be to represent "internals" that would be checked for reliability.

Each track has a different set of factors that are applied to get the maximum performance possible for that car at that track. For example, Daytona might look like this:
-----------------------
'engine_factor':.35,
'transmission_factor':.1,
'aero_factor':.35,
'braking_factor':.05,
'suspension_factor':.15,
-----------------------

Where a short track would favour braking and transmission...

I'll be using that result as the "max performance", then adding in some calculations on tires and set-up quality to set the max possible "pool" of performance.

Then I'll apply some sort of mechanic to determine driver performance and decide how much of that pool is capitalized on and put to the track. I'm working towards a D6 system of dice rolls, with a bonus pool that replaces the 'low roll'...it's starting to look like this will give me enough stability to be workable - might be "good enough" for now to have reasonable certainty there's a mechanic that will work.

There will also be some variability around set-ups that should help keep things mixed up a bit on race-days (ie - not always the same cars at the front).

Once everything gets calculated, I feed it into a formula that has a "low" and "max" speed to get lap-times. I'm finding that I'll likely have to narrow the field a bit, so possible ways to do that would be to squeeze the range of speeds on the track ratings side, or tighten up the ratings on the cars themselves.

I do need to keep the 100 point rating to work on some R&D ideas I have, so it might just mean the lowest score possible is 50...seems dumb to have a range when you aren't going to use the whole thing, but that's where I'm at.
SirBlurton is offline   Reply With Quote
Old 08-02-2016, 01:17 PM   #14
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
Thumbs up

Quote:
Originally Posted by SirBlurton View Post
a D6 system of dice rolls, with a bonus pool that replaces the 'low roll'

I really like this idea. I've used a similar concept for player progression in the past, but I used a coin-flip. It was far too boom/bust, so I abandoned the whole thing. I never thought of using a Dn roll instead of the coin.

It seems so simple now!
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 08-02-2016, 01:54 PM   #15
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by GoldenCrest Games View Post
I really like this idea. I've used a similar concept for player progression in the past, but I used a coin-flip. It was far too boom/bust, so I abandoned the whole thing. I never thought of using a Dn roll instead of the coin.

It seems so simple now!

Hah, excellent!
SirBlurton is offline   Reply With Quote
Old 08-05-2016, 05:53 PM   #16
SirBlurton
High School Varsity
 
Join Date: Feb 2007
I spent a bit of time this week working on qualifying.

I've really been struggling with how to import packages within Python. I've done a lot of reading and I don't know if I'm just doing stupid things that no one else has ever done or if I'm fundamentally mis-understanding how it works.

There are things where I can import a file from my "main" module it works fine, but if I'm doing a test on a sub-package, it will error in strange ways. I will probably spend some time playing with that, so progress might be slow the next few weeks - will also be away for part of that time.

For now, I thought I would post the outputs of the qualifying module.
Right now, the crew chief selects a qualifying strategy based on a weighted choice. Each chief has their own preference for the strategy to pursue.

A safe strategy lowers the difficulty of setup, but also lowers the performance "ceiling" for the car. This shows how it works, it's basically "total fail" on the left, on up to full success on the right, with the modifier for the target number tacked on at the end.

set_up_dicts={
'very_safe':[60,65,70,75,80,85,-4],
'safe':[55,60,75,80,85,90,-2],
'normal':[45,50,80,85,90,95,0],
'aggressive':[40,50,85,90,95,100,2],
'very_aggressive':[35,50,90,95,100,105,4]}

This factor gets randomized but will be very close to the original value. The randomization is just to keep cars from running the exact same times. It's then multiplied to the car's quality rating to get a race-specific strength.

The the driver rolls against a target number and applies another % to get lap times. The next 2 posts will show examples.
SirBlurton is offline   Reply With Quote
Old 08-05-2016, 05:54 PM   #17
SirBlurton
High School Varsity
 
Join Date: Feb 2007
QUALIFYING OUTPUT - Daytona


Chris Heroy,the chief for Brian Scott, has selected a:
safe qualifying strategy
Roll of 5 vs TN of 6 for difference of -1
Chris Heroy has had a fail in setup for a car quality result of 44.128
Brian Scott has rolled a 6 vs track difficulty of 8.
This is a fail and results in a range of 0.953.
Speed is- 183.53054699550952 mph
Time is- 49.038158210361594 seconds
-----------------------------------
Trent Owens,the chief for Aric Almirola, has selected a:
normal qualifying strategy
Roll of 12 vs TN of 8 for difference of 4
Trent Owens has had a marginal success in setup for a car quality result of 47.7735
Aric Almirola has rolled a 9 vs track difficulty of 8.
This is a marginal success and results in a range of 0.962.
Speed is- 185.61868984232348 mph
Time is- 48.486496740415426 seconds
-----------------------------------
Keith Rodden,the chief for Kasey Kahne, has selected a:
very_aggressive qualifying strategy
Roll of 12 vs TN of 12 for difference of 0
Keith Rodden has had a marginal success in setup for a car quality result of 70.557
Kasey Kahne has rolled a 17 vs track difficulty of 8.
This is a great success and results in a range of 0.972.
Speed is- 190.07533207151354 mph
Time is- 47.349647647143705 seconds
-----------------------------------
Greg Ives,the chief for Dale Earnhardt, Jr., has selected a:
normal qualifying strategy
Roll of 13 vs TN of 8 for difference of 5
Greg Ives has had a great success in setup for a car quality result of 81.7505
Dale Earnhardt, Jr. has rolled a 17 vs track difficulty of 8.
This is a great success and results in a range of 0.974.
Speed is- 191.33319550705065 mph
Time is- 47.03836141004789 seconds
-----------------------------------
Chad Knaus,the chief for Jimmie Johnson, has selected a:
very_aggressive qualifying strategy
Roll of 27 vs TN of 12 for difference of 15
Chad Knaus has had a astonishing success in setup for a car quality result of 87.8985
Jimmie Johnson has rolled a 21 vs track difficulty of 8.
This is a incredible success and results in a range of 0.983.
Speed is- 195.42203118778798 mph
Time is- 46.05417283454382 seconds
-----------------------------------

Last edited by SirBlurton : 08-08-2016 at 11:00 AM. Reason: Edited to non-ridiculous length
SirBlurton is offline   Reply With Quote
Old 08-05-2016, 05:57 PM   #18
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Hah - Didn't mean to post that all....oh, well...
Anyway, here's the field sorted by laptime (I will be rounding at some point!):

Kyle Busch 45.861005393029075
Kevin Harvick 45.900062608173066
Carl Edwards 45.93145261190872
Joey Logano 45.982388078718536
Kurt Busch 46.04616670517925
Jimmie Johnson 46.05417283454382
Denny Hamlin 46.09225731182923
Brad Keselowski 46.10911902496484
Martin Truex, Jr. 46.22154334309419
Tony Stewart 46.42732278189596
Ryan Newman 46.558907401489165
Matt Kenseth 46.579667263193045
Kyle Larson 46.655839003747204
Chase Elliott 46.7424669463177
Dale Earnhardt, Jr. 47.03836141004789
Trevor Bayne 47.292454495368546
Kasey Kahne 47.349647647143705
Greg Biffle 47.43904125981364
Ty Dillon 47.58759203346242
Jamie McMurray 47.592390153710014
Austin Dillon 47.65440264323306
Ryan Blaney 47.71830561584137
Ryan Ellis 47.82878698937223
Danica Patrick 47.91738646381827
Landon Cassill 47.98185048189961
Ricky Stenhouse, Jr. 48.19615972011829
A. J. Allmendinger 48.21267061945694
Clint Bowyer 48.25102935311756
Aric Almirola 48.486496740415426
Michael Annett 48.534063591871664
Casey Mears 48.55044427370316
Reed Sorenson 48.55048594264989
Paul Menard 48.56367808304395
Michael McDowell 48.58279062475753
Matt DiBenedetto 48.591320807784236
Michael Waltrip 48.601851294165506
David Ragan 48.68522184266381
Jeffrey Earnhardt 48.83526222050254
Regan Smith 48.85504373853946
David Gilliland 49.01295405238696
Brian Scott 49.038158210361594
Chris Bueschler 49.194708901609886
Josh Wise 49.218075625064294

Last edited by SirBlurton : 08-05-2016 at 05:57 PM.
SirBlurton is offline   Reply With Quote
Old 08-05-2016, 06:37 PM   #19
Young Drachma
Dark Cloud
 
Join Date: Apr 2001
Keep up the progress!
__________________
Current dynasty: OOTP25 Blitz: RTS meets Moneyball | OOTP Mod: GM Excel Competitive Balance Tax/Revenue Sharing Calc | FBCB Mods on Github
Young Drachma is offline   Reply With Quote
Old 08-08-2016, 09:13 AM   #20
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
Maybe you already addressed this in another thread, but what made you go with Python for this game? (I've never used Python before, so I don't know what it's strengths are)
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 08-08-2016, 09:21 AM   #21
tarcone
Coordinator
 
Join Date: Jul 2004
Location: Pacific
This is awesome. Following
__________________
Excuses are for wusses- Spencer Lee
Punting is Winning- Tory Taylor

The word is Fight! Fight! Fight! For Iowa

FOFC 30 Dollar Challenge Champion-OOTP '15
tarcone is offline   Reply With Quote
Old 08-09-2016, 03:18 PM   #22
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by GoldenCrest Games View Post
Maybe you already addressed this in another thread, but what made you go with Python for this game? (I've never used Python before, so I don't know what it's strengths are)

Honestly, the only reason is because it's the language I've been teaching myself. I've read things that worry me about being able to package it at the end of the process but honestly, right now it's more about learning.

I've thought about trying other languages and have made a few half-hearted attempts but it always feels like a big step back to start over. I definitely know I would learn faster with the things I've learned but just seems like a drag...
SirBlurton is offline   Reply With Quote
Old 08-09-2016, 03:30 PM   #23
SirBlurton
High School Varsity
 
Join Date: Feb 2007
As an update, I think I'm ready to call version1 "done". My goal was to set out a basic qualifying system and build a basic version of the framework of classes and data that I want to use.

One lesson I learned is that I really need to tighten up the ranges of values that I'm using. Definitely some of my values are WAY too drastic to be workable, so I'll be doing some testing on how to best do that.

I also decided to re-structure project layout while it's still early. I keep running into errors of different machines because of how my folders are set up, so for now all my files will be in one directory. When it comes time, I'll have to rework import statements but I find I'm wasting way too much time on it right now to justify a "pretty" folder structure.

Goals for "Version 2":
Implement basic race engine
-Fuel
-Tyres
-Set-up and impact on performance

Work on system of assembling a car
  • For initial testing, these may be handcrafted or at least generated within a range
  • Cars might be classified as "Elite" then get performance within a range for now
  • In future, the player will be picking parts to assemble a car

Design work
One of my goals with this project is to incorporate some sense that your time is finite. There will be (hopefully) interesting decisions to make in terms of how to negotiate with suppliers or sponsors, conducting R&D, setting up the car, etc.

I really want to build a system where the AI is capable of making the decisions to run the team on their own. Your role is to provide direction in the areas you think you can do the most good.

So, I'll spend some time away from code thinking about that and how it would work best. This is definitely the biggest risk area for this project because I don't know much about how to build AI.

Might be I just end up with a game that has a bunch of cars running around in text-based circles - but I'm hoping it will be more! Will be away for about 10 days, so progress will be slow for a while.
SirBlurton is offline   Reply With Quote
Old 08-09-2016, 10:00 PM   #24
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
Great stuff!

Quote:
Originally Posted by SirBlurton View Post
I also decided to re-structure project layout while it's still early. I keep running into errors of different machines because of how my folders are set up, so for now all my files will be in one directory. When it comes time, I'll have to rework import statements but I find I'm wasting way too much time on it right now to justify a "pretty" folder structure.

I think I might know what the issue you are having here is, always happy to help anyway, if I know the answer at least.

Have you decided on a UI at all as yet, or are you printing to the terminal at the moment? I would recommend at least having separate folders for your "game logic" scripts and your UI scripts, and keep the info passed to your UI as generic as possible, let the UI stuff handle all the display-related coding because you can pretty easily swap it out at a later stage if you want to port it to a different UI framework.
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 08-10-2016, 08:57 AM   #25
GoldenCrest Games
High School Varsity
 
Join Date: Jul 2016
Thumbs up

Quote:
Originally Posted by Groundhog View Post
I would recommend at least having separate folders for your "game logic" scripts and your UI scripts, and keep the info passed to your UI as generic as possible, let the UI stuff handle all the display-related coding because you can pretty easily swap it out at a later stage if you want to port it to a different UI framework.



You won't regret it! (especially when you need to make major UI updates)
__________________
Live Chat!
YouTube Channel
GoldenCrest Games is offline   Reply With Quote
Old 08-10-2016, 12:58 PM   #26
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by Groundhog View Post
Great stuff!



I think I might know what the issue you are having here is, always happy to help anyway, if I know the answer at least.

Have you decided on a UI at all as yet, or are you printing to the terminal at the moment? I would recommend at least having separate folders for your "game logic" scripts and your UI scripts, and keep the info passed to your UI as generic as possible, let the UI stuff handle all the display-related coding because you can pretty easily swap it out at a later stage if you want to port it to a different UI framework.

I would absolutely love any insight you have on it! It drives me crazy when it works just fine on one computer, then tanks on another. I've been using the WinPython/Spyder IDE which is supposedly "portable" - but even there it will occasionally start throwing out import errors on me when I move between laptops.

I'm itching to get going on UI but I really want to try to make terminal work for a while longer yet. I find the UI stuff takes on a life of its own once I get going on it...I'm still debating Kivy vs PySide vs PyQt. But your points on separate folders for it are definitely well taken...I've had a few "learning experiences" on that on previous projects.

I am still muddy on how to set that up properly. In the past, I'd have my "main" function, where I'd initialize the UI and my "game class" and hook everything up there.
SirBlurton is offline   Reply With Quote
Old 08-10-2016, 08:38 PM   #27
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
I have mine setup similarly - a 'main' function in the top-level folder that initializes the PySide QApplication and my main game class. But I think you're probably going about it the right way by focusing on the the game logic for now.

Kivy is really excellent, but the lack of things like 'Qt'-esque TableViews (at least back when I last checked... maybe that's changed) limits it for a 'traditional' text-heavy sim.

I haven't used WinPython/Spyder, I actually paid for the full verrsion of PyCharm because I liked it so much when I first tried it. If I had to guess, I would think the issue is your PYTHONPATH settings on the two machines. Are you using a virtual environment, and if so, is the project configured to use the same virtual environment on both machines?
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 08-10-2016, 10:52 PM   #28
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by Groundhog View Post
I have mine setup similarly - a 'main' function in the top-level folder that initializes the PySide QApplication and my main game class. But I think you're probably going about it the right way by focusing on the the game logic for now.

Kivy is really excellent, but the lack of things like 'Qt'-esque TableViews (at least back when I last checked... maybe that's changed) limits it for a 'traditional' text-heavy sim.

I haven't used WinPython/Spyder, I actually paid for the full verrsion of PyCharm because I liked it so much when I first tried it. If I had to guess, I would think the issue is your PYTHONPATH settings on the two machines. Are you using a virtual environment, and if so, is the project configured to use the same virtual environment on both machines?

The Qt TableViews are definitely easier to use (for me at least) than Kivy. I have found a couple of things online that implement "table like" data - but Qt is definitely tailor made.

I am definitely not using a virtual environment - that's one of those "humbling" areas for me right now....I will look into the PYTHONPATH...now that I think about it, I might have been using Wing IDE on one of the computers, which would definitely have a different path....thanks!
SirBlurton is offline   Reply With Quote
Old 08-10-2016, 11:45 PM   #29
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
A virtual environment is really nothing more than a dedicated install of python specifically for your project. I would highly recommend doing it, and this has the simple steps (assumes you have pip installed):

Virtual Environments — The Hitchhiker's Guide to Python

What I do whenever I make a project is create a folder for my project, and then run the virtualenv venv command under that directory to create a subfolder named 'venv' that has my project's python interpreter within. You activate this Python instance when you launch the "venv/bin/activate" command and the problems you are seeing with your imports should vanish regardless of which machine you run it on. Most IDEs will allow you to select this virtual environment for when you launch your script within the IDE.

The main advantages are that you keep your project's python "clean" with particular versions of all your packages, and if you then install something down the track or upgrade your main python install you aren't going to risk breaking your project because one of your 3rd party packages isn't compatible with the latest python.
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 08-11-2016, 11:34 AM   #30
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Thanks, I will read up on that!

Going back to an earlier comment you made, you said you keep your UI code in separate "folders" - did you mean literally just a folder, or is it a package (with an __init__.py file in it?)
SirBlurton is offline   Reply With Quote
Old 08-11-2016, 07:58 PM   #31
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
Yes sorry - definitely packages.

My UI projects usually look like:

Code:
my_project |-- run.py # Main script to launch the project |-- view # package containing all my UI code |-- model # package containing all my saving/loading code |-- controller # package containing all the 'game logic' |-- assets # Just a folder where I store images/csv files etc. |-- venv # virtual environment
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 08-22-2016, 01:21 PM   #32
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by Groundhog View Post
Yes sorry - definitely packages.

My UI projects usually look like:
...

Thanks for that, will definitely use as a guide!

Just back from a vacation in the Rockies. Got zero coding done but definitely thought about what I wanted to do.

As I thought more about the sim engine, I was starting to realize that it will take on a life of its own. I have a bunch of ideas but they all will be highly complex to balance and implement.

With that in mind, I'm flip flopping again. I will take another run at a design/prototype of a more abstracted system. I mentioned earlier in the thread that I really like the board game Red White and Blue Racing by Plaay Games.

It's a great design and really builds a nice narrative for the race. My main problems with it were:
1) Didn't love the way mechanical issues were triggered
2) Cars would drop and climb in the standings faster than I would like
3) Qualifying is a bit too random
4) Limited decision making for players (more a replay style game)
5) Static driver cards meant drivers/cars would perform the same on every kind of track

When I think about the intent of the game I want to make, it's about managing a team, not a race. Most of the ideas I have for the sim will make it very much a race day management activity....

So, I think I will take another run at designing a prototype that's a bit more abstract in how it resolves races. If I don't like how that's coming together, I can always revert to what I've built in the first prototype.
SirBlurton is offline   Reply With Quote
Old 03-10-2017, 05:55 PM   #33
SirBlurton
High School Varsity
 
Join Date: Feb 2007
And just like that, almost half a year passes.

I've been continuing to work on learning Python, mostly on learning a bit more about databases and a little bit more on GUI. I don't feel like I've necessarily "wasted" my time with learning but I'm starting to get the itch to put things into practice again.

Self-teaching yourself to program very much feels like "scaffolding" - you can reach a certain level, then stall and have to go back to basics to start building so you can reach that little bit higher next time. When I look at my first projects vs today, it's very evident my skill level is growing. Still a "rookie" but learning.

I played with a bunch of different prototype ideas before stepping away from this project. I think I'm ready to step away from the idea that I will be able to (or have the desire to) build a realistic sim engine. Playing Motorsport Manager has opened my eyes to the complexity that lies down that particular route - and I don't think that game is actually super deep.

So, I think I'm ready to re-commit to pursuing the project with the more "board game"-like race engine. I really want this game to be about managing personalities and team members more so than heavy race strategy.

Anyway, not much to show at this point - but have been dabbling with a few ideas that hopefully can breathe some life back into it.
SirBlurton is offline   Reply With Quote
Old 03-21-2017, 06:51 PM   #34
SirBlurton
High School Varsity
 
Join Date: Feb 2007
It's.....ALIVE....

So, I decided to dive into trying the board game approach. I've been keeping my note book of ideas to try to make a dynamic field of cars - but decided the first step was to re-visit the "text only" conversion I'd worked on of the Red White And Blue racing board game.

After a couple days/evening of plunking around, I have the qualifying module mostly complete....I'm not really an expert at posting - I have screenshots but not sure how to attach them...will see if I can figure it out...



Here's a screen showing confirmation of track selection and driver set details:

Last edited by SirBlurton : 03-21-2017 at 09:33 PM.
SirBlurton is offline   Reply With Quote
Old 03-21-2017, 09:35 PM   #35
SirBlurton
High School Varsity
 
Join Date: Feb 2007
A view of the output from running the "TV List" - next step is to hook up the log so this is on the screen, not as debug statements:



And then a final image showing the field ready to roll out for the Capital City 400:

SirBlurton is offline   Reply With Quote
Old 03-21-2017, 09:38 PM   #36
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Obviously still pretty rough - but again, this is mostly a test project to have the framework for a more dynamic game (ie changing details about the field of cars and tracks on the fly).

Things like changing the number of cars in the field based on the year will be implemented too.

Anyway, snapshot of progress...the exciting part about just having qualifying done, I can output to a spreadsheet and do qualifying in about 15 seconds instead of 15 to 20 minutes
SirBlurton is offline   Reply With Quote
Old 03-23-2017, 01:23 AM   #37
Groundhog
Coordinator
 
Join Date: Dec 2003
Location: Sydney, Australia
Hey, looks great! Well done.
__________________
Politics, n. Strife of interests masquerading as a contest of principles.
--Ambrose Bierce
Groundhog is offline   Reply With Quote
Old 03-27-2017, 06:45 PM   #38
SirBlurton
High School Varsity
 
Join Date: Feb 2007
Quote:
Originally Posted by Groundhog View Post
Hey, looks great! Well done.

Thanks very much - always nice to get some feedback - definitely not up to standards of your project but I'm really forcing myself to just get through logic/etc. Moving stuff around is pretty trivial with QtDesigner.

Made some additional progress:
-added 2016 real life track set
-"Hooked up" qualifying messages
-Used the configparser module as a test case for how to improve the reports - tested on TV Interview section and I really like how it turned out, will be revisiting other sections later with same approach

-set up my basic race screen - next step is going to be slow as I've decided to re-write my race engine logic - hoping it will be quicker with the base I have working (it works as text only)
SirBlurton is offline   Reply With Quote
Old 03-27-2017, 06:49 PM   #39
SirBlurton
High School Varsity
 
Join Date: Feb 2007
And some screens:




SirBlurton is offline   Reply With Quote
Old 04-25-2017, 06:18 PM   #40
SirBlurton
High School Varsity
 
Join Date: Feb 2007
I've been working away at this project for the last little while.

Finally at a place where I have the race module 99% implemented - but still need to do a lot of testing. Before I move on to implement the ability to run a full season, I think I'm going to run another dynasty where I manually play out the races.

Next steps:
1) Testing/debugging
2) Enter more tracks/driver data
3) Start working on season and fictional modes
4) Implement save game functionality
SirBlurton is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 01:02 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.