Any chance of...

10/12/2014 21:55 CrimsonFart#1
A cool new PVP server appearing? Like SS/FB that shit and rape everyone with tournies and shit?

I feel like the only one that wants a PVP server.
10/13/2014 01:06 pintinho12#2
pvp servers doesnt give money
10/13/2014 01:54 turk55#3
Quote:
Originally Posted by pintinho12 View Post
pvp servers doesnt give money
To add more information to this post. PVP servers usually don't generate money since it's PVP. Therefore the hosting of the server is usually paid out of the pocket.
10/13/2014 08:55 Super Aids#4
If there was a playerbase above 100 players... These days a PVP server has to be lucky to even get 20...

PVP servers doesn't give you any donations anymore either, because of the low amount of players interested in it, so all payments for servers are done by yourself, thus it's not worth paying for a server when nobody is really going to use it.

I would make a PVP server if the activity of the server was ensured and not just some dead shit.
10/13/2014 08:56 Xio.#5
Funny you bring that up SPO!L,

I've been thinking of using the XioEvo base for a PvP server for quite some time now. I re-created Dota using XioEvo and thought about doing all kinds of game modes like TDM, DM, CTF and Hold the Area types of modes and then release the binary or even the source since you can decompile it anyways to the public so everyone can host servers using a stripped down XioEvo source.

I also made a server list / server browser with quick connect playerlist and ping. I think I'll finish that shit asap and get it out here.
10/13/2014 09:25 turk55#6
Why do I have a feeling that this was Yuki and Crimsonfart's idea for advertising.
10/13/2014 09:37 Super Aids#7
Quote:
Originally Posted by turk55 View Post
Why do I have a feeling that this was Yuki and Crimsonfart's idea for advertising.
Probably is, but a dota like server will never work out anyways. If people wants to play dota they'll grab dota, lol or wc3. Definitely not a co pserver that tries to copy the gameplay.

Although if it was just like an event, then meh nothing special either. Not that it's anything difficult at all to make.

Sounds like a common PVP server otherwise, so nothing new really. Probably programmed like a rathole anyways with Yuki as a "main coder"
10/13/2014 12:53 Aceking#8
I am planning a really big PvP feature in my server. It won't be ready for a while yet however. It also ties a little bit into the regular server, though it will be its own entity.

But yeah if AcidCO was any indication, there really isn't a playerbase for a pure pvp server.
10/13/2014 13:36 KraHen#9
Quote:
Originally Posted by Xio. View Post
Funny you bring that up SPO!L,

I've been thinking of using the XioEvo base for a PvP server for quite some time now. I re-created Dota using XioEvo and thought about doing all kinds of game modes like ...
You seriously have too much free time on your hands. :D Post a video. :D
10/13/2014 13:55 Yupmoh#10
Funny... I was just talking to Kalona and Muffin about a PvP server the other day. Most likely when we're done with XioEvo.

Quote:
Originally Posted by Super Aids View Post
Sounds like a common PVP server otherwise, so nothing new really. Probably programmed like a rathole anyways with Yuki as a "main coder"
Considering you've seen no code and nothing of his recent work I don't see how you're judging. Please if you're going to trash talk someone, Take it to Private. This forum isn't the place to do that.
10/13/2014 15:03 Super Aids#11
Quote:
Originally Posted by Execution! View Post
Funny... I was just talking to Kalona and Muffin about a PvP server the other day. Most likely when we're done with XioEvo.



Considering you've seen no code and nothing of his recent work I don't see how you're judging. Please if you're going to trash talk someone, Take it to Private. This forum isn't the place to do that.
Seen his recent posts though. Also I wasn't trash talking, I was stating an opinion. That you took offense to it, isn't my problem.
10/13/2014 16:42 Yupmoh#12
Quote:
Originally Posted by Super Aids View Post
Seen his recent posts though. Also I wasn't trash talking, I was stating an opinion. That you took offense to it, isn't my problem.
Alright, I aint offended, So I can go and talk about how shit your code is and you'd be okay with it yeah? Alright.. We're cool.
10/13/2014 18:35 turk55#13
Quote:
Originally Posted by Execution! View Post
Alright, I aint offended, So I can go and talk about how shit your code is and you'd be okay with it yeah? Alright.. We're cool.
As long as you can back up what you are saying.
10/13/2014 20:52 Super Aids#14
Quote:
Originally Posted by Execution! View Post
Alright, I aint offended, So I can go and talk about how shit your code is and you'd be okay with it yeah? Alright.. We're cool.
Okay call my code shit, but I expect you to understand it.
Code:
module parser.parser;

import std.array;
import std.algorithm;
import std.string;
import std.conv;

import parser.tokenizer;
import parser.types;

import core.settings;
import core.utils;
import core.kernel;
import core.execute;

private string[] errorReports;
void reportError(string error, string file, int line, string code) {
	import std.file : exists;
	if (exists(getSetting!(string)("MainFilePath") ~ file))
		errorReports ~= "<std-lib>(" ~ file ~ ")[" ~ to!string(line + 1) ~ "]" ~ error;
	if (exists(getSetting!(string)("CompilerPath") ~ "\\lib\\" ~ file))
		errorReports ~= "<std-lib>(" ~ file ~ ")[" ~ to!string(line + 1) ~ "]" ~ error;
	else
		errorReports ~= "(" ~ file ~ ")[" ~ to!string(line + 1) ~ "]" ~ error;
}

string[] getErrors() {
	return errorReports;
}

class CodeParser {
private:
	string[] lines;
	int currentLine;
	string fileName;
	string[string] aliases;
public:
	this(string fileName) {
		this.fileName = fileName;
		currentLine = 0;
	}
	
	void parse(string parentFile, int parentLine, string parentCode) {	
		import std.file;
		
		if (canFind(fileName, "\\") && !canFind(fileName, "C:\\")) {
			reportError(
			"Invalid module specification.",
			parentFile,
			parentLine,
			parentCode);
			return;
		}
		if (!endsWith(fileName, ".beta")) {
			fileName = replace(fileName, ".", "\\");
			fileName ~= ".beta";
		}
		
		string readFile = fileName;
		
		auto mnFile = getSetting!(string)("MainFilePath") ~ "\\" ~ fileName;
		if (!exists(mnFile)) {
			auto cmpFile = getSetting!(string)("CompilerPath") ~ "\\lib\\" ~ fileName;
			
			if (!exists(cmpFile)) {
				if (!exists(fileName)) {
					reportError(
					"Cannot read module " ~ fileName,
					parentFile,
					parentLine,
					parentCode);
					return;
				}
			}
			else
				readFile = getSetting!(string)("CompilerPath") ~ "\\lib\\" ~ fileName;
		}
		else
			readFile = getSetting!(string)("MainFilePath") ~ "\\" ~ fileName;

		string text = readText(readFile);
		text = makeValidString(text);
		lines = split(text, "\n");
		
		for (int i = 0; i < lines.length; i++)
		{
			string line = lines[i];
			
			if (!line || line == "" || line.length <= 1) {
				currentLine++;
				continue;
			}
			
			line = stripLeft(line, ' ');
			line = stripLeft(line, '\t');
			line = stripRight(line, ' ');
			line = stripRight(line, '\t');
			
			if (!line || line == "" || line.length <= 1) {
				currentLine++;
				continue;
			}
			
			foreach (a; aliases.keys)
				line = replace(line, a, aliases[a]);
			
			auto lineSplit = split(line, " ");
			
			switch (lineSplit[0])
			{
				case "alias": {
					string aliasName = lineSplit[1];
					string aliasValue = line[lineSplit[0].length + lineSplit[1].length + 2 .. $];
					aliases[aliasName] = aliasValue;
					break;
				}
				
				case "import": {
					if (lineSplit.length != 2) {
						reportError(
						"Invalid arguments for module import. Use: import MODULE_PATH",
						fileName,
						currentLine,
						line);
						
						currentLine++;
						continue;
					}
					
					auto nCodeParser = new CodeParser(lineSplit[1]);
					nCodeParser.parse(fileName, currentLine, line);
					break;
				}
				
				case "class": {
					auto tokenizer = new ClassTokenizer;
					string err = tokenizer.tokenize(line);
					if (err) {
						reportError(err, fileName, currentLine, line);
					}
					else {
						auto newClass = new Class;
						newClass.name = tokenizer.name;
						newClass.typeName = tokenizer.name;
						foreach (base; tokenizer.baseNames) {
							if (classExists(base)) {
								auto baseClass = getNewClass(base);
								baseClass.name = base;
								newClass.bases[base] = baseClass;
								newClass.setBaseData(baseClass);
							}
						}
						initClass(newClass);
						
						currentLine++;
						if (parseClass(newClass)) {
							i = currentLine;
							continue;
						}
						else {
						reportError(
							newClass.name ~ " has no ending statement",
							fileName,
							currentLine,
							"");
						}
					}
					break;
				}
				
				// task & variable ...
				default: {
					if (!lineSplit[0] || lineSplit[0] == "") {
						currentLine++;
						continue;
					}
					
					if (startsWith(lineSplit[0], "task")) {
						auto tokenizer = new TaskTokenizer;
						string err = tokenizer.tokenize(line);
						if (err) {
							reportError(err, fileName, currentLine, line);
						}
						else {
							auto task = new Task;
							task.name = tokenizer.name;
							task.returnType = cast(VariableType)tokenizer.returnType;
							foreach (param; tokenizer.parameters) {
								auto var = new Variable(cast(VariableType)param.type);
								var.name = param.name;
								if (param.refOut)
									var.refType = (param.refOut == "ref" ? RefType.Ref : RefType.Out);
								var.mutable = param.mutability != "immutable";
								task.parameters ~= var;
								task.variables[var.name] = var;
							}
							initTask(task);
						}
					}
					else {
						if (validType(lineSplit[0]) ||
							classExists(lineSplit[0])) {
								auto tokenizer = new VariableTokenizer;
								auto err = tokenizer.tokenize(line);
								if (err) {
									reportError(
									err,
									fileName,
									currentLine,
									line);
								}
								else { // check array, class ...
									if (classExists(lineSplit[0])) {
										auto var = getNewClass(lineSplit[0]);
										var.name = tokenizer.name;
										var.mutable = tokenizer.mutability != "immutable";
										initVar(var);
									}
									else if (lineSplit[0] == "array") {
										auto var = new Array(to!int(tokenizer.value));
										var.name = tokenizer.name;
										var.mutable = tokenizer.mutability != "immutable";
										initVar(var);
									}
									else {
										auto var = new Variable(cast(VariableType)tokenizer.type);
										var.name = tokenizer.name;
										if (tokenizer.mutability)
											var.mutable = tokenizer.mutability != "immutable";
										if (tokenizer.value)
											var.fromString(tokenizer.value);
											
										initVar(var);
									}
								}
						}
						else {
							reportError(
							"Invalid parsing argument for global declarations.",
							fileName,
							currentLine,
							line);
						}
					}
					
					break;
				}
			}
			
			currentLine++;
		}
	}
	
private:
	bool parseClass(Class newClass) {
		const string endState = ")";
		for (int i = currentLine; i < lines.length; i++)
		{
			string line = lines[i];
			if (line == endState) {
				currentLine++;
				return true;
			}
			
			if (!line || line == "" || line.length <= 1) {
				currentLine++;
				continue;
			}
			
			line = stripLeft(line, ' ');
			line = stripLeft(line, '\t');
			line = stripRight(line, ' ');
			line = stripRight(line, '\t');
			
			if (line == endState) {
				currentLine++;
				return true;
			}
			
			if (!line || line == "" || line.length <= 1) {
				currentLine++;
				continue;
			}
			
			foreach (a; aliases.keys)
				line = replace(line, a, aliases[a]);
			
			auto lineSplit = split(line, " ");
			
			switch (lineSplit[0])
			{
				// New keywords ...
				
				// task & variable ...
				default: {
					if (!lineSplit[0] || lineSplit[0] == "") {
						currentLine++;
						continue;
					}
					
					if (startsWith(lineSplit[0], "task")) {
						auto tokenizer = new TaskTokenizer;
						string err = tokenizer.tokenize(line);
						if (err) {
							reportError(err, fileName, currentLine, line);
						}
						else {
							auto task = new Task;
							task.name = tokenizer.name;
							if (task.name == "this") {
								task.callable = false;
								newClass.constructor = task;
							}
							else if (task.name == "~this") {
								task.callable = false;
								newClass.destructor = task;
							}
							task.returnType = cast(VariableType)tokenizer.returnType;
							foreach (param; tokenizer.parameters) {
								auto var = new Variable(cast(VariableType)param.type);
								var.name = param.name;
								if (param.refOut)
									var.refType = (param.refOut == "ref" ? RefType.Ref : RefType.Out);
								var.mutable = param.mutability != "immutable";
								task.parameters ~= var;
								task.variables[var.name] = var;
							}
							if (task.callable)
								newClass.tasks[task.name] = task;
						}
					}
					else {
						if (validType(lineSplit[0]) ||
							classExists(lineSplit[0])) {
								auto tokenizer = new VariableTokenizer;
								auto err = tokenizer.tokenize(line);
								if (err) {
									reportError(
									err,
									fileName,
									currentLine,
									line);
								}
								else { // check array, class ...
									if (classExists(lineSplit[0])) {
										auto var = getNewClass(lineSplit[0]);
										var.name = tokenizer.name;
										var.mutable = tokenizer.mutability != "immutable";
										newClass.variables[var.name] = var;
									}
									else if (lineSplit[0] == "array") {
										auto var = new Array(to!int(tokenizer.value));
										var.name = tokenizer.name;
										var.mutable = tokenizer.mutability != "immutable";
										newClass.variables[var.name] = var;
									}
									else {
										auto var = new Variable(cast(VariableType)tokenizer.type);
										var.name = tokenizer.name;
										if (tokenizer.mutability)
											var.mutable = tokenizer.mutability != "immutable";
										if (tokenizer.value)
											var.fromString(tokenizer.value);
											
										newClass.variables[var.name] = var;
									}
								}
						}
						else {
							reportError(
							"Invalid parsing argument for class declarations.",
							fileName,
							currentLine,
							line);
						}
					}
					
					break;
				}
			}
			
			currentLine++;
		}
		return false;
	}
	
	void parseTask() {
	}
}
10/14/2014 00:10 KraHen#15
I don`t want to get into this, but maaaan, functions, please, the long indents are murdering me. Although function wise the code is clean and nice, and seems to do its job (at least after a 2 sec. look)