The online racing simulator
#1 - Migz
OutGauge To Ipod Touch? Is It Possible?
I thought of this earlier today and ive been researching a tiny bit about it throughtout the day and so i thought id ask if it would be possible

Bassicly get an itouch/iphone to show part of the dash or all of the dash on its screen.


I think i would have to use outgauge to do this although im not sure exactly how or what code would be needed. Im going to aim to do it very simply at first where lfs exports the data as simply data so like
speed = blah
revs = blah
indicator left = yes or no
ect ect.
(OutGauge might already show data as this i dont know)

Then make an app for the iphone/itouch that simply recieves this data over the internet and just shows it in a nice dashboard sort of way


Would this be possible?


Im downloading something that will let me put mac on my vista laptop and then that will mean i can use the iphone/ipod touch SDK that comes on the apple website. So as soon as i get it ill probably have a look through it and see how it works. Although im getting the free SDK so it may not work as well as the proper one.
If you were able to run custom programs off of the iTouch, that can use its WiFi, then it could work. I don't know what kind of apps run on the iTouch or what language the SDK is in though...

It would be cool to use the touch screen to send data back to LFS too, but again I don't know how that would work...

In theory though, it's possible
#3 - Migz
Quote from dougie-lampkin :If you were able to run custom programs off of the iTouch, that can use its WiFi, then it could work. I don't know what kind of apps run on the iTouch or what language the SDK is in though...

It would be cool to use the touch screen to send data back to LFS too, but again I don't know how that would work...

In theory though, it's possible

It is indeed possible to run custom programmes using the SDK. And they can use wifi as i have a game that is online., at least i hope its online because i dont want to be having my ass kicked by AI lol.

Quote :s expected, the iPhone SDK is largely based on Objective-C, a language that achieved some notoriety when Steve Jobs decided to use it in his NeXT computer in 1988. Objective-C, not coincidentally, is also the main programming language used for Mac OSX. Code is compiled down to native ARM instructions.

Hmm yeah i didnt think about using the touch screen to relay data back to LFS, although im not sure what kinda data you could send back.

But i just had a thought, along the side we could have various menu's so with a easy touch of the screen you can see tyre temps ect ect. If the ipod is secured then it would be pretty easy to touch the screen and check things, as apposed to reaching down to your keyboard and hitting the F key to show these things.
Yes, Yes, and Yes.

Would love to, but it seems that you need a Mac to program for the iWillMakeYouPayThoughYourNoseToProgramForMe ... eh, sorry, I mean iPhone / iTouch.
#5 - Migz
Yeah, and im putting mac on my laptop

Haha, they do make me charge through my nose to programme for them.
I've gotta pay for the ipod touch in the first place.
Then the SDK (although im getting the free one)
And then i have to pay for this devoloper thing which lets me put it on the istore.

Any info on where to start learning about OutGauge? I looked through some of the stickied topics but all i could find were youtube video examples :/
Migz:
1) the iPod/iPhone SDK is free (Also installs Xcode 3.1 IIRC).
2) For such a utility, you'll need to code a User interface (using Interface Builder to design and Xcode for the actual Objective-C code)
3) To do Objective-C, you need a pretty firm base in C or C++, as Objective-C is similar to the 2 (with a lot of ****-arounds, hence why Objective-C++ exists... to make changing easier)
4) if you can do it, go for it.. I just think it's pointless.
I've been thinking about this aswell, but I also had the idea of LFS on your iPod Touch/iPhone.

Just 3 cars or something, up to 6 players, not the best graphics? I mean, you can get Xplane and it runs mega fast so the iPod should be fairly capable of holding LFS, surely not?

I say have the demo stuff. Thats all of BL, XFG, XRG and FBM. I would buy it at maybe £5.99, same price as Xplane?

EDIT: Sorry for thread hijack, should I start another thread?
DOUBLE EDIT: I'm up for the LFS Outgage on iPod Touch/iPhone, sounds amazing
TRIPLE EDIT: I thought if you connect it by USB then it could charge and still work because not everyone has WiFi, they might have got LFS from a laptop at a friends house or a WiFi, plus WiFi eats an iPods battery.
I don't think it is quite that easy!

X-plane was already available for mac Os so it was a relatively simple port and optimize.

LFS would not be that easy, besides calculating accurate On-Road Vehicle Dynamics takes alot more calculations than accurate flight modeling!

As for the OutGauge app, definately!

I'd already be working on one, if I had a mac!!!
Quote from TheChad :LFS would not be that easy, besides calculating accurate On-Road Vehicle Dynamics takes alot more calculations than accurate flight modeling!

Hooray for completely unfounded statements :banana:

On-topic, though, that would be pretty nifty
#10 - Jakg
Quote from piggy501 :
Just 3 cars or something, up to 6 players, not the best graphics? I mean, you can get Xplane and it runs mega fast so the iPod should be fairly capable of holding LFS, surely not?

This, kids, is the reason why you should have a clue about what your posting about first.
Quote from JamesF1 :Hooray for completely unfounded statements

Meh, not really unfounded to be honest. Car sims are computationally more complex than flight sims. That's why there were a lot of flight sims back in the early days of computing, but accurate car sims didn't come along until a few years later. There's a good video by some Microsoft physicist about this somewhere...

Edit: Found it...
Quote from DarkTimes :Meh, not really unfounded to be honest. Car sims are computationally more complex than flight sims. That's why there were a lot of flight sims back in the early days of computing, but accurate car sims didn't come along until a few years later. There's a good video by some Microsoft physicist about this somewhere...

Edit: Found it...

Well, the amount of detail needed for accurate modelling of a flight sim or a racing sim is tremendous - there are simply different challenges. In racing sims, you'll have your tyre modelling being a relatively unique factor, but in flight sims you'll have to model aircraft behaviour in clouds, etc, and airflow over dynamic surfaces. My point was that it isn't fair to say that racing sims are far more difficult - they're not necessarily, they just have a different set of challenges.

The reason there were a lot of flight sims back in the early days of computing was because the people with the skills liked flying - simple as. Additionally, it's easier to build an inaccurate flight sim, than it is to build an inaccurate racing sim - simply because there are fewer things to model (AI, ground interactions, etc.). That doesn't mean that it's easier to build a realistic flight sim, than it is to build a realistic racing sim - it just means it's simpler at the lower levels.
Quote from JamesF1 :Well, the amount of detail needed for accurate modelling of a flight sim or a racing sim is tremendous - there are simply different challenges. In racing sims, you'll have your tyre modelling being a relatively unique factor, but in flight sims you'll have to model aircraft behaviour in clouds, etc, and airflow over dynamic surfaces. My point was that it isn't fair to say that racing sims are far more difficult - they're not necessarily, they just have a different set of challenges.

The reason there were a lot of flight sims back in the early days of computing was because the people with the skills liked flying - simple as. Additionally, it's easier to build an inaccurate flight sim, than it is to build an inaccurate racing sim - simply because there are fewer things to model (AI, ground interactions, etc.). That doesn't mean that it's easier to build a realistic flight sim, than it is to build a realistic racing sim - it just means it's simpler at the lower levels.

I never said it was easier or harder, just that it's computationally more complex to simulate a racing car than it is to simulate an aircraft, as an aircraft has two wings and car has four wheels, and requires the simulation of many complex moving parts. Of course, you can start throwing sugar at a flight sim, such as wind, humidity, clouds, flexing of the fuselage etc.., but you can do that too in racing sims, with wind, varying grip levels, marbles, wet and drying tracks and so on.

There have been car and flight simulations floating around for many years, but there were commercial flight-sims available before commercial driving sims (discounting arcade driving games), simply because the mathematics describing how a plane flies were easier to simulate on slow computers than those of how a car drives, and not just because people didn't want to make car sims.
Sorry for the unfounded comment

perhaps I should have used better words like "More processing is required to achieve an acceptable level of realism".

However I am sure you knew what I meant. we aren't gonna be seeing LFS on iPhones/iPods anytime soon!
Quote from DarkTimes :I never said it was easier or harder, just that it's computationally more complex to simulate a racing car than it is to simulate an aircraft, as an aircraft has two wings and car has four wheels, and requires the simulation of many complex moving parts. Of course, you can start throwing sugar at a flight sim, such as wind, humidity, clouds, flexing of the fuselage etc.., but you can do that too in racing sims, with wind, varying grip levels, marbles, wet and drying tracks and so on.

There have been car and flight simulations floating around for many years, but there were commercial flight-sims available before commercial driving sims (discounting arcade driving games), simply because the mathematics describing how a plane flies were easier to simulate on slow computers than those of how a car drives, and not just because people didn't want to make car sims.

Meh... it's a relatively circular argument. You can't accurately evaluate which is more complex to do, as there is no direct comparison to be drawn. Simulation of two wings cannot be accurately compared to four tyres - so the comparison is moot. My post was more challenging the outright assumption that one is more complex than the other - they both have their own set of challenges, and both require incredibly complex computation to do accurately.

Additionally, just because people developed flight sims before racing sims, doesn't mean there's any precedent for assuming the level of computation required to perform an accurate simulation.
#16 - Migz
Quote from dawesdust_12 :Migz:
1) the iPod/iPhone SDK is free (Also installs Xcode 3.1 IIRC).
2) For such a utility, you'll need to code a User interface (using Interface Builder to design and Xcode for the actual Objective-C code)
3) To do Objective-C, you need a pretty firm base in C or C++, as Objective-C is similar to the 2 (with a lot of ****-arounds, hence why Objective-C++ exists... to make changing easier)
4) if you can do it, go for it.. I just think it's pointless.

@1) There is a free SDK for the ipod/iphone but theres also one you have to pay for, but its $99 :/

@4) Most of the things on the ipod/iphone are quite pointless.
But people still buy these things.
And itd just be cool to get your speed,fuel,tyre temps all on the ipod screen. (Sudden brainwave) You could then strap your ipod to your wheel and then you have all this info right infront of you, and then with use of the accelerometer when you turn the wheel the info on the ipod touch stays the right way around And if it was on your wheel this would make it easy to check those tyre temperatures Simple touch of the screen and you can check them.


Quote from piggy501 :I've been thinking about this aswell, but I also had the idea of LFS on your iPod Touch/iPhone.

Just 3 cars or something, up to 6 players, not the best graphics? I mean, you can get Xplane and it runs mega fast so the iPod should be fairly capable of holding LFS, surely not?

I say have the demo stuff. Thats all of BL, XFG, XRG and FBM. I would buy it at maybe £5.99, same price as Xplane?

EDIT: Sorry for thread hijack, should I start another thread?
DOUBLE EDIT: I'm up for the LFS Outgage on iPod Touch/iPhone, sounds amazing
TRIPLE EDIT: I thought if you connect it by USB then it could charge and still work because not everyone has WiFi, they might have got LFS from a laptop at a friends house or a WiFi, plus WiFi eats an iPods battery.

It wouldn't be possible to get LFS on an ipod/iphone right now, because anything on the ipod/iphone is coded in a specific language which is MAC only, not windows. And im not sure which of the C languages LFS is coded in but it would take a long time to convert all that code to the mac code.


@ Your triple edit. That is a good idea, ill look into them both. I'll see which one is easier, then do that one first. Then after ill do the other one.

Also people who dont have WIFI but have a laptop with WIFI built in can host a wireless network which the ipod/itouch could connect to.


I have about 1 more day to wait before the software i need to dual boot MAC on my Vista Laptop has downloaded, if it works then ill probably start looking at software and code for it and tell you how ill plan to do things
Quote from Migz :@1) There is a free SDK for the ipod/iphone but theres also one you have to pay for, but its $99 :/

You're wrong. The only difference is that the 99$ allows you to release it on the iTunes store (giving you a developer licence/ ability to sign applications so they run).

Also, Objective-C isn't "Mac only".. you can quite easily use it in Windows, just requires more work. Porting LFS would be hard too, because it'd need to be ported from DirectX to OpenGL ES (a even more limited set of OpenGL).
#18 - Migz
Quote from dawesdust_12 :You're wrong. The only difference is that the 99$ allows you to release it on the iTunes store (giving you a developer licence/ ability to sign applications so they run).

Also, Objective-C isn't "Mac only".. you can quite easily use it in Windows, just requires more work. Porting LFS would be hard too, because it'd need to be ported from DirectX to OpenGL ES (a even more limited set of OpenGL).

Ahah, so if i wanted to distribute this app i would have to pay this fee?
Yes, or run it directly on the device (or my sisters iPod touch is ****ed), else you'd be bound to test/debug it from within the "Aspen Simulator", which is basically an iPhone in software.
#20 - Migz
Quote from dawesdust_12 :Yes, or run it directly on the device (or my sisters iPod touch is ****ed), else you'd be bound to test/debug it from within the "Aspen Simulator", which is basically an iPhone in software.

O bollox!

Hmm well if i do create it ill just have to not release it until i know theres enough interest in it taht id be able to make my money back from it. Or just create a second and third app that i can also sell lol.

Btw for everyone who's thinkign OMGZOR IVE GOTTA PAY FOR DIS SHIZ, it'll only be 99p perhaps even 59p.
Can you not distribute it privately? I thought the fee was just to list it on iTunes. Either way, you could always find someone who has the license, and give them a tenner to sign it
#22 - Migz
Ohh i didnt realise you could distribute it privately. That would probably be better, i could then release it for free
(DAMNIT no moneys for me )

Yeah but if i gave this person a tenner he would then get all the money from it wouldn't he?
Meaning i lose out on a tenner, and profit lol.


Edit: Would it be possible for someone to post some links to learning how to get data out of lfs using OutGauge? As i cant find any :/
Also which forum catagory would be best to post this when its in WIP?
You could still charge for it if you wanted to. You just couldn't have it on iTunes. But if you do need it to be signed in order to hand it out to anyone (i.e., if the free one is tied to one iPod), you could pay someone to sign it for you. You'd still get the monies

The syntax of Objective-C is the same as C, the Objective part is just extra features. So you could use this lib, and add in OutGauge support yourself. I don't know how you can display things on the iTouch though, that's something you'd have to do too You'd probably need to add that lib to the SDK, I'd imagine that's the simplest way.
#24 - Migz
Quote from dougie-lampkin :You could still charge for it if you wanted to. You just couldn't have it on iTunes. But if you do need it to be signed in order to hand it out to anyone (i.e., if the free one is tied to one iPod), you could pay someone to sign it for you. You'd still get the monies

The syntax of Objective-C is the same as C, the Objective part is just extra features. So you could use [url=http://www.lfsforum.net/showthread.php?t=47717]this[url] lib, and add in OutGauge support yourself. I don't know how you can display things on the iTouch though, that's something you'd have to do too You'd probably need to add that lib to the SDK, I'd imagine that's the simplest way.

It would be a massive pain to set up some way of people paying me through my website for that app. It would just be easier for me to put it on itunes, or just release it for free.
Ooh right, i understand.


Your link fails
Im going through that thread now then ill download that think and see what it does

For the itouch side i was sort of hoping that whatever i did on the lfs side would just export the data as simply numbers.

So like

Speed=50
Revs=4000
Tyre Temp 1 = 67
Tyre Temp 2 = 67
Tyre Temp 3 = 70
Tyre Temp 4 = 72
indicator 1=0
indicator 2=1

So the ipod would simply just get data like that.
And then it just shows it in a graphical way.

Although perhaps maybe outgauge cant show the data as simply data :/ shall have to look into that.

Edit: OR even just show data as the numbers
50
4000
67
67
70
72
0
1

Thatd probably be easier, because it just reads the numbers on each line, instead of reading the entire line and trying to work out where the number is in that line.
OutGauge simply sends the data as numbers. You'd need to take the data, and put it into graphical form. I've no idea how the iTouch does that though, but it's probably documented in the SDK somewhere

There's nothing to do on the LFS side, you'd just tell OutGauge to send its packets to the iTouch's IP, and then the program on the iTouch would receive the packets and turn them into graphical magic.

struct OutGaugePack
{
unsigned Time; // time in milliseconds (to check order)

char Car[4]; // Car name
word Flags; // OG_FLAGS (see below)
byte Gear; // Reverse:0, Neutral:1, First:2...
byte SpareB;
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float OilPress; // BAR
float Spare1;
float Spare2;
float Spare3;
float Throttle; // 0 to 1
float Brake; // 0 to 1
float Clutch; // 0 to 1
char Display1[16]; // Usually Fuel
char Display2[16]; // Usually Settings

int ID; // optional - only if OutGauge ID is specified
};


FGED GREDG RDFGDR GSFDG