|
Post by Mongo the Destroyer on May 28, 2023 17:52:17 GMT -5
On the pictures front, wouldn't it be easier to have users download their own picture packs? Then when the game runs it just checks if they have the file or they can connect to it or something? That'd take the onus off of the servers, and allow for a lot more modding without flooding the server
|
|
|
Post by ViciousLothario on May 29, 2023 2:54:24 GMT -5
On the pictures front, wouldn't it be easier to have users download their own picture packs? Then when the game runs it just checks if they have the file or they can connect to it or something? That'd take the onus off of the servers, and allow for a lot more modding without flooding the server Not really Mr. Mongo, it could be possible but I would never ask to a webpage to look for the source of the files in another computer. There is a lot of security/privacy problems regarding that front. I will just use an outside source for the files. Let's say I use a app like Google Drive. I create a folder named msp_pictures and inside of it I put all the worker pictures for certain scenarios. I only need to save in the database record of Chris Jericho 'msp_pictures/Chris_Jericho.png'. Then when I load up Chris Jericho profile the url would be pointing to drive.google.com/blablablabla/blablala/msp_pictures/Chris_Jericho.png. The payload and tax is not on the server. But on google drive. The server will request for a file in a external source, pretty much like it happens here on the boards, when you post a image on a reply, you point to another server url, so files aren't saved on XHF server and won't consume XHF space.
|
|
|
Post by ViciousLothario on May 29, 2023 3:36:09 GMT -5
Entry #8: Building the database
Database, database, database.. Well building a database isn't exactly hard but usually when you start building a database or database schema you tend to think a lot about what values do you really need to store in them. Just like it happened in the workers database where I made countless changes. Sometimes I am over-planning. Sometimes I think I'm making things too simple, or that I could do better than a ripoff of what is already on the market. But yesterday, being Sunday and having a lot of free time, I just went with the flow.
Let me explain the thought process going into a database.
What info do we need to run EWR? We need wrestlers. And what do wrestlers need, to be a wrestler? They need to have their skills, their popularity, bla bla. Great so now we have wrestlers. We need federations. What do federations/wrestling companies need? Wrestlers. So we set up a relation between wrestlers and federations by the means of a contract. What else do federations have. And so on and so forth. And the database starts to shape up. Then you look at all those database columns and for each and everyone of it you need to think of its purpose.
It is certain you can always go back and edit a database layer if you need to. For an example yesterday I talked about investing in production/medical staff. So the database needs to store what is current level of your production department, medical department, marketing department, does it have natural growth?
Basically, a lot of questions arise that help you understand what should you include and what not. That's why I had that question about the Model class yesterday. Because once I create the model class this will serve as the data layer. This is the relation between the database and the app logic and then the final user. I won't create a specific class for a specific game. This class has to be dynamic.
There is always space for refactoring, changes and everything else. But once we have a couple of running online games, it isn't so easy to alter the database, well it is, but is not something I'm very keen of. Because changes will only be reflected when you create a new game and running games will use an outdated version of those Models, because new values maybe weren't defined in their database. But if I change the logic behind some calculation, changes are seen on the fly. Those are two different worlds.
Enough of technicalities. I've developed a lot yesterday in terms of database and still there is a lot to be done but here it goes:
DATABASES DONE: - Game Areas - Workers - Worker's attributes - Worker Relationships - Worker/Companies Contracts - Wrestling Companies
DATABASES TO DO: - Alliances - Alliances Members - Broadcasters - Broadcast Slots - Broadcasters/Companies Contract - Companies Relationships - Companies Financial History - Events/Schedule - Events History - Hall of Fame - Match History - Match History/Wrestler - Storylines/Feuds - Storylines/Feuds - Worker - Tag Teams - Stables - Title Belts - Title Belts History - TV Shows - Training Facilities - Worker Absences - Player Information - Game Information - Worker Chemistry - End of Year Awards - Worker Moveset - News - Other TV Shows
GAME SHARED DB'S TO DO: - Worker Generation Names - Tag Team Generation Names - Stable Generation Names - Events Generation Names - Gimmicks - Angles - Matches - Injuries - Location\Venues - Wrestling Moves - Narratives/News
Maybe not all of it is covered right now. But from here you can see how much work is needed. At least I got the main bulk done... Because some of this databases just need to store two related values, so they are very straight forward. You can also see what sort of features do I plan to add. Because after I have all this data, we need to do something with it. Players need to manipulate this data. And player actions will change the data values stored in the database.
|
|
|
Post by ViciousLothario on May 29, 2023 9:03:49 GMT -5
Entry #9: More database work
During my lunch break decided to do some more database preparation and already added the following tables:
- Alliances - Alliances Members - Broadcasters - Broadcast Slots - Broadcasters/Companies Contract - Companies Relationships - Companies Financial History - Events/Schedule - Events History - Hall of Fame - Hall of Immortals - Match History - Match History/Wrestler - Storylines/Feuds - Storylines/Feuds - Worker - Storylines Presets - Storylines presets steps - Tag Teams - Stables - Title Belts - Title Belts History - TV Shows - PPV
Still a little bit to go but I guess than in no time I will be applying database conversions. I think I will do only one scenario and start working on the game engine to put it on a playable state. But yeah... It's a huge amount of data preparation already done.
|
|
|
Post by Mongo the Destroyer on May 29, 2023 16:17:33 GMT -5
As a note, 90% of the slowdown of EWR back in the day came from worker relationships. For some reason that part of the database would slow loading times down to a crawl. Modern modders have since culled most of it (especially friendships and enemies). I'm not sure if we'll have the same slowdown issues, but that was one of the sources back in the day.
|
|
|
Post by Cross Recoba on May 29, 2023 17:26:42 GMT -5
As a note, 90% of the slowdown of EWR back in the day came from worker relationships. For some reason that part of the database would slow loading times down to a crawl. Modern modders have since culled most of it (especially friendships and enemies). I'm not sure if we'll have the same slowdown issues, but that was one of the sources back in the day. I'm paraphrasing and reading between the lines but VL's groundwork should mean that processing times aren't so arduous on things like that. *Holds a certificate in HTML and CSS proudly*
|
|
|
Post by ViciousLothario on May 30, 2023 2:31:39 GMT -5
I will always look at processing time of certain stuff. When you click next day, calculations need to be performed. You need to write stuff to the database after calculating certain things. But I can have some of the processes working on the background.
Some time ago I wrote a php script that would run the entire TEW match history database, look at each worker, get the ELO rating from each wrestler and calculate new ELO based on match results and write that ELO on the database. Then it would fetch all the wrestlers and region based ELO into a datatable which I could sort. The only part that took some processing time was the initial process. The actual processing of 10000 match records wasn't that long.
MySQL or SQL server doesn't even compares to MS Access in terms of perfomance.
Of course that C/C++ as a language is way faster than PHP so for algorithms it has that drawback. But I think most of the problems come from the database and data saving. And then we have code quality. It is easier to write poor processing code in C that it is on PHP. One language is compiled the other is interpreted.
I will always take processing into consideration. That's why I made the decision that once I have the game ready to launch. I will buy a host, instead of using a free host. Can get a Linux remote dedicated machine with 5€, man, 5€ is nothing, oh and pay like 15€ per year for the domain name. Maybe it's not the best machine in the world. But it's better than a free host. I prefer to do that, rather than having a webserver at home on my old laptop. Because it's cheaper to buy a host than it is to have a machine powered 24hours per day with electricity costs nowadays.
|
|
|
Post by ViciousLothario on May 30, 2023 2:41:46 GMT -5
OH and sorry for the double post for the same topic. But one plus that we will have is that the code will be taxed on the host and not taxed on the user computer. I mean having a Linux dedicated machine, with no other resources with 4GB of ram or 8GB of ram, Runs way faster than a Windows Home computer. We have a processor and a machine specially dedicated to run scripts. Down the line can even improve the host to a better machine if the project becomes self-sustainable and have it become faster.
|
|
|
Post by ViciousLothario on May 30, 2023 4:07:51 GMT -5
Entry #9: Database preparation complete
Finally I have the database fully prepared!!
Does that mean much?! A little bit. Because now I will only have to worry about conversions, creating model classes and then I can start implementing the game engine. To give you guys a sneak peek of what I have prepared on the shared database front.
Those rows are the number of records we have present so we can use them when needed. A total of 31 thousand worker names, should give us plenty of variety when it comes to worker generation. There is still a long way to go. But at least this part is covered.
Now the work will start on database conversion and db schema copies for each scenario and then copy the selected scenario to each game lobby.
And for an example in the perfomance front. I inserted those 31 thousand records in less than 1 second... Using the phpmyadmin import function.
|
|
|
Post by ViciousLothario on May 30, 2023 7:06:17 GMT -5
Entry #10: Models and Models and Models
Maybe the word Models doesn't mean much and there is several contexts for the same word. I know. I searched that on google.
But here is what is done. What is a Model, VL?! Probably nobody will ask me that. But just that you are aware. This is the layer that will communicate between the database and my application. There are some expected rules and behaviors. There are relations and there are specific methods that are going to be created in these files. For an example, I don't need to load the entire object if I just want to know a specific property of the object. In other words, If I want to get only the wrestlers that are part of a specific federation, I don't need to load all the wrestlers and then filter which one of them is contracted to your company. I just call a method/function that will run that specific query and return those wrestlers to the application, blazing fast.
The best thing about yii framework, is that it took me literally 10 minutes to set up all of this files, that's why database work had to be done first. This generated models, look at the database schema and set the rules and relations between the database. So for an example, If I want to ask for a wrestler contract. I just need the id of the wrestler and to call the right model. Is really that simple.
So now my attention and my work will shift to programming the database converter from TEW\EWR or whatever database I want to use to populate my database preset. There is going to be a lot of work to be done in this converter.
|
|
|
Post by ViciousLothario on May 30, 2023 16:00:15 GMT -5
Entry #11 - Conversions and more conversions
Everything is going accordingly to the plan when it comes to database conversion and database copy. Well at least part of it. Sometimes I want to run the code and it breaks for some stupid reason, which isn't stupid at all, it's just me being stupid and learning from my mistakes, it's very common in programming. You write code, and then BAM! Everything breaks. So you find out why, and fix it, and then breaks again, but then you fix it, and the code runs smoothly and you feel like you're some kind of god. I LOVE IT! But it's going way smoother than what I thought it would, which is very good.
I've already managed to convert several stuff from a TEW database into the game database, creating their own tables with the prefix I'm aiming for. I'm using the Chronicles 1992 scenario as a base to start with conversion. The best part about it, is performance.
So now I'm in the process of converting workers from TEW Scenario Chronicles 1992 into Chronicles_1992_worker table and it uses the model of the database 'worker' I created earlier, same columns, same model, same everything, only data changes. So when a user creates a lobby using that scenario, it will copy those tables to lobby-specific tables, which will hold the lobby-specific-data. So there is no processing at all when creating a lobby and 'starting a new game' just a simple copy tables process will occur which I think will take seconds or less since all the arithmetic operations are done beforehand. I am the only one with the ability to import scenarios. If a user wants a specific scenario which hasn't been converted yet, they can request me personally when the game is up and running. Worry not, I will add several scenarios from TEW2020 if not all of them. The good part of it, is that all the models work the same, I or users actions just point them to different databases/tables to fetch data from the database, without any problem at all.
But for now I'm only working with one scenario since I'm building the converter to work with our models and to define our game logic. And then will build the engine over this specific scenario.
Another plus point, is that the database is way more optimized than TEW database, I've managed to spot so many mistakes in TEW database that I don't even know if they're intentional to hide stuff from users or are just mistakes, everyone does them.
The logic and arithmetic operations are somewhat consuming and taxing but it's way better to write code to perform a conversion, than manually type every single entry of the database.
Right now, I'm on the middle of Worker/Wrestler/Staff conversion, which is the biggest object we have. And it's going very well. For an example, TEW uses regions, we only use game areas. So I need to calculate the average popularity of all regions within a certain area for an example. The good part about it, is that I write the code one time and can use it several times. I loop through all wrestlers in the database and the computer does everything for me. When I convert federations, I call that same function I created for the workers with different arguments. And BAM it works like magic. Code reusage is the signal of good code.
It will get to the point that I only need to upload TEW files, run that script and puff. Another database converted and ready to be used without any problems. I love it. And I'm loving to develop this project.
|
|
|
Post by ViciousLothario on May 31, 2023 3:12:26 GMT -5
Entry #12: Owners, Owner Preferences and Styles
So where I was on the process of converting when I got to Owner. I was doing the required math to get their owner skill. Everything going smooth, but then I came across Owner Style Preference. I have that field set up in the database and that was a thing in EWR, where a owner\booker values more certain styles and makes decision upon those. But then I remembered that federations don't really have a style/product.
So let's say you want to book a Hardcore federation... You just increase your risk levels. But if you want to book a Lucha Libre federation. You probably will hire, smaller wrestlers and value their speed skill more. But in terms of booking a lucha libre or a sports entertainment federation or hardcore federation, the ratings are calculated the same, which can be a big drawback for your ratings in EWR.
So now I have this dilemma. Should I add federation styles/products, or not? I mean, it's another layer of complexity and users will have to experiment with it, but I really think that's something it should be covered in the main game. I will most likely add the federation styles. They won't be as half in-depth as they are in TEW with 10000 products to choose from, but they will work more like TEW 2005. If you pick a certain style, modifiers for match calculation should be different. Plus, then users will have to book their events according to the rules I set to get good ratings. Well not really. In previous TEW games you could create your own product, instead of picking a product from a dropdown list like in TEW2020.
Hey VL but then you are locking the user to play something more complex... Yes, Mongo, I'm aware of it, I didn't forgot about you.
So why not give the users a choice? Just because it is on the database doesn't mean it has to be in the game engine. When you create a game, you can for an example, set this rules. Do you want to play more like a EWR style, you pick certain options, which will remove certain features. You want to play with more complexity, you check some other rules for the game lobby, so on and so forth. Of course we are talking a million years ahead of where I'm currently at. But thinking about and preparing this things it's half of the process done.
|
|
|
Post by Mongo the Destroyer on May 31, 2023 7:42:21 GMT -5
Entry #12: Owners, Owner Preferences and Styles
So where I was on the process of converting when I got to Owner. I was doing the required math to get their owner skill. Everything going smooth, but then I came across Owner Style Preference. I have that field set up in the database and that was a thing in EWR, where a owner\booker values more certain styles and makes decision upon those. But then I remembered that federations don't really have a style/product.
So let's say you want to book a Hardcore federation... You just increase your risk levels. But if you want to book a Lucha Libre federation. You probably will hire, smaller wrestlers and value their speed skill more. But in terms of booking a lucha libre or a sports entertainment federation or hardcore federation, the ratings are calculated the same, which can be a big drawback for your ratings in EWR.
So now I have this dilemma. Should I add federation styles/products, or not? I mean, it's another layer of complexity and users will have to experiment with it, but I really think that's something it should be covered in the main game. I will most likely add the federation styles. They won't be as half in-depth as they are in TEW with 10000 products to choose from, but they will work more like TEW 2005. If you pick a certain style, modifiers for match calculation should be different. Plus, then users will have to book their events according to the rules I set to get good ratings. Well not really. In previous TEW games you could create your own product, instead of picking a product from a dropdown list like in TEW2020.
Hey VL but then you are locking the user to play something more complex... Yes, Mongo, I'm aware of it, I didn't forgot about you.
So why not give the users a choice? Just because it is on the database doesn't mean it has to be in the game engine. When you create a game, you can for an example, set this rules. Do you want to play more like a EWR style, you pick certain options, which will remove certain features. You want to play with more complexity, you check some other rules for the game lobby, so on and so forth. Of course we are talking a million years ahead of where I'm currently at. But thinking about and preparing this things it's half of the process done. Honestly, the forced fed style stuff was a BIG turn off for me with TEW. I'd want to do one thing and they'd be like "No, that's not this fed's style." Screw you I do what I want. I'd MUCH rather have freedom to book how I want and not get punished/restricted. If I want to make AAA an ultimate fighting thing that's my prerogative, they gave me the job so let me do it. The EWR version of the owner having a preference didn't really change match outcome from what I could tell- however if you booked entirely against the grain and were losing money? You'd be more likely to get cut. Though I think it was mostly window dressing because.... I'm pretty sure it was bugged anyway and the style you picked for the owner in the file editor didn't translate to actually being that preferred style in the game being played, like Ryland messed up something in that code or something.
|
|
|
Post by ViciousLothario on May 31, 2023 7:53:29 GMT -5
Entry #13: Workers Import
Yes! You can't even imagine how proud I am. Importation of workers is working and is everything according to the expected behavior. Ran into some issues while importing, but fixed them one by one. We have a full database of workers and that's another step out of the way.
But there's one small thing that worries me in this picture, which is the size of this table. 6.5Mb. So if we multiply 100 game lobbies only with this table we have 650.0Mb. So I guess I need to put some limitations on the number of lobbies a player can run, it also depends on the number of players of course, I don't expect millions of people playing I mean, to get into the host limit it takes a while, but is a possibility. We will see as we go.
But let's not worry about that for now. Since we are not even in Alpha, maybe the game doesn't even gather interest from anybody. But it is something I have to consider.
On important notes now, The processing was really fast, wasn't expecting it to be so fast. I was expecting to take like 10 to 15 minutes... It took like 1 minute or so, to create all those records, and in each record I had to ask several different databases and run really long and complex queries, but no worries at all with the perfomance. I'm amazed with my own evolution as a developer.
So now that we have workers, let's create the companies import!
|
|
|
Post by ViciousLothario on May 31, 2023 8:11:22 GMT -5
Honestly, the forced fed style stuff was a BIG turn off for me with TEW. I'd want to do one thing and they'd be like "No, that's not this fed's style." Screw you I do what I want. I'd MUCH rather have freedom to book how I want and not get punished/restricted. If I want to make AAA an ultimate fighting thing that's my prerogative, they gave me the job so let me do it. The EWR version of the owner having a preference didn't really change match outcome from what I could tell- however if you booked entirely against the grain and were losing money? You'd be more likely to get cut. Though I think it was mostly window dressing because.... I'm pretty sure it was bugged anyway and the style you picked for the owner in the file editor didn't translate to actually being that preferred style in the game being played, like Ryland messed up something in that code or something. Made an entry and didn't read your post, I was too excited with my recent accomplishments. I totally get your point. And I've that awareness, that is not only an issue for you, but for a large part of the player base for this game style. I think this games have to act as a sandbox, so you can do whatever you want to do, the way you want to do. That's why even If I implement the owner style\booker style\event style features is more for what the AI does and not regarding players. For an example, you want to book AAA as a pure wrestling company. You can change the federation style, in fact, what I am thinking is you can create your own style. No limits whatsoever to that. Maybe if you switch styles, it will hurt your popularity a bit as the fan base isn't used to it. In TEW 2016 you could create your own product. You can't exactly set what are the modifiers for match calculations and show calculations, but can experiment with it and see what fits your federation the most. And one could also create a specific style to be applied to a specific event\tvshow. Like we all know WWE style, but then you had the 201 or whatever it was called that was more of a high-flying style. Of course that If you book one show like a pure company and the other show as a lucha libre show, fans know what they're buying. When you buy a ticket to a CHIKARA event, you know what you're in for. And when you buy a ticket to a ROH event, you also know what you're in for. I just think that style have benefits and drawbacks. Also, when setting up the lobby you can check... Do you want to play with styles/products? Yes or No. Because there are users that want that feature and other users that don't want that feature. Because that feature can give you bonuses and can give you penalties, so it's up to you to set the game as you want to play. As for the last part, there are a lot of things in EWR and TEW that are purely cosmetic and don't actually represent anything in the game engine, despite being sold as a feature. Believe me, I've tested it.
|
|