View Single Post
Old 08-21-2017, 01:45 PM   #32
nilodor
College Benchwarmer
 
Join Date: Oct 2000
Location: calgary, AB
Ok so I did some screwing around and I've decided that the next thing I should work on is getting it so I can generate a roster of athletes for a country. Then put them in a race.

I've just put together a very simple dodad:



What I'm planning on doing is making a database file that will contain all of the country information (flag, text colour, background color, the later ratings and such).

I just used some simple code:

Code:
import sys import CountryHome from PyQt5 import QtWidgets, QtGui class CountryApp(QtWidgets.QMainWindow, CountryHome.Ui_MainWindow): def __init__(self): super(self.__class__,self).__init__() self.setupUi(self) self.updateLabel() def updateLabel(self): self.label_2.setPixmap(QtGui.QPixmap(":/flags/flags/shiny/64/flags/flags/shiny/64/Antarctica.png")) self.label.setText("Antarctica") self.label.setStyleSheet("QLabel { color: rgb(255,255,255);" "background-color: rgb(0,0,0)}") def main(): app = QtWidgets.QApplication(sys.argv) form = CountryApp() form.show() app.exec_() if __name__ == '__main__': main()

What I will have is a list of athletes down at the bottom, from which you can select them to put them in a race.

Later what I'm thinking is this will serve as some sort of home screen, there will be a tab for country stats, athletes roster, training, staff, etc.

The real game portion will be in how you can improve your country. I'm envisioning something where you select a country, say Canada. At the start each country will receive a grade, one in interest level (how popular the sport is), available funding, infrastructure, historic success, and maybe some others.

So for Canada funding might be a B+ (rich country, lots of corporations that could sponsor athletes), interest might be a C (not super popular, would be behind hockey, football, soccer, baseball, basketball, skiing, in popularity), infrastructure might be a B, historic success B+.

All of these things will go into generate the athletes you can receive and how well they can develop. The more interest, the more likely top athletes will choose track, the more investment you can get (national or corporate), the more the athletes will develop, the better they do, the more interest arises, etc.

Some countries would be very easy, like the US, some would be almost impossible, like Palau, while some may be interesting, like India.

Anyways, that's a long way ahead, for right now I'm still thinking about things like how do I open a Qwidget in a QMainWindow, and how can I switch tabs in a window. I think I need to redefine crawl, walk, run to sit, crawl, walk, run, because I'm about as far from running as I can be right now.
nilodor is offline   Reply With Quote