The online racing simulator
Searching in All forums
(129 results)
Greenseed
S2 licensed
ho yeah! was just trying to expose other solution...

Node calculation is much faster then tangen offcourse

But me i work with Angle allready, so into my code i think i will use this... but in fact i won't too , since i wan to build track_template data, my system is ready, but still empty Data

exemple: node[2] has this data: Neutral Angle -123.4 , Speed Max for a Curve, Script Trigger, ...

Neutral angle is offcourse the ~Trajectory Angle if your Strait in the middle of the track.

This check will be the one i can think of has the fastest and more flexible system, since tracjectory angle is allready calculated by the LFSS and much place so people add custom script trigger and keep the search for it limited to the same node.

I read very ofent ppl wan to put virtual Square or Circle to trigger script or action, for me all this is part of the same system.
Greenseed
S2 licensed
Not sure i follow you... but if you wan to know if a driver is turning clockWise or not on a track, can be done with checking the y tangen angle from car x,y to 0,0 if you got : 51,52,53,54 mean i got clockwise if you got 54,53,52,51 mean counter clockWise. all track, Star/Stop are connected so work allways good, it just a way, i thought of some other.

Is that what you are looking for?
Greenseed
S2 licensed
Agree about your optimization idea... thx...

Im just allways thinking like i have 2500 player to check... have to remember MAX is about 32 ... so fun

About Node length i really don't know, but there is a lot of node on a track, so probaly yes they are all divised by a static lenght, i let you do this test, since i really can't thought of something usefull with this... Maybe if you tell me more , you will attract my attention...

i just completed the code i showed you, into Drive_LFSS project, proud to tell that my Back Pre Collision detection from Bad Ass Driver is working, not yet perfect but ho! shit! Player without brake will found that one not so amusing as before

P.S. hope the "shit!" word is not a ofend! im trying to be better into english, i notised "shit" and "****" are very important verb (juts trying to add little joke!)
Greenseed
S2 licensed
Hello Makakazo, i checked your code, since im working into similar code at the moment, so thx to show your inside brain

i add you a link to a part of the code i created to pre detect a Collision or dangerous driving for other.

I show you the code, cause i saw you have no Grid system, mean you Update and Check Pos from All Current Player...

Since a race track has many Node, we can use this to create a virtual grid with player inside, so no need to update all player but just one into same node or closer node.

into my code: Add() is called by PlayerJoin Race, Update() When i receive a MCI and Remove when player leave race.

Im just showing you the node2Grid system , is not complex, but since you don't have into your code, is maybe a good idea to add it to, for saving cpu.

So take this as a sugestion only... and thx again for showing your work.

http://pastebin.ca/1190435
Last edited by Greenseed, .
Greenseed
S2 licensed
Drive_LFSS project will be able to do all this....

The way is construsted, at anytime from anywhere you can know the Speed of a car, + soon i will code the pre-Collision detector, my goal is to predict with a high % of sucess that a player will cause trouble, like having a too high velocity into a curve where all car in front Break.

For the Interface that will make control all game feature and Admin Command, im into the codding of this for Drive_LFSS , so very soon will have a Graphic interface to control many thing as a racer or a admin.

+ League Administrator, Drive_LFSS will be soon able to work close as CTRA System, i mean with predefined Race_Template into database, will start/stop race and choses the next trackCar restriction, the database system for this is most complete, i just need to complete the ingame GUI interface.

The GUI interface will be design by button_template and interface_template from the database, so a admin will be able to customize it.

For stat Output, not very complicated, i save everything: Qualify/Race/Lap/Driver(Car/Licence) each of each is saved, completed or not a race is saved as is starting status and each lap is saved for moment event Bot got saved, but this will be removed at the end, for moment help me gather info.

Drive_LFSS has a simple c# script system, completely external as the Core project, so the file are pretty small and clean, so very easy to write a script, there is no many ScriptCall or Script->CoreCommand , but this take about 30 seconde to add a call/command, so i will do under user need, and for the moment ther is no user/tester for this project .


Hope you found your self interedted into that project and maybe will motivate you to learn more on coding


have a nice day.
Greenseed
S2 licensed
here is a more profiled version



public static readonly Dictionary<string,byte> carTimerLength = new Dictionary<string,byte>
{
{"UF1",5},
{"XFG",5},
{"XRG",6},
{"LX4",6},
{"RAC",7},
// and so on

};
public byte GetTimerLength(string carPrefix)
{
if (carTimerLength.ContainsKey(carPrefix))
return carTimerLength[carPrefix];
else
return 0; // or what ever is your default value
}

Greenseed
S2 licensed
Maybe something similar to this:

Dictionary<string,byte> carToTimerDic = ...
carToTimerDic.add("BFG",15); //I predefine all this

in place of the case i put this:


if (carToTimerDic.ContainKey("BFG"))
return carToTimerDic["BFG"] (MyTimerDefine value)
else
return 0; // or anything you love
Get the Final Qualify result
Greenseed
S2 licensed
Hello everyone...

When i receive a ISP_STA with QualifyfinishedCount >= QualifyCarCount,
i request a ISP_RES packet, so the server will send me all Result packet, but can happen under specific condition that a car will be able to make another FinalResult, and if is time beat another car time, ISP_RES for all car that change position will be send again.

My question here is not how to get result, this is not a probleme, they exist many way, im just pointing one way here. the point is during a qualify i don't know when to stop the race, i mean how i can be sure is really the Final result...

I see some very complicated solution, but i don't feel my idea are great... so im asking for other idea hope you can light me
Greenseed
S2 licensed
About your benchmark ForceMagic, is not good , since your are using a ConsoleWrite with it... so in fact your are benchmarking the ConsoleWrite.


Inside the loop must has nothing except what you wan to benchmark... and do it as into real life is duration is about 5 seconde not too more and too less and do absolute nothing with your computer during thoses 5 seconde... event like this thoses are very poor test... but can gave a good idea!


while(<5second)
{
count++
string temp = Getvalue();
}
How many can we count?

you can too do it with a specified count like 1000000 and calculate the time, it about same!

Greenseed
S2 licensed
Ok, i added this Generic Config, removed Server Class and readded MySQL since MONO has 100% support for it, tested and working as a charm!

So next task will be getting SQLite and MySQL online.

P.S. read the SVN log , sice i changed a lot of thing when removing InSImSetting and Server Class.
Greenseed
S2 licensed
Im pretty questioning my self about config system, do we go Specific aproch that run very good on this project and had some rock and roll to it. or do we create a generic config system.

So as you know Forcemagic, i was working on another project and i needed a config system too, i was about to try your system, but i found it was very much design to work only with DLFSS, with some modification i can be able to manage, but since i wan to answer to the first question, i created a generic config system.

I call it "4dot" config.

Here is the config File with explanation how to use.
odbc2mysql.cfg.txt

And here is the source code of the config reader, class implementation are not that good or bad... i don't know.... im still learning how is best with c#.
config_reader.cs.txt

And here is a bit of code showing how i use it.

public static class TransferInterface
{
private static List<Table> ...
private static void Initialize()
{
List<string> odbcFormat = ConfigReader.GetIdentifierList("ODBC","TableFormat");
List<string> mysqlQuery = ConfigReader.GetIdentifierList("MySQL", "TableInsertQuery");

List<string>.Enumerator itr_f = odbcFormat.GetEnumerator();
List<string>.Enumerator itr_i = odbcFormat.GetEnumerator();
while (itr_f.MoveNext() && itr_i.MoveNext())
{
tableList.Add(new Table
(
itr_f.Current,
ConfigReader.GetStringValue("ODBC", "TableFormat", itr_f.Current),
ConfigReader.GetStringValue("MySQL", "TableInsertQuery", itr_i.Current)
));
...

This example show how i call to Custom Config Identifier... So i ask for the list first and then iterate it. Into the example i do 2 into the same time.


I will wait you see my code, before doing any action to the SVN... i think we must discuct that into private will be best!

P.S. The Regex into the configReader can be much better, allready got another one. Ho! and Don't bother to try password "dexxa" on mysql server
Greenseed
S2 licensed
Quote from Greenseed :Server: jabber.aleajecta.com , just have to create your self a account with Spark.

MIRC Chat -> irc.aleajecta.com port: 41410

Most popular jabber client will work, but i don't permit custom Client working, only popular one! for secure reason.

"PSi" is a good example of another Jabber popular client working on my network.
Greenseed
S2 licensed
We allready have solution for Chat/Talk/Phone and Video.

Here is:

Jabber XMPP(IM, VOIP, Video) network:
I sugest you use this client -> http://www.igniterealtime.org/downloads/index.jsp#spark , who si free and openSource.

Server: jabber.aleajecta.com , just have to create your self a account with Spark. P.S. my jabber network Accept Transport for: XMPP, MSN, Yahoo, ICQ, BuddyChat, Google Talk(Alpha) and more.

It free simple and have a lot of cool feature.

I also have a Forum: www.aleajecta.com/forum , this is more about World Of Warcraft, but on the need i can create Section for this project! if ever he need it.

Asterisk Aleajecta PSTN/VOIP/Video -> Private -> voip.aleajecta.com

MIRC Chat -> irc.aleajecta.com port: 41410


If you connect on with Spark, just do a search for "*" as username, he will show you the complete list! from there choses your friend
Greenseed
S2 licensed
What ever!

When your tired of searching...

Im free to help you with the best i can gave! on DLFSS Project


JamesF1, i see no ofence, at the moment you taked the time to really look at my work, and that answer is == to your opinion!


P.S. i learned codding with: www.mangosproject.org and was the best thing ever for me! a in-developement project so as i say before no good no wrong really depend on the person!

And totaly agree with: JamesF1 starting with some more experienced then you is far then good for all the question you may have!

Will you have a bad style or good , cause your teacher, in the beggin for sure! but when you start thinking on your own! maybe you will learn to the teacher!

Do we have make the circle around that question... i really don't think so haha! But me i think i have! so on this! hope you, start some where!

And other see ya into another thread!


P.S. when im reading my post, i look cold.. but english is not well know by me! so im limited the way i presente my view! hope you understand!
Greenseed
S2 licensed
The solution i allready have for this into DLFSS Project, can't be apply to your project and way.


But i think this code can maybe helpfull, for your threadind system.
http://zthread.sourceforge.net/ (Licence is compatible with GPL).

I worked with this code for 3 year on www.mangosproject.org (MMORPG Server), and i can say! Rock And Roll!

Working on: 32/64 Bits - MacOSX, Window and Linux, really hope it help you!
Last edited by Greenseed, .
Greenseed
S2 licensed
master_lfs.5101, i will say as Forcemagic told you , come see DLFSS Project, who is openSource and as primary goal! meet new Commer! and Learn, and is c# as you requested first!

To comment other post into this Thread! did you really intend to help the author of this thread! or start a fight on witch girl is the more beautiful?

Chosing a Coding Language, is a personal question.
So, no Wrong no Good.

If you feel Joy, inside, that mean this is your Truly you!


On this i really hope! you start somewhere, master_lfs.5101 and don't be d ... e, all will go in place!
Greenseed
S2 licensed
Added: to Revision: 35, Thx ForceMagic.

Your patch pose me a good question, since we will Make the config Dynamic, i mean during run operation, will be possible to change config, without restarting the application.

So all config variable must be access the fastes way. so Here is my question:

Witch is the more faster between:
private int config = 0;

int Config{get config;} OR
int GetConfig(){return config;}, Personaly i prefer this one, since im not very use to proprety.

Witch one is Faster?
Do have have to benchmark my self?, let see!
Greenseed
S2 licensed
Added to revision 33. Thx! dude!
Greenseed
S2 licensed
Hello Forcemagic, thx for your patch.

Added revision 30.
Greenseed
S2 licensed
Quote from traxxion :
Try that?

this is doing same thing, i mean a Try,Catch , but in fact i think there is maybe more,for sure "TryParse" has a "try,catch" inside somewhere.

Have to read on the Globalization, but you know playing with "String Format", is allways A very slow thing... so i prefer keeping the simple "try,catch". but many thx for your input! i learned something that can be usefull somewhere else

Diff between Convert and Parse, are, Parse can Format and Convert no, so im pretty sure if we tick time a while loop for 1000000 time, she will reveal, Convert faster! and both report Exception on Overflow!

i have to tell my self that a exception is not allways a bad thing into a "Safe Environement" as c# use to be! i just terribly fear try,catch! i was thinked there where slow! but since i found that they exist a "Unhandled Exception Event" so mean everything is into a BIG try,catch! It only my poinr of view not fact!


On this, i continue to talk too much!

see ya!
Last edited by Greenseed, .
Greenseed
S2 licensed
Hehe! very happy to see you there my friend!

Your patch as been applyed: revision 26, thx you!

I had to add a "try,catch" on the string conversion! apparentely is the way to check if a string is from a certain numeric type!

Ho! and i added some Syntax help! i think your forget that! haha!
DLFSS Project
Greenseed
S2 licensed
Removed from here...

Please follow this link to get onto Drive_LSSS forum Page.
http://www.aleajecta.com/forum ... p?showtopic=6022&st=0

Trac Drive_LFSS WWW Page
http://maya.aleajecta.com/trac/dlfss/wiki
Last edited by Greenseed, . Reason : Removed From www.lfsforum.net
Greenseed
S2 licensed
Im not very interested into a such programe... but im interested to see your VB code!

Im hurry you make it OpenSource! if you do...


On this i witch you good luck with your project! see ya!
Greenseed
S2 licensed
Ok, thx... i din't know that!

Another great feature from LFS ...
Help with the meaning of "Take Over Car"(TOC)
Greenseed
S2 licensed
Im codding a insim additon for LFS server, i allmost complete my core, so now im looking closer to the InSim packet.

But i can figure what is a "TOC" ... and why that need to change the PlayerID and Connection ID... since they have OLDUCID and NEWUCID for proprety.

So if anyone can tell me more about that.. will help me better desing the Array to maintant all Current Player Session.
FGED GREDG RDFGDR GSFDG