Raised This Month: $138 Target: $400
 34% 

No lag nightvision


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-03-2019 , 18:40   Re: No lag nightvision
Reply With Quote #11

@DJEarthQuake - what are even you talking about? If 2+3 = 5, then 3+2=5 as well. In this case it's more like 1=1. If MSG_ONE is equal to 1, it doesn't make any difference in the performance whatsoever. That's pure non-sense. After the plugin gets compiled, the .amxx file doesn't contain MSG_ONE, it contains the value of 1. I doubt that even the compiler is in any way affected from this. What you're suggesting is completely bad practice and pure usage of "magic numbers". If this is how plugins should be made, then we don't even need to have constants in the .inc files.
__________________

Last edited by OciXCrom; 05-03-2019 at 18:42.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 05-03-2019 , 19:28   Re: No lag nightvision
Reply With Quote #12

Quote:
Originally Posted by OciXCrom View Post
If MSG_ONE is equal to 1
It's equal. Numbers are easier. I use 0,23 all the time for broadcasting temp ents.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is online now
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 05-03-2019 , 19:37   Re: No lag nightvision
Reply With Quote #13

Quote:
Originally Posted by DJEarthQuake View Post
I never had night vision lag in the 1900's with minimal hardware Pentium II, Voodoo 2000 on dial-up.
lol what? I had almost exact one computer, a Pentium 2 paired with 128mb of ram and a integrated Voodoo 2 gpu, I couldn't even get up to 10 fps, and you managed to play flawlessly with similar one =O ?
__________________

Last edited by thEsp; 05-03-2019 at 19:44.
thEsp is offline
Foxa
Junior Member
Join Date: Nov 2018
Location: Croatia
Old 05-04-2019 , 05:27   Re: No lag nightvision
Reply With Quote #14

Quote:
Originally Posted by thEsp View Post
lol what? I had almost exact one computer, a Pentium 2 paired with 128mb of ram and a integrated Voodoo 2 gpu, I couldn't even get up to 10 fps, and you managed to play flawlessly with similar one =O ?
Yeah exactly that, even on some modern setups nighvision can kill the fps LUL
Foxa is offline
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 05-04-2019 , 09:31   Re: No lag nightvision
Reply With Quote #15

  • It took a Pentium III or higher with beta drivers to break the 100 fps barrier with Voodoo.
  • There is no shortage of laptops today with spec that look like they should perform but don't.
  • Hardware companies have made it extremely hard to swap to solid state on cheaper models.

I sent back a Dell with an i7. In retrospect likely wrong driver.

Review drivers again.

My first GPU experience was a dual-core Intel. 1500 fps regularly. Ah that's back when dod_charlie had players.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-04-2019 , 09:56   Re: No lag nightvision
Reply With Quote #16

Quote:
Originally Posted by DJEarthQuake View Post
It's equal. Numbers are easier. I use 0,23 all the time for broadcasting temp ents.
How is searching the .inc files for the number that corresponds with the constant or remembering numbers easier than writing the constant itself? Why are you even suggesting such a thing? Just try to post a plugin with such numbers, approvers will demand that you replace the magic numbers with constants. What if the number for a constant gets changed in a future AMXX update?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 05-04-2019 , 11:50   Re: No lag nightvision
Reply With Quote #17

Such perspective is reminiscent of spaces vs tabs didactic.

Half-Life Software Development Kit is highly unlikely going to remap all of their hard coded messages. Amxx does change as an 'extension'. For example: client_disconnect to client_disconnected. Typing 18 bits each time when 1 will due is an option. For instance, damage. Author uses one or the other. I have seen both styles 'approved'.
DMG_RADIATION (1<<18 )

Approved code isn't god-like. One you gave me pointers on still needs more work. The errors on it don't crash anything but it's an eye sore. It can wait.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is online now
SomewhereLost
Senior Member
Join Date: Mar 2014
Location: Tomorrowland
Old 05-04-2019 , 20:17   Re: No lag nightvision
Reply With Quote #18

Quote:
Originally Posted by DJEarthQuake View Post
Such perspective is reminiscent of spaces vs tabs didactic.

Half-Life Software Development Kit is highly unlikely going to remap all of their hard coded messages. Amxx does change as an 'extension'. For example: client_disconnect to client_disconnected. Typing 18 bits each time when 1 will due is an option. For instance, damage. Author uses one or the other. I have seen both styles 'approved'.
DMG_RADIATION (1<<18 )

Approved code isn't god-like. One you gave me pointers on still needs more work. The errors on it don't crash anything but it's an eye sore. It can wait.
Everytime you post something Im getting the idea that youre high.

Btw, once I had an i5 laptop with 3gb vram of gpu, couldnt get proper 80 fps with nightvision on.
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Foxa
Junior Member
Join Date: Nov 2018
Location: Croatia
Old 05-05-2019 , 10:50   Re: No lag nightvision
Reply With Quote #19

Quote:
Originally Posted by SomewhereLost View Post
Everytime you post something Im getting the idea that youre high.
Same.
Foxa is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-05-2019 , 12:50   Re: No lag nightvision
Reply With Quote #20

Quote:
Originally Posted by DJEarthQuake View Post
[I]Use 8 instead of MSG_ONE_UNRELIABLE.
Use 1 instead of MSG_ONE.
No, this is terrible advice. No one will be able to understand what your code does, not even you. You'll say you understand, but if you come back after 2 weeks and look at your source you will not remember what the heck all these numbers mean.

Look:
PHP Code:
message_begin(596, ..) 
If I look at that I have no idea what it does. I need to check the constants and see what 5 is, what 96 is.

On the other hand:
PHP Code:
message_begin(MSG_ONEget_user_msgid("DeathMsg"), ..) 
I understand instantly that the purpose is to send DeathMsg to one player on the reliable channel.

Quote:
The include file already has it typed out.
It has it typed out for you to use it, not hardcode everything and write terrible code.

Quote:
The replacement makes a smaller file size. That uses less CPU. Every little drop of knowledge is essential for your laggin' war bro.
Except you are giving him bad "knowledge". It will not make the file smaller, and even if it did, what in the world file size has to do with CPU usage?
It will use more memory on the hard to store the file, but not more CPU. Think about it this way:
-you have a string made of letter "a" and you do nothing with it. plugin_init is empty.
-you have a string made of one million "a" and you do nothing with it. Will that consume more cpu? Absolutely not. Is the file bigger? Of course.
file size does not translate in any way to CPU usage.

Quote:
Numbers are easier. I use 0,23 all the time for broadcasting temp ents.
How? With pure numbers you have no idea what's going on.

Look at setting offsets: set_pdata_int(id, 116, 1). Can you tell me without googling anything, what this does? You can't.
But if I give you set_pdata_int(id, m_iTeam, _:CS_TEAM_T)? Of course, it sets the team of the player to 1.

Also, what are you going to do if the constant changes? Are you going to update EVERY SINGLE PLUGIN and change the value? That's just asking for unmaintanable code.

Quote:
Such perspective is reminiscent of spaces vs tabs didactic.
No, it's about writing good code that that doesn't break at the slightest change and that can be updated and understood by other people.
__________________

Last edited by HamletEagle; 05-05-2019 at 12:51.
HamletEagle is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:33.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode