Raised This Month: $420 Target: $400
 105% 

HLDS-V8: Extending HLDS with V8 JavaScript engine


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deejayy
Junior Member
Join Date: Mar 2005
Old 03-06-2014 , 03:48   HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #1

I've made a PoC C++ source code (metamod plugin) which demonstrates the usage of Javascript to extend HLDS.

https://github.com/deejayy/hlds-v8

Anyone interested?
__________________
deejayy is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 03-06-2014 , 05:51   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #2

What the importance of that ? i read what in site but not understand anything
ArabicMan is offline
deejayy
Junior Member
Join Date: Mar 2005
Old 03-06-2014 , 05:58   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #3

It's an opportunity to break with Pawn and use something more efficient and easier language to write plugins.

It brings the possibility to extend with almost everything you can imagine (as you can extend eg. node.js, which is also based on V8 ).

Also, availibility to reload a script in real time, in the a middle of a map.

With some investment, it can be added to hook HLDS engine functions not provided by plugin api, etc.

My fantasy is very limited, but i think this community has unlimited ideas for this
__________________

Last edited by deejayy; 03-06-2014 at 06:02.
deejayy is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-06-2014 , 06:25   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #4

I'd rather stick with AMXX
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (intervening in a thread, asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 03-06-2014 , 06:44   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #5

Quote:
Originally Posted by deejayy View Post
It's an opportunity to break with Pawn and use something more efficient and easier language to write plugins.

It brings the possibility to extend with almost everything you can imagine (as you can extend eg. node.js, which is also based on V8 ).

Also, availibility to reload a script in real time, in the a middle of a map.

With some investment, it can be added to hook HLDS engine functions not provided by plugin api, etc.

My fantasy is very limited, but i think this community has unlimited ideas for this
Nice , i want to join this project or what i do ?
How to use it ?
ArabicMan is offline
deejayy
Junior Member
Join Date: Mar 2005
Old 03-06-2014 , 06:50   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #6

Everything is described at the github repository of the project. You can fork or commit as you wish, create issues, etc.
__________________
deejayy is offline
deejayy
Junior Member
Join Date: Mar 2005
Old 03-10-2014 , 05:57   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #7

Code:
function ClientCommand(params)
{
	if (params.argv[0] == 'say' || params.argv[0] == 'say_team') {
		if (params.args.match(/[0-9 ]+\.[0-9 ]+\.[0-9 ]+\.[0-9 ]+|2[6-9 ][0-9 ][0-9 ][0-9 ]|\.com|\.net|\.hu|\.org|\.ro|\.sk/)) {
			console.log('SPAMMER! ' + v8.getPlayerName(params.id));
			return V8_SUPERCEDE;
		}
	}
}
__________________
deejayy is offline
jonnzus
Epic Member
Join Date: Oct 2010
Location: Finland
Old 03-10-2014 , 09:24   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #8

Very cool, I will probably use this.

Edit & Suggestion:
Add option to support amxx admins.
__________________
Quote:
367. Everyone's copyright will be broken. No exceptions.

Last edited by jonnzus; 03-10-2014 at 10:52.
jonnzus is offline
deejayy
Junior Member
Join Date: Mar 2005
Old 03-11-2014 , 07:53   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #9

Detecting no-spread cheat ("shaky" screen):

Code:
function CmdStart(params)
{
	var p = players[params.id] || new player();
	if (p.viewangles.x == params.viewangles.x || p.viewangles.y == params.viewangles.y) {
		p.nospread *= 0.9;
	} else {
		p.nospread += 1;
	}
	if (p.nospread > 1000) {
		console.log("No-spread cheat detected! " + v8.getPlayerName(params.id));
	}
	p.viewangles.x = params.viewangles.x;
	p.viewangles.y = params.viewangles.y;
};
__________________

Last edited by deejayy; 03-11-2014 at 08:04.
deejayy is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 03-11-2014 , 08:26   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #10

I like javascript, nice work.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
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 22:05.


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