The online racing simulator
Searching in All forums
(67 results)
elmohellno
S2 licensed
Quote from G. Dierckx :why not using the JSON file from lfs live progress?

hm?
elmohellno
S2 licensed
Buttons are done and working.

Going to setup more events and Connection/Player access.
elmohellno
S2 licensed
Quote from filur :If open source, yes.

It will be eventually.
elmohellno
S2 licensed
Well I am doing it for some experience. Also, I am not programming anything for myself atm so...
elmohellno
S2 licensed
Are you using Unicode16 or ascii?
Continue InsimInterface?
elmohellno
S2 licensed
Making this thread to see if I should continue working on InsimInterface. I am working on many projects so I want to know if I should give InsimInterface more/less attention or if I should just stop it.

I figure a poll is the easiest way to get a response (The thread has 990 views but that doesn't mean a ton).

Pros:
-Less bandwidth: The regular insim uses a bit of bandwidth. A big hog is the MCI packet which is constantly being received.
-Faster: You don't have to worry about lag between an insim app and the server.
-More direct: With the regular insim, for a request, you have to send a packet then wait for a response to get some information. With InsimInterface you will be able to instantly access any information.
-More info: You can access all the information that the server has.
Cons:
-Windows specific: Sadly, the biggest pro about insim being network based is killed here. insim being networked based means you can have a linux insim/etc. InsimInterface is built into LFS Dedicated so it is windows only.
elmohellno
S2 licensed
I think I am going to subclass everything. So there would be

InsimInterface::Buttons::Create
InsimInterface::Buttons:elete

InsimInterface::Text::SendGlobal
InsimInterface::Text::OnReceive

something like that maybe.

Edit:

Okay, starting to do that. Makes it overall much easier for me and much nicer.
Last edited by elmohellno, .
elmohellno
S2 licensed
Adding more functions, don't know which are more important though. Also, I think I will probably rewrite it when I have it all laid out(sometime between alpha and beta).

I do need to organize the back end a bit, it is gonna be very messy for me at first.
elmohellno
S2 licensed
Been busy but did get 1 thing done this morning.



Callbacks are in place. Now I just need to do 3 more things(before alpha).

-Make callbacks threaded.
-Add system for accessing Connection/Player list
-Add the rest of sends/receives.
elmohellno
S2 licensed
Sorry for no updates for awhile, I haven't abandoned the project. I was looking for ways to do the callbacks while working on some of my other projects. The callbacks are almost sorted out. And once they are that means that it wont be long till this is done.
elmohellno
S2 licensed
My mod needs extensive work. But if you do want to use it, all you have to do a provide it a database with the username/password and it creates the tables.
elmohellno
S2 licensed
I'll try to keep this thread up to date with what I am doing.

A lot of the stuff is inlined so I am writing out the stuff I need atm.

int GetPlayersCount();
int GetConnectionsCount();
int GetClientsCount();
int FindPlayerByID(char id);
int FindConnectionByIndex(char idx);
int FindClientByIndex(char connidx);

For Send_MST_Message all I had to do was.

void InsimInterface::MST_Message(std::string str)
{
MST_Message_Func(0, str.c_str(),0);
}

for MTC_MessageToConnection I have to do

void InsimInterface::MTC_MessageToConnection(std::string str, char UniqueID, char PlayerID)
{
if (str.empty())
return;
int idx;
if (PlayerID)
{
idx = FindPlayerByID(PlayerID);
}
else
{
idx = FindConnectionByID(UniqueID);
}
if (idx == -1)
return;
idx = FindClientByIndex(idx);
if (idx == -1)
return;
char packet[0x44];
memset(packet,0,0x44);
*(int*)packet = 0x2B;
strncpy(packet+0x4,str.c_str(),0x40);
SendMTCPacket(idx,packet,0x44);
}

Last edited by elmohellno, .
elmohellno
S2 licensed
Quote from misiek08 :How to recompile it to console (without GUI)

You can't really without a major rewrite. It is all stuffed in Form1.cs instead of being spread between classes.
elmohellno
S2 licensed
I know how to do callbacks. Wondering how I should set it up so it is easier for the user.
elmohellno
S2 licensed
Just started working on it.



runtime dlls will be supported first.


Still trying to figure out how I am going to do the call backs.

Most likely will look like this (unless anyone has suggestions).

Insim->AddCallback(MSO_MessageOut,&On_MSO_MessageOut);

int On_MSO_MessageOut(Packets::IS_MSO MSO)
{
Insim->Send_MST_Message("Someone just said something!");
return 1;
}

Last edited by elmohellno, .
elmohellno
S2 licensed
what does "no VW" mean?
elmohellno
S2 licensed
I am switching from unmanaged C++ to unmanaged/managed C++ to make some things go faster. So I think the first plugin interface will be a .net interface.

So it would be like the C# open source cruise server. A little...
elmohellno
S2 licensed
There is only a client check for if carreset is allowed. So if the client removes the checks, the server has no problem reseting their car. This patch will stop hacked clients from reseting.

Also will have an update soon. Going to switch over to unmanaged/managed C++ so that I can have low level hooks but high level libraries.
elmohellno
S2 licensed
Lost power over the weekend. I am behind schedule by 3 days. Going to get the fast lookup done first. Then I am going to start this project.

Is anyone interested in helping? (Make like a frontend example that people can use?)
elmohellno
S2 licensed
I will add a fix to my Z3 patch later.
elmohellno
S2 licensed
Quote from Tonttula :I dunno... would it lag the server if you update data every 5 mins?

No, it is the same as you hitting the refresh button every 5 minutes.
Fast server lookup (idea)
elmohellno
S2 licensed
I was thinking of writing up a plugin that would retrieve all the info about servers from my server.

Why? Well currently LFS contacts the master server and gets the ip/port of the servers and then connects to the servers retrieving info. With the plugin, I would have my server grab data every 5 minutes and then you can contact it and get info about every server fast.

Good/Bad/Could care less?
elmohellno
S2 licensed
You are only limited to what the client can understand from the server.

Anyways I will probably start the project this weekend.
elmohellno
S2 licensed
I could always throw in a few interfaces.

-Runtime Dll
-Lua
-pawn
-gamemonkeyscript
elmohellno
S2 licensed
This is caused by sending the "join" packet with a spoofed index.

The server does not check to make sure the index of the connection is the same as the connection index in the packet and uses the connection index in the packet.
FGED GREDG RDFGDR GSFDG