Jump to content
  • Advertisement
darrin k

C++ structure of a text based football game in C++

Recommended Posts

Okay this should not be too difficult but a simple lookup table looks like the right solution. I am struggling in how to best organize the data because it seems like it would be a huge table.

I have separated four tables here in the spreadsheet, where team would be the index.One table would hold the numerical ratings, one table with the distance, one table with the number of downs, and another with the playcall. To calculate every scenario  between every team with each down and distance combo and playcall would be a massive table ???

image.thumb.png.9574c3e843379617f157bc0cb36c3519.png

image.thumb.png.7ffb43bc0ac3bb06b5288933cb61cdec.png

 

 

 

 

Ai combo.xlsx

Edited by darrin k

Share this post


Link to post
Share on other sites
Advertisement
Quote

To calculate every scenario  between every team with each down and distance combo and playcall would be a massive table ???

This is what I was talking about earlier when I recommended considering algorithmic solutions.

As I alluded to in my initial reply, when something can reasonably be represented using data rather than code, representing it as data can have some advantages (especially in languages like C++ that can have a relatively slow build process). However, if you find yourself needing to generate an impractical amount of data, that may be a sign that some of what you're wanting to express as explicit data could better be expressed algorithmically and/or via relationships or formulas.

Edited by Zakwayda

Share this post


Link to post
Share on other sites
13 hours ago, darrin k said:

I have separated four tables here in the spreadsheet, where team would be the index.One table would hold the numerical ratings, one table with the distance, one table with the number of downs, and another with the playcall. To calculate every scenario  between every team with each down and distance combo and playcall would be a massive table ???

Computers are very good at storing insane amounts of data, and computing everything really fast. In other words, don't make the table yourself, write a program that performs the computation given some input data.

If your input data can be systematically computed from other input data, you can repeat this trick of course.

 

I think the bigger problem is what to do with the huge amount of numbers. People are bad at finding their way in numbers. I think you should spend some time on how you're going to present the computed result to a user.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!