The online racing simulator
Searching in All forums
(41 results)
2
tehSnaile
S2 licensed
Quote from Gunn :You are correct, but Live For Speed is not a game.

I totally agree with you. Thats why I bought my license.
But however. I was thinking ahead of time. When the product is finished. Altough it's a simulator I think many, many people still thinks of it as a "game".
And no one likes to drive on empty servers and we can't rely on hardcore simulatorfans forever. And 48GBP might lower the total userbase in the future.
Just look at the S1 userbase.. Oh right - THERE IS NONE!

EDIT: Oh wait. You agreed with me. Note to self: Read the actual posts before I replying on them.
Last edited by tehSnaile, .
tehSnaile
S2 licensed
S3 should be the final version imo. It's unrealistic to demand another 12GBP for S4. That would be 48GBP. No game is worth that much. A new released game in sweden costs, 499SEK (36GBP). After 2 months the game usually goes for 399SEK (29GBP). I am pretty sure S3 = final. S4 will never exist. But maybe a new game.
tehSnaile
S2 licensed
Very nice and interessting work. Keep that chart updated. I'd love to see it every quarter.
tehSnaile
S2 licensed
Quote from Frankmd :I use this one:

var = ((p[n+1]&0xff) << 8) | (p[n]&0xff);


Thanks. I haven't tried it yet but I'm sure it works. I guess that "var" was an int right? How about turning it back to a bytearray? :rolleyes:

public int bytesToInt(byte[] b) {
int i = ((p[n+1]&0xff) << 8) | (p[n]&0xff);
return i;
}
public byte[] intToBytes(int i) {
// ????
}

Last edited by tehSnaile, .
tehSnaile
S2 licensed
Well. frankmd pushed me in the direction I needed really.
I have written numerous client/server stuff in my days. Both in C and pascal but TCP.
So far I have a working insimlistener. Events are thrown from a threaded baseclass.
I've decided to continue using this method. Example:

import net.liveforspeed.insim.*;
public class test implements InSimListener
{
public test()
{
InSim is = new InSim("localhost", 29999, "password");
is.addListener(this);
is.connect();
}

public void inSimVersionReply(InSimEvent e) {
VersionPacket vp = (VersionPacket)e.getObject();
System.out.println(vp.getProduct());
}

public void inSimStateChanged(InSimEvent e) {;;}
}

Ofcourse you have to write all eventmethods at this point. Even if you don't use them. Just like ItemListener.
Atleast until I have written adapters. This was fun.

Some problems was ofcourse this thing with Java and unsigned bytes. yeah. They don't exist. :-)
So at the moment I am writing some wrappers. Short s = unsigned(aByte);
Also this thing with converting 2 bytes (byte[2]) to an integer. Still working on that one.¨
My project has grown to about 15 classes/interfaces. Real eventhandling. Real threading.
I'll be back.
Last edited by tehSnaile, .
tehSnaile
S2 licensed
Well. I didn't realize that the packet HAD to be 24 bytes. :doh:
This codesnippet works just fine if someone wanna experiment.
Now let's see what this leads to. I probably won't stop until I have completed something useful. :rolleyes:
package lfs.udp;

import java.io.*;
import java.net.*;

public class InsimInit
{
protected static final int TIMEOUT = 60000;
private String returnmsg;

public InsimInit(String password, int port)
{
try
{
// Prepare the 24 byte array and zerofill it.
byte[] message = new byte[24];
for(int i=0; i<message.length; i++) message[i] = 0x00;

// Fill it with initvalues
message[6] = (byte)41; // Flags
message[7] = (byte)1; // NodeSecs
System.arraycopy("ISI".getBytes(), 0, message, 0, 3);
System.arraycopy(password.getBytes(), 0, message, 8, password.length());

// Connect and send
String host = "localhost";
InetAddress address = InetAddress.getByName(host);
DatagramPacket packet = new DatagramPacket(message, message.length, address, port);
DatagramSocket dsocket = new DatagramSocket();
dsocket.setSoTimeout(TIMEOUT);
dsocket.send(packet);

// Wait for answer
byte[] buffer = new byte[2048];
while(true)
{
DatagramPacket answerpacket = new DatagramPacket(buffer, buffer.length);
dsocket.receive(answerpacket);

System.out.println("Receiving: " +
new String(buffer, 0, answerpacket.getLength()));

// Reset the length of the packet before reusing it.
answerpacket.setLength(buffer.length);
}

//dsocket.close();

}
catch (Exception e)
{
System.err.println(e);
}
}

public static void main(String args[])
{
new InsimInit("lepper", 3333);
}
}

Last edited by tehSnaile, .
Java experiment.
tehSnaile
S2 licensed
Hello. I am that kind of guy that has to try everything. I usually solve my problems but in this case I need a push in the right direction.

From insim.txt
struct InSimInit // UDP packet to initialise the InSim system
{
char Id [4]; // ISI + zero
word Port; // Port for UDP replies from LFS (0...65535)
byte Flags; // Bit flags for options - see below
byte NodeSecs; // Number of seconds between NLP or MCI packets (0=none)
char Admin [16]; // Admin password (required if set in LFS host options)
};

So. How hard can it be to try this in java? Well. I quickly wrote a sampleprogram but realized that UDP is something I'm not too familiar with.
Especially not in Java. illepall
package lfs.udp;

import java.io.*;
import java.net.*;

public class UDPSend
{

protected static final int TIMEOUT = 5000;

public static void main(String args[])
{
try
{
String host = "localhost";
InetAddress address = InetAddress.getByName(host);

byte[] message = "ISI00000password".getBytes();

DatagramPacket packet = new DatagramPacket(message, message.length, address, 15567);
DatagramSocket dsocket = new DatagramSocket();
dsocket.setSoTimeout(TIMEOUT);
dsocket.send(packet);

// Wait for a answer.. Hopefully.
byte[] buffer = new byte[2048];
DatagramPacket answerpacket = new DatagramPacket(buffer, buffer.length);
dsocket.receive(answerpacket);

String msg = new String(buffer, 0, answerpacket.getLength());
System.out.println("recevied: "+msg);

dsocket.close();
}
catch (Exception e)
{
System.err.println(e);
}
}
}

See that string? "ISI00000password".. Am I totally out in the bush here or do I have something going with this code?
tehSnaile
S2 licensed
Quote from al heeley :Traffic-awareness is all part of learning race skills, in real life as well as in LFS. There is no substitute for 2 things:
1) experience
2) Common sense

Word!
tehSnaile
S2 licensed
LFS - Borned at blackwood, lived forever!
LFS - When arcade isn't enough!
LFS - Get a free baseballbat and a crashers homeaddress.
LFS - Worldrecords at your fingertips.
tehSnaile
S2 licensed
I found this by googling 14 seconds.
It was really nice with good music.

ftp://lfsmovies:download@winde ... m:4000/This%20is%20S2.zip
Identical screennames.
tehSnaile
S2 licensed
I refer to this thread: http://www.lfsforum.net/showthread.php?p=30975

It should be impossible to use the same visible nickname on the same server.
It should not be able to bypass by adding control characters. Like ^3^3Nick instead of ^3Nick.

It's possible that this thread should have been under "Improvments".
Don't pick on me now.
tehSnaile
S2 licensed
Quote from Gunn :But if an offender has been banned then it is his real LFS user name that should be banned, not the on-screen nick. It should be impossible to have two identical nicks on the same server.

Well. Altough I registred S2 I mostly play on demoservers. So.. This fails since demoplayers doesn't have real LFS usernames.
I just wan't it to be impossible to have two identical screennames. Visible characters. "^3^3Hello" should be treated as "^3Hello" and even "Hello".

EDIT: I would gladly play on non-demo servers but unfortunately my favourite combination, gti + blackwood is really hard to find on a registred server. Especially if you wan't any opponents.
Last edited by tehSnaile, . Reason : Bad spelling / additional info
Fakenickers
tehSnaile
S2 licensed
Just experienced a annoying thing. Fakenickers. illepall
It seems like it's the new thing nowdays. Fakenicking with a good players nickname and then get him banned.

Todays situation was. I joined a server. I was in the lead. Some less worth human being suddenly changed to my nick (colors and everything) and crashed other cars. I was ofcourse voted for a ban since that shemale voted like crazy on me.

Why does LFS support this? It's totally retarded that somebody can change to a currently used nickname on the same server and then act like an idiot.

Who doesn't agree?
tehSnaile
S2 licensed
I totally agree with every positive thing mentioned above.
This is THE online simulator. It has everything that I wan't. Realism, dedication, great community. It's difficult but not too difficult. The level is perfect.

!Warning! Do not sell to EA games.
"Hmm. First thing to do. Remove realism. We need to sell this to everyone. Paralyzed and blind people included."
My threat stands firm. Do that and I will sell my account to closest crasher for $1..:haha:
tehSnaile
S2 licensed
Quote from Batterypark :Just make sure you don't spend it all at once, you Rockefeller

hahahahahaa :Handshake
tehSnaile
S2 licensed
I bought my license after 1 or 2 days after discovering the demo. However, I only play on demoservers since as of now I just can't get enought of the GTi. :-) 1.33.06 on blackwood. I won't quit until I have 1.32.

Why demoservers then? Well, to be frank I can't find any populated FWD GTi S2 servers. Sorry to say. But hey, buy the game anyway. The FOX is wonderful.

Tip of the day - you can always find a new server. I usually disconnect within 1 minute if I sense the dark side.
2
FGED GREDG RDFGDR GSFDG