I have a high-score application for my game. Where I store players' skill level, experience. I have a total of 26 fields like attack level, defense level etc.
Now I want to implement a weekly high-score section, where only weekly achievements will get stored.
This is how I'll get data to store in weekly table:
Current Level* - Old level** + Data from weekly table***
*Which I get through a GET request
**Data from main table
***Because we'll be updating the main table with current table, so we add what's already in weekly.
If you're unclear of what exactly I want or am trying to say Look at this website, I'm making a replica of this.
So, what would be the best way to do this?
I was thinking like, storing the current+7 days miliseconds and then make a check in my storeData function and if the time has lapsed archive the data in weekly table to some another table and truncate the weekly data for new data.
Although I'm not sure how to do half of the things I stated above. I'm new to django and Python.
I'm using Django 1.8 with SQLite
Aucun commentaire:
Enregistrer un commentaire