Oh right, I remember reading that. Nice nice. Well I think we can all work together to find the object IDs of the common objects and make a big table of them for future use. I am not to this point in my project yet though I will of course be willing to pitch in on finding IDs because that seems like it will be a bit of a pain since the only way I can think of doing it (accurately) would be placing one object in a layout, reading the layout and matching the ID.
EDIT: Sorry for derailing the LYTe - Layout Editor thread. Please let the ObjectID discussion happen elsewhere since it isn't the objective of the layout editor.
I know your working on a database for layouts but can I ask what use the object index values would be to that? Or are you working on more than just a database there FlameCZE?
I don't know why there is any sort of limitation for the button text, never ran into that. Although I didn't use this library I just made my own and it seems to work find sending that variable lengthed packet. If he had to choose a constant value why not choose the maximum?
About windows vs linux;
closesocket(s); in windows becomes close(s); in linux/unix
windows needs WSAStartup() and WSACleanup() calls at the start and end of the networking project where as linux would not.
Using blocking sockets would require a call to fcntl() instead of ioctlsocket(). There are probable a few other things I am noth thinking of. I have never written networking for linux/unix or other operating systems however I have read and remembered those bits of info - somehow...
By any chance do you have a list, or know all the object Index values per track? I understand they change depending on the track but when it comes to making my AI 'map' I will be using "blue cone" to place the driving line, "red cone" for left track edge, and other specific objects; which mean they will change from track to track. On the wiki-page it has some of the values but not all, and certainly not all for all tracks; the most complete listing was the autocross area which is what I am currently using to get basic functionality in my AI.
If you have this available it would be a great resource, I don't know how your editor would work without it really. Thanks either way it goes.
Nope, but even then I don't feel that resembles how a player gets lockup information. Where I do not need my AI to be 100% realistic in capturing the information it needs, I do want to stay as realistic as I can, and where I can't I want to keep it seemingly realistic. For instance; detecting exact traction of the tires is not realistic - but if I was giving the 'approximate' state (UNDER, AT, OVER LIMIT) then I consider this realistic even if the values did not come from sound/visuals as they would with the player.
I've been wondering if I could use G forces on the car; however it will likely not work very well. My idea was to track the amount of g force against the car during braking, if that force goes down the brakes are locked; so apply less brakes for a moment. However this has issues, the car could have been bumped by another, or other reasons which don't represent locked wheels but a decrease in force; also the force is not always X while braking, it changes a lot.
Hmm thanks for that, I didn't consider that the speedometer might lag behind a bit - that will make things a little more challenging than they already are. Back on page 1 you can see that I wanted the AI to know the state of each tire; and that should have been enough to know in a context dependent environment. However with LFS I can't get the state of each tire; as far as UNDER, NEAR, AT, or OVER_LIMIT. With that information on each tire the AI can detect anything in a context dependent state.
CONTEXT SYMPTOM FIX Braking A Tire > AT_LIMIT Less Brake Pressure Acceleration A Drive Tire > AT_LIMIT Less Throttle Pressure Turn+Brake Outside Front > AT_LIMIT Less brake, less turn Turn+Accel(FWD) Outside Front > AT_LIMIT Less throttle Turn+Accel(RWD) Outside Rear > AT_LIMIT Less throttle, slightly less turn for a moment Turning Outside Front > AT_LIMIT Less turning force Turning Outside Rear > AT_LIMIT Opposite lock, minimal thottle/off brakes (to shift weight towards rear)
Howerver LFS doesn't get this information; One can argue that a player doesn't receive this information but I think with sounds and feeling (including the visual slip angle feeling one gets from driving in simulations) the player can get all that information immediately. Which there was a way to do that for LFS as it is kinda needed - I think.
There are hundreds of things we know intuitively, which is hard to make an AI that knows and obeys all of those things...
Okay, something that needs to be added to the prevention layer (when I get there) is the ability to detect when the drive wheels will/are spinning. The same will go for braking, I will need to detect if wheels are locked.
I have very little physical information about the car that is being driven and somehow I need to detect wheel speed - which is impossible, and also one of those things that the AI shouldn't need to know about. (A player doesn't measure the wheel speed when they are in the car - except perhaps by the tachometer/speedometer and judging of the reference points . . .).
Ok, after thinking about this for a while now I think I finally answered this in my post! I believe, since the AI knows the speed they are traveling - they can compare this to the speed of the speedometer; and see that they are applying too much throttle.
However the same is not true for locking the brakes; as there are other wheels not attached to the speedometer, or even only just one wheel is locked... A player gets this information from sound, and sight in some cars. I am not about to make a sound interpreter or image detection. So I've answered have the question. Any ideas to do this accurately with minimal data available?
After looking at the picture I am pretty sure the Autocross Area in LFS is too small. That said, do you know the data format you phone(s) will give the GPS data? I need this information before I can try doing this, although as said I think the area might be too small.
Like others it depends on the situation. If I know I am at fault and I can let the other driver back without killing my race I will do so. If the accident caused the other to get badly damaged, or into a place where he can't catch up to me easily, then I will continue on driving and say sorry after / deal with it after. This happens in real-life as well, it is very situational. (Although as mentioned in real-life a crew is being updated as to what the officials dish for penalties or not.
From the administrative side, this is a huge issue with the Head-to-Head system. The type of knock-out racing can be greatly changed by a little contact. Even penalizing the person at fault after the race, the victim of the incident walks away with less points than they may have otherwise. There were some very controversial races in the last couple of seasons. To have real-time judging of these incidents would be the solution, however I don't feel comfortable judging something with that importance under time constraints. Maybe in the future this will be resolved; but as it is I like seeing the sportsmanship that exists in that league, however there are times when the competitor should have continued going, faulty or not.
I didn't vote because there isn't a correct answer in my mind it is a situational issue.
Thanks, be sure to update me/this thread so I can help with this GPS thing, I'd like to play on some IRL autocross tracks. That and my AIRS project needs to know this as well!
I have been doing some more of the technical design, for ease of use (to switch from project to project) I decided to make AIWorld be the main point of access. The project/simulator has no idea about the AI Drivers, or anything about that. Instead it has a bunch of different structures to communicate with the world. I have still been working with LFS at this time, though the AI part of the project should be able to be placed in any other project.
I've named the project as well. A.I.R.S. Short for; Artificial Intelligence for Racing Simulations. I am not looking at creating gaming AI - and as stated before I have no idea or intentions of this AI actually being competitive as it is all experimental. That said my main connection with LFS is written inside the "LFS_to_AIRS" conversion file. This file has handlers that receive InSim, OutSim and OutGauge messages, and using these messages it will update the AIWorld.
I also have an idea of how I want the driver to deal with the world through the PhysicalSensor, VisualSensor and CarController; however not all the details have been worked out. The limitations -should- be placed within the sensors themselves, before it even gets to be used in the AI brain, however since I want to allow the AI to follow a line directly (as the first stage) then the sensors will likely need to change or something.
I have setup my very first, very simple, test situation at the autocross park. About 50 meters in front of the starting location I placed two green cones; for human use and saved that file as "AI_VIEW". I also placed a blue cone in the center of the two green ones, and named that "AI_DRIVE". The Ai Drive layout will be loaded since currently I look for the blue cone - and I realize this will get more challenging when it comes times to support additional tracks - and make that the AI's destination. The AIWorld starts in state AIWS_GRID_WAIT, which means the driver is waiting for the lights to come on. then it will move into stage AIWS_GRID_WARM, which means the driver should shift into first and get some throttle input to increase engine revs. Finally the state will change into AIWS_RACE_GREEN, which the AI should start driving.
However, currently I need to work on the shifting. I did shift the car into first, although it doesn't happen in the game so I need to work on the "CarControl" class; which will end up being where driver reaction times come into play and the whole "PrepareTo(SHIFT)" thing will come in to make things more realistic for the AI, although harder on the programmer!
I've also been thinking about my "layered" driving system, where the first layer makes the controls that the driver wants to happen; even if its 100% throttle in an LX6 while cornering. Then the next layer looks at the controls from that, and modifies it; so that the throttle is not 100% since this layer knows it is likely a bad idea. The next layer handles things that have become a problem; understeer/oversteer etc. And of course another layer will handle the shifting and other actions of the driver to keep the car within the preferred power-band. I have yet to figure out technically how I want to pull it off. And I also have yet to figure out how to add the 'emotions' to the AI; the stress/business that effects things like reaction time and sensory input.
Of course that will come in time, for now I just want to drive the car from the start point, through the green cones; and then add more points for the car to follow. Of course this is following a predetermined driving line without any visual sensor input; but I've got to make sure I can drive the LFS car before I try the experimental stuff!
Thanks for reading, hope you enjoy and show the support!
Speaking of this I have just investigated and the latest Layout Format is 251 and not 247.
The Wiki article shows the version at 247 and the LFS programmer file format shows 250. I don't know what has changed, or when it has changed but that might pose a threat unless it is discovered.
Yea, I am not really interested in learning more web development, and there is a reason the website is not very graphically oriented. Screen shots are really going to be all the art. Thanks on the magical 970 number. I will fix it when I get a chance. I am trying to stay as basic as I can since I do not want to deal with browser incompatibilities and that sort of thing...
@Becky - I don't want to use wordpress or such because the blog I am creating is just an outlet really, I don't need people posting comments; though if I ever do decide to get more advanced I will look into some pre-made thing. My goals are not to become a web designer, I already know I lack the graphic design side of things; I don't deny that. Actually web development is extremely boring to me, I'd rather something more interactive.
About the physics thing, my comment "I understand how crucial it is to have a fixed timestep " was meant to be more of "I understand how crucial it can be to have a fixed timestep " My current project is a turn-based game with physical simulation between the turns, it needs to be 100% deterministic. Just in case it's misunderstood; by fixed time-step I do not mean fixed frame rate, or making physics run differently on faster computers; Just to say the physics are locked to 100hz, and the framerate can be 60hz to 1200hz or whatever it might be. Anyway that is slightly off topic, and with a little more artistic ability I will be posting screenshots and a description of the prototype project here.
Thanks Becky for the honest and straight forward piece; out of all the coworkers and some people that should have spotted some of the more obvious mistakes; like me not displaying my skills properly, no-one has mentioned this until you. Though, the page isn't only for job hunting, it is also to list the projects I've done. As far as more pictures, I am still waiting for more information from Stratogon before I can gather that.
No, I am not a web-designer, this is the best, furthest and most content filled web-site I have ever made. I didn't make it with front-page or anything except notepad and my; very basic, html 'skills'. Which included h1-h6 (although I only used h1 here), p dl/dt instead of ul and li and img, tables and i, u, b appropriately (imo)... I don't like WYSIWYG editors on most things when they over complicate things later in the process. I'm not a web-develioper, correct but I did plan on making this layout so it would work when I wanna blog about personal projects later. Just paste the template table at the bottom of the page, add a date and the content of the entry. Which would be simple.
hyntty - thanks for the notice. I developed the website to be 1024 wide, I didn't realize that I needed to be smaller than 1024 in-order to fulfill that requirement. Does anyone know what width is actually used to support a width of 1024px without creating the bottom scrollbar?
The site is missing a huge component, which is the top menu to navigate the site and to go to a personal projects page and other things that would further show area's where I've learned networking.
Also the list of skills were broken up the best I could into; APIs/Libraries, Interests (and VS is obviously a dev environment that didn't fit here or elsewhere), and languages. Perhaps the list should be languages, api's and interests. However I think that you're point will still stand about some of those not being displayed in the projects I've worked on as I've only yet worked with networking on my personal projects; from LFS with InSim, to a current Prototype project I am working on to many other including a voice-communication that worked surprisingly well considering.
Though, Physics, not so much, there are no real projects to back this up. The concepts of linear physics; gravity, friction, and spring-like forces are easy, and I've implemented that several times. Rotational physics have bitten me. I have a strong desire to learn this, and get passed it since I attracted to and pulled towards the physical side of games and more importantly simulation. I mean, I understand how crucial it is to have a fixed timestep, and the flaws with Explicit-Euler Integration (which is the most basic, and I still believe is accurate enough for games but I will figure that out another day). That said the most impressive physical thing I've worked on is my Tire Simulation, which is a neat deformable object, and was a great project.
And finally, I wanted to ask where you saw the negativity on the page? Where you got the feeling that I didn't like the project/work environment? Because I would say on all those projects it wouldn't have been the case. I was a little disappointed to only come in mid-way through the big project, but that proves I have the ability to catchup to speed quickly in unfamiliar territory.
Thanks for all the feedback, I will see if I can fix somethings, although I wonder how the content is for just a general, professional developer page. I still need to add personal projects, but I think this page is long enough already and that personal projects needs to go onto a separate page.
Yea go ahead and spell check, I reread it all a few times and spell checked in OpenOffice, but some grammatical errors are not pointed out all the time.
Thanks for the find!
Edit: Changing to: "The confederates are coming, wait now come the allies!" "it is" didn't seem to flow right.
As a game programmer trying to find a job I finally found the time to create my professional website. I have the index page mostly finished, and would like some feedback from people who have an eye for things.
I am still waiting for a few urls, screenshots and release dates on some of the other projects I've worked on, though I hope you enjoy the site. I will buy my own domain someday, but for the time this will work;
There is a layout editer available and it would be very possible to make, I do believe though I haven't tried myself.
With that said, what is the data format of your GPS output? Maybe I'd be willing to write a converter if I have a feeling it would only take a day or two to do I would be all over it.
That said, I am going to look more closely at the format, where I have looked at it recently, I wanna see it more deeply for this idea. I will come back and edit or make another post.
Edit: It does look possible, however with the current version of LYT each object has different index values at each track. If this was only for the AutoCross arena it looks like that would remain fine, and I think it is a safe assumption that this would only be for the autocross arena since that is what you are planning. However, helping markers, that show which side of a cone to go on would likely need to be placed manually after the fact, but since you have the exact locations already this would just be visual touch and thus easy to to by hand.
This what I came in the thread to do; find a reason to smile today, thanks! As for the rest of my day, I gotta go rant about it because well lets just put it that I am happy I found something (above cat video) to smile about.
So then, are you thinking that my AI physics sensor should simply be a state that gets computed before the Driver gets to play with it?
I've been thinking that the AIWorld is the main point of access for the developer using the AI. They will feed in the Inputs and retrieve the Outputs in the form of structures; kinda like the AIControlOutput structure. The AIDriver knows about the world only from it's sensors. So in this situation, the world gets to know the physical position, direction and heading and can compute the sliding state of the car.
My original idea had the AIDriver knowing the condition of the front tires and rear tires; WITHIN_LIMIT, NEAR_LIMIT, AT_LIMIT and OVER_LIMIT. So the original idea here was; (IF REAR_TIRES <= AT_LIMIT _AND_ FRONT_TIRES > AT_LIMIT) the car is in STATE_UNDERSTEER. Also twist it around to compute oversteer. In this scenario the AI has no knowledge of whats going on; but can easily make up a reason - that is until I was also going to use a check like (IF FRONT_TIRES > AT_LIMIT _AND_ IsBrakingHard()) then the car is losing traction because of threshold braking and in this case the prevention layer would release the brakes a bit.
Time to get down and dirty and design all the little inputs and outputs the program would need to communicate to/from with the AIWorld. Some I've thought about - likely only the obvious ones.
- A list of vectors to be used as left or right track edges. (Needed?)
- A list of vectors to be used as the 'best known line'. (Needed?) [Even if needed, it will be used in a different way than most current algorithms, which is the idea behind this experimental AI in the first place.]
- A list of vectors to be used as the reference points.
- Accurate physical state of the car; Position, Velocity, Direction, Heading etc...
- Accurate car gauge / control information; RPM, Speed, Selected Gear Maybe this includes the current control positions too like SteeringWheel state of MAX_LEFT, HARD_LEFT, MID_LEFT, SLIGHTY_LEFT, NEAR_CENTER etc... Considering the AI knows what they did with the controls may this is not useful or even needed.
- Accurate car properties information; Hi and Low of the Powerband, 5-speed, 6-speed, FWD/RWD and other properties that don't change about the car but the driver still needs to know this info.
I can't think of anymore at the moment, but I am sure there are more.
I haven't made my mind which of the rock hard choices I will end up going down, however I played with my LFS connections again tonight, also with PPJoy - the virtual joystick emulator and I have hacked it up to something I think it reasonable although it could likely cause issues in the future; I do hope not. I then got OutGauge and OutSim to report information to me. I do not know if I need both of them giving me information but I have the capabilities to do so if I want/need.
I then proceeded to start on the very basics of the AI structure. Really, I didn't get to deep at all. There is an AIWorld. It holds information like all the reference points, driving lines or anything else that the AI driver will need to use to navigate the track. I created message handlers that will translate InSim, OutSim and OutGauge messages into useful things for the AIWorld and AIDriver to use. I bound the following controls in LFS to my virtual controller;
Steering, Throttle, Brake and Clutch (analog controls)
Up Shift, Down Shift, Handbrake (digital controls)
I will consider adding; Ignition, H-Shifter and a few other controls later on.
-----------
My current idea is to have the AI Driver to return a structure something like;
AIControlOutput //Output in the sense the AI is telling the game what is happening.
In this structure is a float for the analog controls, and booleans (maybe even a bitfield) for the digital controls. When AIDriver::Update() is called, this structure is returned. This is all said and good, but now I need to design the more technical parts of how I want this to be used.
I was thinking about a "AICarStateInput" structure, which contains things that the AIDrivers "physical sensor" needs to know. Position, Direction (of travel), ?Speed?, Heading, AngularRotation - etc; But this is hopefully where the physics should end; the point is so the AI can't compute "turn X% + frictionFromTires() = output" instead they have to 'feel' whether the car is oversteering or understeering. Which leads me into a small mathematical problem; Using Direction and Heading how does one calculate understeer / oversteer?!?
It is easy to calculate if the car is _not_ experiencing _any_ oversteer / understeer; meaning all 4 wheels have grip - Direction and Heading are parallel in that situation. The angle between the two vectors would give me the amount of slip angle, but how do I compute whether that is oversteer/understeer...
Please don't get you're hopes up for me using LFS as the test bed, where as I do want to, it has challenges that could be destructive, or time consuming. So where as I at least started something in LFS does not mean that I am going to use LFS yet. I am currently fooling around with my AI in a UF1 at the dragstrip. I think that should be a rather simple combo to start with, then make it more complex as time goes.