The online racing simulator
Searching in All forums
(987 results)
blackbird04217
S3 licensed
Unfortunately I can not find the replay of the one I want, although under careful examination of these replays I am no-longer sure how it is done. By putting it in slow motion it looks to be Jacko's idea might be correct although in some cases it also goes with my idea that the connection/player id also backs up the theory. Either way if someone wants some replays of ties I've found 6 of mine, although I know there was one in particular where the 'wrong' car one by a very visible distance.
blackbird04217
S3 licensed
Its has been my experience in the races where I've ended as a tie. I know that the other driver 'crossed the line first' but yet I was the one who 'won the race'.

Considering I _should_ have the replay I will try and dig it up, I've had several ties in my LFS career and this is the best pattern I've seen, I know that I had joined the server before the person who had placed second, which is why I was basing it on connection ID, although as mentioned it is possible it is based on Player ID (which makes more sense in the case of single player with AI).

*Looks through 1000s of replays for my ties.
blackbird04217
S3 licensed
Which-ever random way it was put on. Grab, pull, rip, wipe your *** and get over it!

I didn't vote because 'either' wasn't an option, and it should be.
blackbird04217
S3 licensed
Yes that precisely what I was saying, although it should be more precision than just 'thousandths'
blackbird04217
S3 licensed
Quote from MariusMM :I got that as well earlier today when I tried to watch it . It happens when the Al hits the first one/two cones.

By the way



I think it is a lot more then you think!

This is a very interesting project.

I still don't know, from number of views it looks like most people ignore the thread. Probably because I started it in the pre-design phase and that likely was too much reading that a lot of people just started not clicking on and by habit don't any more. I also think it might be the location of the programmer forum. This could belong here or in the Off-Topic I didn't really know where to put it. But maybe you're right, and in either case I am doing this for myself more than others - it's just nice when others are interested... Thanks for your support.
blackbird04217
S3 licensed
Quote from J@tko :First one to do the lap gets the higher position.

EDIT: And @ 250 and 500, deko manually sets first one to do it gets pole

Wrong - I do believe. When two racers finish at the 'exact same time' it goes by connection ID or player ID (not sure). The person who has a lower connection, or player ID will be placed above the other.

-----------------

That said I don't think this has anything to do with the resolution of the physics engine at 100hz. While we all know and can agree the physics runs at 100hz it can give exact times to 7 or 8 decimal places if designed to do so...

For instance Update 5000 car A is near finish line, and car B is a little closer but not crossing yet. Update 5100 now both cars have both crossed the finish line and their times will both read as (either 5000 or 5100 depending on the algorithm). The correct way to do this is to;

CarPrevPos = Car.Pos;
UpdateCar;
CarNewPos = Car.Pos;

Find the time 't' at which the car crossed the line, this is independent of how fast, or slow, the physics system will run. t will be a value between 0 and 1, 0 representing the car crossed the line at PrevPos, and 1 representing NewPos. 0.5 would be directly in the center. The cars lap time would then be; 5000 + (0.01 * t); where 0.01 represents the time passed during a 100hz update. This will give you the accurate number...

LFS does not calculate this level of accuracy, I know this from some of the several ties I have had in the passed, some I've 'won' without being the 'winner'. It was clearly visible, in slow motion, that the other car crossed the line just slightly ahead.
blackbird04217
S3 licensed
When do you get an OOS error near the end of the replay? One of my old replays was doing that to me, on my copy of LFS which had obviously not changed. And I wonder why that would happen?
blackbird04217
S3 licensed
The Ai shifting will be the next step, and it shouldn't be too hard. Though that said; I am still limitting the setup to 40mph. The car went to 40mph not because the AI didn't shift, but because that was the limit I setup for it. I am quite astonished this worked the first try, with only 20 minutes of fiddling with what I completed the previous time - granted I hacked something in really quick so it is not completely appropriate! But, it is a first step!

That said I need to make the AI 'see' the DriveTo points through the visual sensor. As of now I hacked it to grab the DriveTo points through the world directly. Then I will need to look ahead and choose which point to drive towards. Currently it goes from cone to cone, as you can see it turns hard as it gets near the cone then continues on. I have a small radius around the cone. The car needs to be within 2.5 meters of the target, this will need to expand.

The primary test here was to see if the LFS layout format kept track of the object order. Meaning the first cone placed is the first DriveTo point, and so on. Currently if I was to go click in the middle to try adding another DriveTo point it would corrupt the 'ai' file and that wouldn't be good. So the tip here would be to add more DriveTo points than needed, and move them around as necessary, ALWAYS maintaining proper order and only deleting from the back if absolutely needed. But the test succeeded, and that is one less thing to worry about with the LFS to AIRS interface.

But yes, onto shifting and actually driving; which is the hard part. Do remember as I've said 100 times, competitive AI is a hope, but not the goal.
blackbird04217
S3 licensed
New updates for the very few people following the progress here. I have successfully completed a lap with my AI driving!! Ok, so this was just following cone after cone and keeping the car's speed to 40mph and the car doesn't even shift up yet, so that is a real problem as well... But in any situation I still have the AI driving a lap!

The only problem is that is actually the easy part. I am trying to decide whether I should work on getting the AI to go faster through this lap, or whether I should start doing my experimental stuff with the reference points.

Currently the AI doesn't shift up,(except for while waiting on the grid), shift down or do any sort of car control besides 'turn towards next cone'. So it is a pretty non-intelligent driver, but that is beside my point...

The driver went around Fern Bay Club!!!!!!!!!!!!!!!
blackbird04217
S3 licensed
Becky - I'm not an artist, I accepted that a long time ago. If you saw the one provided; it basically takes all the tables out (for good or bad), takes all colors away so that ALL text is black, and background is white with absolutely nothing else including the title graphic; which I agree needs improvement.

Also as a note I am not making this to be the most beautiful, fancy or otherwise next best website of the world, just looking to display information about myself, projects I worked on, projects I am working on and possibly even a few tips/tricks I stumble on along the way. I took your advice Becky and looked at wordpress. Sure by default it seems nice, as far as a blog place goes it looks great and has a lot of options. Made my own; which has a lack of complete everything so I won't post it here. Anyways I had the design I wanted but all the layouts are too damn thin and (actually that was what prompted me to learn CSS in the first place).

So I don't care much about being a web-developer, at this time. And I don't care much about making the prettiest web-site; I realize and accept that I am not an artist but I should be able to display the information in a nice way, which in my opinion the original (and current site I have up) is done in a nice fashion except I built it for 1024 and that is too wide for a 1024 setting ... Stupid me, never make that mistake again.

Thanks.
blackbird04217
S3 licensed
Gaah!

This stuff sucks... I remember exactly why I dislike webdesign and I wished I had stopped this site while it was still functional. Of course I could grab the code from the web and use it here but that has no CSS at all... and the current page is just broken...

For the last 3hrs I've been trying to take the page from a width of 1024 to a width of 960 as mentioned above by SamH for being the 'magical number'. After fighting with the layout for a long time, I finally decided doing it with the newly learned CSS would be best; whats funny was when starting I noticed that IE was not compatible with my site; pictures threw it off. But FF was. So now I test in both IE and FF and guess what, now IE is compatible and FF is not! Web-design... Grrr! That said I still don't have my page width down to 960 and can't quite figure out why. Course within the 100 tables I have it and the seriously shit code that I've somehow made work, there is probably a value that is keeping the page 'too wide'. I've done search and replaced all 1024s and other magical numbers that I used but still no luck...Not that I can easily tell if it is 960.

Annoying stuff, the next time I get it where I want I will stop there and fill the website with other pages of content.
blackbird04217
S3 licensed
While I will agree with the point that it conveys the same information; and that the html code you wrote is likely better in some aspects (especially considering you're adding alternate text for images that don't load like I should be but am not in the habit of doing . . .) So while I agree with those points I think the layout I've done is more aesthetically pleasing; at least in my opinion. It might not be a fancy layout or anything but I think it is working minus a few quirks.

My new found enjoyment with CSS is the fact that when (more like if) I decide to change the color/format of the text say for all the "Shipped Dates" I don't need to search through that file anymore, just open up the CSS file and change FONT.game_shipped { }, and voila all of those are updated. That is what gets me excited and makes this much more flexible than before.

I agree your html code above is a bit (okay, a lot) more browser/user friendly with some bits that I had either forgotten or not learned "html lang=en" or charset=utf-8 or &copy instead of the symbol etc... But I don't know what the difference between <I> and <EM> would be if they do the same thing why change it? Likely because they don't do the same thing and I just see it as the same thing.

And about the pictures being resized in html, I don't know what is so bad about this; besides the browser/rendering code will scale it down to perhaps less than desirable results. However, those images are thumbnails (probably not as obvious as it should be) that you can click on to make the original size; therefor I didn't think I needed two pictures. Although thinking about it from this perspective it makes more sense to have both copies to allow faster page loading. Since even if it is displayed as a small image all those bytes need to be transferred. So with the exception of that performance issue, and visual quality I don't understand/know whats so bad about IMG WIDTH=Xpx HEIGHT=Ypx.

Like I said, I am not a web-designer/developer and never cared much for it. I know enough to get my own things done, but probably more brute force than some would... As you probably noticed.

----------

I do thank-you for taking your time to do that, and I will use some of your more browser/user friendly ideas... By the way are you trying to sell me on the idea of making a page with limited to no layout for this style?
blackbird04217
S3 licensed
:doh: I SEE THE LIGHT! :clapclap:

I am surprised, shocked... ASTONISHED that the little bit of web-development I've learned; both by myself and _ages_ ago in high-school; had not taught me the importance, usefulness or flexibility of CSS. Within the last 30 minutes I have opened a lot of doors that can make the editing of the visual / color scheme of a site with GREAT flexibility... I seriously am dumbfounded how when I took TWO classes in highschool (which would be a full year), they never mentioned the importance of CSS... Sure I had heard about it in my own learning process but figured it was more advanced than I wanted to get; pfft. This stuff is almost as easy as the HTML itself with flexibility of 100 times better!

:doh:

I have made a few adjustments, and fixed a spelling mistake. Majority of the content is the same, although I am contemplating redoing this page and moving the current project information to another page. Which would have two places where my 'work history' is; however one would be displayed more for employers and the other more for general public... I was hoping that it could be combined, but maybe Becky is right...

Any thoughts on trying to keep those combined Becky? Or do you stand by your previous points till the end? (Previous point being that the current information is not aimed at my target very well and thus could be aimed a bit better)

- Time to go add CSS to this little web-site for additional flexibility and learning purposes.
blackbird04217
S3 licensed
As far as the racing, that was great. But the video was rather boring; the default camera shots - and not only just the default camera shots but the same ones over two laps. (Until the very end where you did add another perspective). I know you were likely not aiming to make a quality video; but (and without meaning to sound as harsh as it does) I think this would have been best written in a story vs shown like this.

Add different points of view and play with the cameras for a little bit of time, it will give a lot better result; possibly liven it up with some form of music. Not saying remove the ingame sounds, but some background music would be a nice touch. Like I said, the racing was nice.
blackbird04217
S3 licensed
NIce nice, are you making some form of driving game, sim perhaps or is this purely for graphical purposes?

Looks nice, though I don't know the details behind ray-tracing it does seem like AA needs to be turned on, or something needs to smooth the image; the rims look odd. +1 for the effort!
blackbird04217
S3 licensed
Congrats Greg. Good luck.
blackbird04217
S3 licensed
Quote from Mp3 Astra :I'd use my windscreen wipers to say 'hi' to other players or use it as a secret code for my team mates when I'm about to perform a PIT maneuvre on someone.

Now you know that PIT is unacceptable behavior! :chair:
blackbird04217
S3 licensed
You've been hardly playing a month and already complaining about the need of more content? I've played for well over two years and still haven't got bored with it. Here's a good question how many other games actually release more developments _without_ being subscription based? VERY FEW. So just sit back, race in a UF1, or XRG or BF1 or something that works for you and wait.

Edit: SilverArrows beat me to my point.
blackbird04217
S3 licensed
I have minimal MySQL experience but I believe it would be;

"SELECT number_of_layouts FROM _layout_table_here_ WHERE username = 'Flame'";

EDIT: I don't think this is what you were asking for anymore. But I believe that would give you the number of layouts for a particular user.
blackbird04217
S3 licensed
Quote from Lee Turbo :Hmmm, that all sounds fine and dandy, apart from one problem. I spend most of the day coding/drawing when I am actually writing games.

As far as the loadkb / savekb it does not work with wheels / controllers. I've tried because of the recent AI with LFS project. Currently my copy of LFS is unplayable, and it is so hard to setup the virtual controller that I haven't tried going back to my wheel. I've had the the thoughts of scripts and already use the scripts for other things so I know setting up two controller configurations would not take more than an hour.

I understand spending most of the day doing X then coming home you'd like to do Y instead of continuing to do X. But with coding skills already it would take you less than 30 minutes, on one occasion and save you the headache for the remaining lifetime of LFS. I've played LFS for a very long time, the one product these days that was so worth my money that I have actually given more from buying things like high quality skins; I am no graphics enthusiast, but I've logged countless hours of enjoyment. I would recommend taking 30 minutes of your time; could do it during the weekend when it would be kinda relaxing anyways - all the info you need is available in the Command.txt, right near the bottom. I am actually going to now go make a script to setup the virtual controller - though, a virtual controller I may have to go in and add manual keyboard input to the AI project so that I can see what button id it would be with the virtual controller; also I've noticed LFS (or my G25 perhaps) changes its button IDs when another controller is also plugged in, including the virtual one.

EDIT: Here are two scripts that contain almost everything I need. You gave me the inspiration to make the Player and AI script so I could still play LFS, however for me there is still a transmission selection issue since I have it so the car selects the transmission type depending on the car. And since the AI needs sequential (as of now) I needed to disable that - anyways, since you don't use scripts for that sort of thing it should take no more time than rebinding your keys and inputting the proper values. Good luck.

NOTE: I couldn't find a way to unbind keys. I found a way to unbind axes and buttons but not keys. Shouldn't be too important.

NOTE2: Had to rename .lfs.txt so the forum would upload it. Apparently .lfs is not allowed.
Last edited by blackbird04217, .
blackbird04217
S3 licensed
Android that is pretty much what I mean, I guess in a sense the world doesn't have Forward/Right etc - but it certainly has Up, and in the industry it is common to call them right/forward and whatnot; the more important thing is knowing whether you are talking about world/local space - or as you put it; track/car space.

Anyways, here is a quick update of the finished progress of tonight. I do have the car working as I said in the post above. I added a multiplier so that even when 'close to the right direction' the car will still turn a little bit to have better overall accuracy. The car hits the cone, and continues circling the location where the cone was because that is what it knows how to do.

My next step is to make it follow a track. I will edit a small track in the layout, and do the appropriate changes in code; though I am looking for a volunteer that; can listen well to instructions, and has about 2hrs give or take, to make a layout around an actual track. After that I will need to figure something out to get the car speed higher than 10mph! PM me if interested in making a layout, first person whom I feel comfortable giving the task will get it and the instructions of how; I don't want more than 1 person doing it since that is unneeded work, however when I get the proof of concept done I may tell others how to make more layouts!

EDIT: Added a quick clip of me adding more speed to the AI - goes 40mph instead of 10, still hits the mark - does a little understeering to oversteering and remarkably hits the mark again!
Last edited by blackbird04217, .
blackbird04217
S3 licensed
World space definitely has a right, up and forward axis; And in my world space it is as described above;

Right 1,0,0
Up 0,1,0
Forward 0,0,1

When you put a car in the world initially it starts with that same orientation, meaning the cars right is the same as the worlds right and so on. When you rotate the car 90 degrees clockwise, then the cars forward (still (0,0,1) in relation to Local Space) is now (1,0,0) in relation to World Space). Which is where things can be different from World to Local space, but each still have Right, Up and Forward vectors.

I still have yet to wrap my head around all of this stuff sometimes, though once I get setup I am good to go from there. I do think something is a bit off though, as first of all the AI should have been trying to turn after it passed the cone; so I am confused why it went straight after reaching the destination when the only thing the car can do is head towards that point in space and continue driving 10mph.

I am quite tired, so there are probably a few things wrong and likely I am not making sense somewhere down the line.

EDIT: Ok, after some extensive testing when I finally got the idea to use the 'S' key to place starting points at different angles and make sure my debug display matches I finally have the correct orientation from the MCI packets. It seems X = -sin() and Z = -cos(). It also seemed that another mistake was leading me to believe the prior way was correct, as I used wrong values from testing other situations and never changed it back. I am 90% sure now that it is corrected; and the car drives a LOT more smoothly to that cone which is what my algorithim should have been doing. Actually it now shows that it drives "too smoothly" and misses the cone, only to turn sharper later. So as expected the AI continues to chase the cone forever, and circling it at 10mph. This was the expected results. Thank-you AndroidXP for pointing out you thought it was a fluke; if you still think its a fluke let me know and I will continue investigating, although I am quite sure that it is corrected now since I started the car in several different orientations to be sure the forward pointed in the right direction in comparison to my cones.
Last edited by blackbird04217, .
blackbird04217
S3 licensed
There is a difference between Local and World space yes; but in World space +Z (in my system) is still forward, and local to the car +Z is forward. It is important to know which system your coordinates are in, but should be possible to change from one to another; I haven't had to do that as of yet though.

About the "North" comment this is not really a good way of thinking about it, at least for me. Because it can change; at least I believe so- depending on how it is set out. I still have some things to work out - obviously, and who knows maybe you are right and something is still wrong and it works by a fluke.
blackbird04217
S3 licensed
Quote from AndroidXP :Sorry but that doesn't seem right. I'll draw a diagram as to how LFS coordinate system works.

E: Attached the diagram below (just imagine the Y = your Z). Your calculation would put the X positive and therefore on the right side, having the angle mirrored along the Y (Z) axis. I just want to make sure you use the correct values for calculation, so that the AI reaching its goal wasn't just a fluke.

See, you can't just imagine the LFS Y = my Z. In reality it is LFS Y = my -Z, remember my +Z points forward, and LFS +Y points backward; which is, I believe, what is causing the phenomenon where it is corrected. However, I will be testing more; my AI display showed everything exactly as I expected, I will take a screenshot of it shortly and post. EDIT- posted


Quote from _--NZ--_[HUN] :I would try to get a pixel's color from the location of the virtual start light's green part, that way the AI could "see" when it changes to green.

As stated before I won't be doing any image processing. The pixel location would be different for different tracks, resolutions, window positions etc... Thus I won't be handling that sort of thing; the button press is the best way to detect it for now.
Last edited by blackbird04217, .
blackbird04217
S3 licensed
Because I am paranoid. :P

And actually;

vDir->m_fX = sin(val);
vDir->m_fY = 0.0f;
vDir->m_fZ = cos(val);

Is the code that works; likely it could be that the LFS Forward to Backward and my Backward to Forward axis's switch this around, though I whatever is happening I know that things are working from my debug display. I am still a bit excited; such a small thing yet, really such a big step.
FGED GREDG RDFGDR GSFDG