(Note: If you'd prefer to watch a video on the topic, click here for the youtube video. What Are DLL Files?DLL (Dynamic Link Library) files are shared libraries used on Microsoft platforms (read as: Windows operating system). Think of it as a supporting file that contains useful information (data, or functions) that can be used by an application (or other DLL file) during run-time. Why are DLL Files Used?So why would we want to use DLL files? There are a few reasons: 1. Our application file is smaller since we can hold data/code in a separate file. 2. Because the DLL file is separate from the running application, the RAM that would normally be required by the DLL file isn't used until the applications loads the DLL file. 3. Since our reusable code is held in a DLL file, if we use that code in many projects, but find a mistake in the DLL code and need to change it, we can simply recompile the DLL file and replace the old DLL file from all of our projects, as opposed to needing to edit raw code in all our projects and recompiling all of those projects. Let's Make Our Own DLL FileSo now that we know what a DLL file is, let's go through an example of making one. Our example is going to be in C#. We're going to create a Class Library (.NET Standard) project in Visual Studio, and add some functions to a class for library. In our example, we're going to create a math library that happens to have a Calculator class. This Calculator class has three functions, one for adding, one for multiplying, and one for saying hi. When we build our project, a .dll file is generated. And that's it! That's our DLL file that contains the code for our shared library. Now Let's Use the DLL FileNow that we've created a DLL file, let's actually use it in a different project. Go ahead and create a basic C# Console App in Visual Studio. We need to do a few things: 1. Right click on the project name and Add a Reference to the DLL file we created. (Browse for it on your computer.) 2. To our main file in our current project, use the namespace that we used in our DLL file. 3. Inside of our Main function, instantiate the class that we want from that namespace, and use the functions for that class. And just like that, we've used the DLL file that we created. If that explanation was a bit vague to you and you want to see it actually done, then feel free to watch the youtube video embedded below. In it, I'll walk through the entire project with you. Like this content and want more? Feel free to look around and find another blog post that interests you. You can also contact me through one of the various social media channels.
Twitter: @srcmake Discord: srcmake#3644 Youtube: srcmake Twitch: www.twitch.tv/srcmake Github: srcmake Were Cards Cheaper Prior To OB64?Paladins OB64 is about to launch, and the new card system costs an exorbitant amount of money. In a previous blog post, we see that it takes 4386 Champion Chests to unlock all of the cards for a particular champion. But how does this compare to the previous card system? Essence Cost Before OB64Let's do the calculations for how much it cost to unlock all the cards for a champion using the old essence system (before OB64). Each champion has 8 common, 5 rare, 3 epic, and 4 legendary cards. Hi-Rez gives you 1 legendary card, and one loadout for free, so let's say that we actually need 4 common, 4 rare, 3 epic, and 3 legendary cards. If we multiply these numbers by the amount of essence each card costs, then we see: 4 common * 350 essence = 1400 essence 4 rare * 1000 essence = 4000 essence 3 epic * 4000 essence = 12000 essence 3 legendary * 10000 essence = 30000 essence ' In total, one champion required 47,400 essence to acquire all of their cards. Since essence is valued as 1 essence = 1 gold, then this means one champion required 47,400 gold to own all of their cards. In OB64, To Own All Cards for One ChampionBased on the previous post, we know that one champion needs 645 duplicates to get all of their cards to level 10 in OB64. Since there are 5 cards given per Champion Chest, then we need 129 Champion Chests. Each Champion Chest costs 7500 gold, meaning in total we need 967,500 gold to get all of one champion's cards to level 10 in OB64. ComparisonBefore OB64, we needed 47,400 essence (read as: 47,400 gold) to unlock all of one champion's cards. In OB64, we need 967,500 gold to get all of one champion's cards to level 10. That means that it's now 20.4 times more expensive. Prior to OB64, for all 34 champion's, it would cost 1,611,600 gold to own all cards. In OB64, it will cost 32,895,000 gold to get all champion's cards to level 10. So yeah...the new card system costs significantly more than the old one. To see more content from me, please follow me on twitter, or subscribe through one of the various social media channels available.
Twitter: @srcmake Discord: srcmake Youtube: srcmake Twitch: www.twitch.tv/srcmake A New Card SystemHi-Rez Studios has received a lot of backlash over the latest iteration of their game, Paladins. Open Beta 64 (OB64) has introduced a new card loadout system to replace the old one. The new system can be summarized as such: 1. Every champion has all cards (including legendary cards) unlocked by default. 2. Each card comes with a level, and starts out at level 1 base. 3. Each card can be leveled up to level 10. 4. The higher a card's level, the better its stats/effect. 5. To level up a card, a player must obtain duplicates of that card. Once enough duplicates are obtained, the card levels up. 6. Duplicates of cards are obtained from chests. (Radiant Chests, and Champion Chests.) The reason Hi-Rez is getting the EA treatment is because cards are only obtainable through chests, by chance. That means you're not allowed to buy the card you want: you have to purchase chests and hope you get lucky enough to find the card you want. And of course, people with more chests (and more money) will hold an advantage over those with less, since chests = high leveled cards. (This is true fo "Quick Play", not Competitive mode.) This means that even though we'd like to use a certain loadout (set of cards), because of the levels of our cards, it may be better to use a different set of cards; so our playstyle is defined by whichever cards we have leveled the most, which is all up to chance. But how many chests does it take to level up all cards to 10, so that we can just play what we want? Let's do some math to find out. How Many Chests Does It Take?Let's assume we're a new player, meaning we have all level 1 cards. Here is a chart defining the number of duplicates a player needs to level up each card (chart source linked here): To level a common card to level 10 requires 50 duplicates. To level a rare card to level 10 requires 32 duplicates. To level a epic card to level 10 requires 15 duplicates. To level a legendary card to level 10 requires 10 duplicates. Each champion has 8 common cards, 5 rare cards, 3 epic cards, and 4 legendary. That means each champion needs (8*50) + (5*32) + (3*15) + (4*10) = 645 duplicates. Oh yeah, there are currently 34 champions in the game. So for all 34 champions, we'd need (34*645) = 21,930 duplicates. That's a lot of duplicates. If we don't use a booster, then we get 4 items per Radiant Chest, meaning in an absolute perfect world, a Free To Play player needs 5483 Radiant Chests to get every card to level 10. If we do use a booster, then we get 4 items per Radiant Chest, meaning in a perfect world we need 4386 boosted Radiant Chests to get every card to level 10. Champion Chests give 5 cards per champion (although legendaries have a much lower drop rate, compared to being able to guarantee one by using a Legendary Keyed Radiant Chest). In a perfect world, we'd need to open 4386 Champion Chests to get all cards to level 10. Again, these are ideal conditions where we never get a useless card (AKA, a duplicate after the card reaches level 10), and we don't get skins or anything else that come in chests. To see more content from me, please follow me on twitter, or subscribe through one of the various social media channels available. Twitter: @srcmake Discord: srcmake Youtube: srcmake Twitch: www.twitch.tv/srcmake |
AuthorHi, I'm srcmake. I play video games and develop software. Pro-tip: Click the "DIRECTORY" button in the menu to find a list of blog posts.
License: All code and instructions are provided under the MIT License.
|