The online racing simulator
Searching in All forums
(411 results)
MaKaKaZo
S2 licensed
Is this actually my CInsim library??? I don't know anything about outgauge and didn't know that it could be used with my lib Anyway, I haven't touched it since 2008 so the main update I guess is to grab the newest insim.txt in the docs folder and rename it to insim.h and use that for the header file of my lib.

Also you have to look for the line that sets the size of buttons text and remove the comment in it so you can write text into buttons (you have to specify the size of the C string to up to 240 chars).
MaKaKaZo
S2 licensed
In my experience the way I learnt most about how insim works, even after having read the whole insim.txt and having programmed my own example applications was using DarkTimes' InSimSniffer. It should be mandatory to use it before trying any attempt to program using it.

Now, about buttons, sending commands, abd stuff... you just have to read the insim doc. It's not that hard, all text editors have a very nice funtion called FIND, and even though there is a lot of information in insim.txt you can always search things and play with them.

Anyway, the main problem is people trying to pick a big project when they do not even understand the basics of programming, and they try to do things that are too hard for them by imitation and not understanding how it works...
MaKaKaZo
S2 licensed
It looks like it's already working, though we have to do the final tweaks and finishing touches to the base userbar. Thanks guys for your support

EDIT: Anyway... I have noticed that the result obtained when rendering the text is not optimal. I don't know if it's a matter of the library used, the ttf font, or the browser, or a combination. I like the shape and size of the text, but sometimes some letters overlap in a wrong way, or get stretched oddly, causing little imperfections of 1 pixel. Please take a look at the userbar attached and notice the odd separation in the username "YACOMO87" between the letter CO and MO and also in the word PODIUMS in several places.

Do you know what might be causing this? Also, when I generate this userbars locally with my own WAMP installation that I got to work for tests it doesn't look exactly the same. Id it the GD library acting different in different versions?
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
I have "finished" working on this userbar stuff but I can't try it myself, my admin pal has to upload the files and do the testing on a mirror image of the site (I don't have a dump). I think it might actually work on the first try.

I just wanted to post the contents of the final php file that is supposed to receive requests and outputs the corresponding userbar. Isn't this a little bit too simple? Even before trying I have a feeling this might not work.

<?php 
php

// array nome
$uname strip_tags($_GET['nome']);

//Header e output
header('Content-type: image/png');

if (
file_exists("/userbars/$uname.png"))
{    
    
readfile("/userbars/$uname.png");
}
else
{
    
readfile("/userbars/supporter.png");
}


?>

PS: If everything goes OK we'll try and investigate on the mod_rewrite and .htaccess way to do it so it looks better



@ Dygear:

I'm already doing everything you say The same script that uploads the results to the DB calls the function to generate/update the userbars for each driver who took place in that race. Anyway, we have to call the script once for everybody in the DB to generate all userbars based on the data collected so far.

an
Quote from Dygear :

<?php 
$png 
imagecreatefrompng('./stdBackgound.png');

// Place data on to the userbar.

[B]imagepng($im"{$username}.png");[/B]

imagedestroy($im);
?>


Do I need to use "{$username}"? I used just imagepng($im, "$username.png");
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Thanks for the quick reply

That's a lot of info and I'm quite tired now. Tomorrow I'll take my time to analyse everything in detail, and I'll check if we have availability in the host to use mod_rewrite and .htaccess files. I think with this we'll be able to eventually get to it via trial/error
PHP - little help with userbars, please
MaKaKaZo
S2 licensed
I know this is not directly an LFS addon question, but some insight would be very appreciated.

We at Fun Racing League are trying to do dynamic userbars to be used here in the forums and we've come to a wall. We have a php script that generates and deploys a dynamic userbar containing some driver data fetched from the DB.

The thing is, right now that script receives an lfs username and generates the userbar at that moment and delivers it. I thought that would be very resource consuming as the userbars would be generated time and time again for no reason.

So I thought the right way would be to generate/update all userbars on a certain event, that is when we upload new race results (at that moment userbars must be updated). Then all those userbars are saved into a folder as they are created as png images. Then we have a php file that translates a request to a png image. For example:
1.- Race results are uploaded (in this process userbars are automatically generated and saved into the directory http://www.funracingleague.com/images/ubars
2.- Then we have a php file like this: http://www.funracingleague.com/userbars.php?lfsname=makakazo that the only thing it does is to return this image http://www.funracingleague.com/images/ubars/makakazo.png

I think this is the right way to do it. Anyway, right now I don't know exactly how to do some of the things. For example I don't know which functions should be used to store the png generated userbars in the web server, and also I don't know how the php file in point (2.-) does the translation from a GET request to the actual userbar stored. I don't have much knowledge of HTML, though I think that these things can be done rather easily.

Am I on the right path? Any suggestions/tips?

Thanks in advance
MaKaKaZo
S2 licensed
I'm sure there must be other insims that do this, but I don't know if they are available for the free public.

Anyway, this was designed in a very simple way with a very simple programming library. I have posted it on the programmers forum for people to take a look at it and understand the basics of insim. I just posted it here because I thought that some people might want something like this so they have it done in an easy way.
Event Control v0.42
MaKaKaZo
S2 licensed
Quote :Changelog:

v0.42
  • Now uses CInSim v0.6 (more stable and efficient).
v0.41
  • Director commands for penalties.
  • Director commands for RCM messages.
  • Chat commands (!ecmd) now is a button screen instead of chat lines.
v0.4
  • directors.cfg merged into config.cfg for easier config.
  • Added new commands for race directors for some basic server configuration (!elaps, !equal, !etrack, !ecars, etc.)
  • !eon and !eoff for turning Event Control completely on or off (for admins only).
  • Uses new CInSim v0.4 library.

EVENT CONTROL v0.42

This is another application/tutorial I've written in basic C/C++ using my "CInsim" library. You can find the C++ CInsim library and my previous basic applications here: http://www.lfsforum.net/showthread.php?t=47717

All the source code is provided, of course, as well as a code::blocks project file

This application is an event manager (server oriented) developed for the Fun Racing League (http://www.funracingleague.com/). It was originally designed (as Qual Control) to enforce HARDCORE qualify sessions, in which the use of Shift+P and Shift+S is forbidden, so people can only do realistic pitstops by driving into the pitlane and stopping on the yellow spots.

The current version allows further control over race directing, and introduces the figure of the RACE DIRECTOR, which is a driver appointed as such who can execute all Event Control's commands except for the ones to quit the application, and turn it ON or OFF. These race directors don't need the admin password of the server and are just added by editing a simple text file. Race Directors can configure the server for a race (track, cars, laps, weather, restart, end, etc.), but can't kick or ban users, change slots, and use advanced host configuration commands.

It is an ideal tool if you manage a league and you want to have non-admin drivers handling things like race director chat messages, restarting/ending sessions, reversing top grid drivers for consecutive rounds of a race, sending drivers to spectators, etc.



QUICK START

You have to edit the config.cfg file with a text editor and fill the three required fields: IP, insim_port and admin_password. Then run the executable (The PThreads dll must be in the same directory).

Optionally, you can edit the config.cfg file to add up to 50 lfs license names who will have access to all race director's commands.

All players who join the server using the admin password have automatic access to all commands.

When the executable is launched the application will connect to the server and a welcome message should appear. There can be drivers in the server when the application starts, but be warned that the first thing it does is send everybody to spectators.

Start running!


USAGE AND FEATURES

Basic user commands:
  • !ehelp or !erules : Shows the intro screen.
  • !ecommands or !ecmd : Shows the available commands in the chat, depending on the level of the user.
Race Director commands:
  • !em [message] : Sends a preformatted (auto-color, auto upper case) Race Director message through the host chat.
  • !eopen or !eop : Opens the track for free driving. People can use shift+p and shift+s and rejoin again whenever they want.
  • !eclose or !ecl : Closes the track. Everybody is sent to spectators and nobody can join the track (they are automatically sent to spectators again if they try).
  • !ehardq or !ehq : Restarts a hardcore qualify session. In this no rejoin after shift+p or shift+s is allowed. Succesive restarts of /qualify are on hardcore mode until !eopen or !esoftq is used.
  • !esoftq or !esq : Restarts a soft qualify session. In this spectating and telepitting are allowed at all times.
  • !erace or !erc : Restarts the race.
  • !eend : Ends race and goes to lobby screen.
  • !erev [opt] : In lobby screen, reverses the grid order of the top [opt] number of drivers. If no number is used, by default it's 8.
  • !ecars, !etrack, !eweather, !ewind, !equal, !elaps, !ehours, !emustpit, !ecanreset (all like original LFS host commands).
  • !espec, !ecars, !etrack, !eweather, !ewind, !equal, !elaps, !ehours, !emustpit, !ecanreset, !efcv, !emidrace, !eclear, !ep_dt, !ep_sg, !ep_30, !ep_45, !ep_clear, !ercm, !ercm_ply, !ercm_all, !ercc_ply, !ercc_all (all these commands work exactly like the originals).
Admin commands:
  • !eon : Turns Event Control ON. This is efectively like restarting it.
  • !eoff : Turns Event Control OFF. Event control stays completely hidden and silent until an admin uses !eexit to quit it, or !eon to turn it on again.
  • !eexit or !eex : Closes Event Control (must be launched again externally).
Messages are sent to drivers to notice about several conditions and rules are shown at beginning, trying to make what's happening as easy to understand as possible.


I have posted it on the programmers forum (it's highly focused to be a tutorial on insim). The zip file is attached there, but I post this announcement here for non-programmers that might be interested in it:
Link to the thread: http://www.lfsforum.net/showthread.php?p=1403034
Last edited by MaKaKaZo, . Reason : updated version
MaKaKaZo
S2 licensed
I have added a new application called "Qual Control" in the first post, a simple qualifying session manager whose only purpose is to enforce hardcore sessions. I have made a thread for it: http://www.lfsforum.net/showthread.php?p=1403034
C++ - Event Control v0.43 (application/tutorial)
MaKaKaZo
S2 licensed
Quote :Changelog:

v0.43
  • Now uses CInSim v0.7 (more efficient).
v0.42
  • Now uses CInSim v0.6 (more stable and efficient).
v0.41
  • Director commands for penalties.
  • Director commands for RCM messages.
  • Chat commands (!ecmd) now is a button screen instead of chat lines.
v0.4
  • directors.cfg merged into config.cfg for easier config.
  • Added new commands for race directors for some basic server configuration (!elaps, !equal, !etrack, !ecars, etc.)
  • !eon and !eoff for turning Event Control completely on or off (for admins only).
  • Uses new CInSim v0.4 library.

EVENT CONTROL v0.43

This is another application/tutorial I've written in basic C/C++ using my "CInsim" library. You can find the C++ CInsim library and my previous basic applications here: http://www.lfsforum.net/showthread.php?t=47717

All the source code is provided, of course, as well as a code::blocks project file

This application is an event manager (server oriented) developed for the Fun Racing League (http://www.funracingleague.com/). It was originally designed (as Qual Control) to enforce HARDCORE qualify sessions, in which the use of Shift+P and Shift+S is forbidden, so people can only do realistic pitstops by driving into the pitlane and stopping on the yellow spots.

The current version allows further control over race directing, and introduces the figure of the RACE DIRECTOR, which is a driver appointed as such who can execute all Event Control's commands except for the ones to quit the application, and turn it ON or OFF. These race directors don't need the admin password of the server and are just added by editing a simple text file. Race Directors can configure the server for a race (track, cars, laps, weather, restart, end, etc.), but can't kick or ban users, change slots, and use advanced host configuration commands.

It is an ideal tool if you manage a league and you want to have non-admin drivers handling things like race director chat messages, restarting/ending sessions, reversing top grid drivers for consecutive rounds of a race, sending drivers to spectators, etc.



QUICK START

You have to edit the config.cfg file with a text editor and fill the three required fields: IP, insim_port and admin_password. Then run the executable (The PThreads dll must be in the same directory).

Optionally, you can edit the config.cfg file to add up to 50 lfs license names who will have access to all race director's commands.

All players who join the server using the admin password have automatic access to all commands.

When the executable is launched the application will connect to the server and a welcome message should appear. There can be drivers in the server when the application starts, but be warned that the first thing it does is send everybody to spectators.

Start running!


USAGE AND FEATURES

Basic user commands:
  • !ehelp or !erules : Shows the intro screen.
  • !ecommands or !ecmd : Shows the available commands in the chat, depending on the level of the user.
Race Director commands:
  • !em [message] : Sends a preformatted (auto-color, auto upper case) Race Director message through the host chat.
  • !eopen or !eop : Opens the track for free driving. People can use shift+p and shift+s and rejoin again whenever they want.
  • !eclose or !ecl : Closes the track. Everybody is sent to spectators and nobody can join the track (they are automatically sent to spectators again if they try).
  • !ehardq or !ehq : Restarts a hardcore qualify session. In this no rejoin after shift+p or shift+s is allowed. Succesive restarts of /qualify are on hardcore mode until !eopen or !esoftq is used.
  • !esoftq or !esq : Restarts a soft qualify session. In this spectating and telepitting are allowed at all times.
  • !erace or !erc : Restarts the race.
  • !eend : Ends race and goes to lobby screen.
  • !erev [opt] : In lobby screen, reverses the grid order of the top [opt] number of drivers. If no number is used, by default it's 8.
  • !ecars, !etrack, !eweather, !ewind, !equal, !elaps, !ehours, !emustpit, !ecanreset (all like original LFS host commands).
  • !espec, !ecars, !etrack, !eweather, !ewind, !equal, !elaps, !ehours, !emustpit, !ecanreset, !efcv, !emidrace, !eclear, !ep_dt, !ep_sg, !ep_30, !ep_45, !ep_clear, !ercm, !ercm_ply, !ercm_all, !ercc_ply, !ercc_all (all these commands work exactly like the originals).
Admin commands:
  • !eon : Turns Event Control ON. This is efectively like restarting it.
  • !eoff : Turns Event Control OFF. Event control stays completely hidden and silent until an admin uses !eexit to quit it, or !eon to turn it on again.
  • !eexit or !eex : Closes Event Control (must be launched again externally).
Messages are sent to drivers to notice about several conditions and rules are shown at beginning, trying to make what's happening as easy to understand as possible.
Last edited by MaKaKaZo, . Reason : update
MaKaKaZo
S2 licensed
Quote from brandons48 :Sounds simple enough - I'll give it a go.

Any preference on numbering etc. ?

Not really. Usually everybody uses the same skin (at least everybody in the same team), so numbering doesn't make much sense. You can put a 666 on it And thanks!
MaKaKaZo
S2 licensed
Here's a mpr replay of the funniest round we have had. It's an old replay, but it's still gold. There are so many highlights that's it's hard to mention them all
Black/White UFR from Hell
MaKaKaZo
S2 licensed
Hi, I'm looking for an UFR skin themed around "destruction", "hell", etc. with a white base and decals/drawings on black so you can change the base colour with the color sliders and still see the black decals.

This is aimed at a team game we play which is a "sprint deathmatch", where two teams must fight to have one racer finish a 3 lap race, with everything allowed. The team that gets a finisher first is awarded one point.

We use the default UFR skin with different colours using the color-sliders. The idea is to have an agressive skin which is black and white so you can have a yellow, light red, light blue or green car with the same skin just by using the sliders.

I've tried to do some but I totally fail as an artist, mine don't look scary, which is the point

Anyone up for it? I would include the skin in a promo video I'm planning to do
MaKaKaZo
S2 licensed
Liked the idea, liked the video

4/5
MaKaKaZo
S2 licensed
There are some cool lightning effects and skies (loved the moving skies), but I didn't believe the rain and the wet surface. The overlay in the first scenes looks unnatural, you don't see rain like that. And no water-spray from the car just doesn't feel right, even more unnatural. Lightning and reflections are nice, but you didn't get the whole wet road thing to look realistic.

Anyway, it's nice to see people trying new things and you have very good skills so keep it up!

4/5
MaKaKaZo
S2 licensed
I liked the movie overall, the action was fine. But I think you set high contrast and brightness and maybe even saturation and I don't like how it looks, too artificial.
MaKaKaZo
S2 licensed
I'm no expert, but I guess that you can use xvid with double pass encoding. First you should generate an uncompressed master video using your favorite video edition software (premiere, vegas, etc) and then use something like virtualdub for compressing it into a normal sized video using a two-pass encoding codec. I think all of this is covered in the "making LFS movies #2" thread in the "Editing" section: http://www.lfsforum.net/showthread.php?t=53389

Fraps is OK.
MaKaKaZo
S2 licensed
Quote from ChiliFan :guess who's back with another mediocre video about people on public servers who can't drive

this one goes out to everyone who drives into an accident and tries to recover while it is still happening

http://www.youtube.com/watch?v=PhxK1Vun8gw

Loved it Is that IHR server?
MaKaKaZo
S2 licensed
I wouldn't spend a minute trying any of those, but I liked the video, it's something different You guys have too much free time on your hands.
MaKaKaZo
S2 licensed
Anyway, the way LFS is I would rather see any circuit that allows multiple configurations. Think that you don't get new circuits for this game that often, so when a new one comes along I hope that we don't have just the normal/reverse versions, but also multiple choices as we have in FE, AS and SO. That's something this circuit can't provide.

Again, I like this track but I find it too narrow for LFS. It's not really a good track for most of the cars in the game.
MaKaKaZo
S2 licensed
Quote from manneF1 :btw, is it possible to download the stream somewhere?

Yes. Go to the multibc site, click on downloads on the top of the page, and then browse "stream 3" and look for the date of the race "23 february 2010". I downloaded it yesterday night after the race. I had to play it with WMP because it needs a microsoft codec, I guess a Silverlight codec.
MaKaKaZo
S2 licensed
Is this the definitive version? I miss some text, logo or anything that indicates that this is a promo movie of the Polish LFS league.

The video is very cool, but as they have said, skins would make it look a lot better, also some text or logo relating it to the Polish league is important, and the ending could be better. It looks kinda incomplete to me, like most of the hard work has been done but it needs the finishing touches.

+1 to no more drifting movies that look all the same.
MaKaKaZo
S2 licensed
It's a shame that nobody wants to organize championships anymore... I raced in a couple of races based in your gcomp platform, but never a whole championship, mainly because I didn't like the combos chosen all that much, or didn't have the motivation.

I did the Spanish translation (which could use some fixes) and I know there's a lot of work in this. Maybe the whole system was too complex, like having to register for every single championship instead of registering just once to a master platform and then manage all championships from within it.

I've been wanting to organize a couple af championships for a long time, but I never find the time to do it. Anyway, I think that this gcomp platform wouldn't suit my specific needs.

Loved the interactivity between gcomp and lfslapper though ;-) Your average lap time pre-qualifying system was a nice touch.
MaKaKaZo
S2 licensed
If you are starting with insim go pick DarkTimes' InSimSniffer right away:
http://www.lfsforum.net/showthread.php?t=60417

It's the ideal tool to check how insim packets flow so you can understand not only how packets arrive but also it helps you understand the contents of those packets.
MaKaKaZo
S2 licensed
Quote from Kiyoshi :Shot in the dark request for help.
I downloaded this, along with Code:Blocks & the latest MinGW.
It doesn't want to link though, and I get the following error:

ld.exe cannot find -lpthreadGC2

I'm guessing it can't see the lib, which is in the project directory.
Can anyone shed some light?
I got TAAs insim demo to build & run. It has no libs though.

Everything is provided within the file, both the pthreads library and the dll (I checked the license terms and I think I can provide the dll as long as I provide all the code of my project).

I don't remember very well, but this was a bit tricky. I think you have to link the project to the '.a' file (the library), and then have the dll file in the same dir as the executable generated. I mean, even if you link to the library during compilation and everything looks fine, you need to have the dll to launch the application. I tried many things and I went through many forums and nobody seemed to have the answer as to how to link the pthreads library statically to the project so you don't need the dll afterwards using code::blocks.

Remember: link project to "libpthreadGC2.a" and then place "pthreadGC2.dll" in the same directory as the binary executable. If you use code::blocks the executables are generated in folders named "release" or "debug". You can't launch the application from there unless you copy the dll to those folders.

Anyway, in the bin/release folder of the zip file you can find an executable which you can copy to the directory where the pthreads dll is and you can run it directly, no need to compile it if you just want to test it.


@blackbird04217:

I know that there's a lot of stuff missing or that could be improved in this app. But I don't know exactly the purpose of doing what you say. What is wrong?

I guess one of the main things to improve would be to detect the kind of session (multiplayer/single player), and connection to either client/host to make some things better. Right now it's designed as server oriented, and you if you connect it to your client it won't work, or work badly.
Last edited by MaKaKaZo, .
FGED GREDG RDFGDR GSFDG