Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[ASK] Making Damage & Stats to max 32k


Miharukun
 Share

Recommended Posts

@'Genusis':

> So go with a integer.  yes there will be a slightly decrease in speed but its worth the size.

Given how ancient the code base is, and therefore an ever decreasing number of knowledgeable maintainers, there's absolutely no reason to go for saving space at this point, it's a matter of ease of future use. I don't know how much this doubling would be, but I don't see it adding more than 16 bytes per user. Assuming it adds 16 bytes per user you would need millions of characters before it makes any noticeable difference. That being said changing this for the users/characters also means it should be changed for things like items, and whatever else. Assuming an average worst case scenario of added data of per se 32 bytes per object, you would need roughly 32,000 objects (characters, items, etc.) before it changes your data consumption by even _1 megabyte_. At this point in time, that's infinitesimal, and well above the average requirements for any of these games.

In slightly-shorter-words: There is absolutely no reason to use anything other than longs if you are enlarging integer data types, as the gain in ease of maintenance or usage for future users or maintainers far, far outweighs the pidly cost in data size. Nobody here is making a game that will have millions of objects (I'd be surprised if any hit that 32,000 mark I mentioned earlier) that will be affected by this change, so the increase in data consumption will be utterly meaningless and _thus a moot point_.

**_tl;dr: Take the 32-bit processor speed and software usability gains by using longs instead of integers, and don't look back._**
Link to comment
Share on other sites

if you have lets say 200 users and use to use a byte but instead switch it to a long you now are using 800bytes of data. compared to 200 if you use a integer you only use 400bytes of data. This goes for many things within ANY Language. It wasn't solely meant for just mirage source based engines. Besides if your learning to program you should learn to do it in a proper way regardless of the source or outcome. This way whenever you decide to switch languages or go farther you already have these concepts in mind.
Link to comment
Share on other sites

@'Genusis':

> if you have lets say 200 users and use to use a byte but instead switch it to a long you now are using 800bytes of data.  compared to 200 if you use a integer you only use 400bytes of data. This goes for many things within ANY Language. It wasn't solely meant for just mirage source based engines. Besides if your learning to program you should learn to do it in a proper way regardless of the source or outcome. This way whenever you decide to switch languages or go farther you already have these concepts in mind.

I quite frankly do not think anyone is really learning off of this source base anymore, and the only person who would get any benefit would be the person who changes it: 1 person. When a single byte on a hard disk costs roughly US$0.00000000005, it's honestly irrelevant. The benefits still out-weight the costs, as likely the person who changes it will have read this (and if they didn't it's a moot point) will have therefore seen your explanation, and would have learned the concept you are attempting to impart, but when this is going into practical use it's no longer about education.
Link to comment
Share on other sites

Funny thing is people still do learn from this source. Anyways IF you honestly think that using a Long for everything out-weights everything so be it for you that 1 person. Other than that this is mostly based solely upon actual programming practices which do make a difference. I rather teach people the right way than say hey just change everything to a long because you know what. its the fastest variable out there for vb6\. I dislike that way of thinking.
Link to comment
Share on other sites

If you're not going over the max value of a contructor then there's no reason to use the larger constructor, giving way too much space for a number that you planned to never go higher to begin with is just plain lazy and dumb, as i said before, you want to use higher numbers, then use a Single then and be happy with the worst of both worlds!
Link to comment
Share on other sites

@'Growlith1223':

> If you're not going over the max value of a contructor then there's no reason to use the larger constructor, giving way too much space for a number that you planned to never go higher to begin with is just plain lazy and dumb, as i said before, you want to use higher numbers, then use a Single then and be happy with the worst of both worlds!

Again it has nothing to do with what /you/ plan on doing, it's about what /other/ people who can't edit the source plan on doing. It's to prevent a needless recurrence of this thread, because I guarantee you if anyone runs into the issue a few months or years down the line the first thing they won't do is look for this thread.
Link to comment
Share on other sites

They have the full authority to change how the game works, there's a reason the source is there, if you don't like how something works, then change it or hire someone to do the changes for you, the developers are there to provide you a base to make your game off of, we can't predict what everyone wants, if we did the engine would be so slow not even the most powerful comp could run it at full speed. yes, we cater to everyone's needs, TO AN EXTENT, He asked what he wanted, he's not going over 32k so an Integer would be the better deal, no point in going above that if you don't plan to to begin with! as i said, if you don't like how the engine works, then you change it, that's what an engine is for, we make your life easier by giving you a base, This is a question for one project anyways, not millions, try and understand that.

Now. if you can't edit the source, then hire someone or figure out how to edit,if you can't edit the source then there's absolutely no point in creating a game to begin with.
Link to comment
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
 Share

×
×
  • Create New...