1 registered members (tomaslolo),
1,542
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Stop movement along entity's y axis?
[Re: Jaeger]
#267301
05/23/09 04:02
05/23/09 04:02
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
First off, I think that this type of project would be better hard-coded, then to use a physics engine.
Second, one way is to measure the tanks horizontal velocity, and then move it just as much the opposite direction the next frame, however, this is kind of a dirty way to solve this.
Also, look into damping (air friction). If you set a very high Y damping, then it shouldn't move sideways at all...
xXxGuitar511 - Programmer
|
|
|
Re: Stop movement along entity's y axis?
[Re: darkinferno]
#267411
05/23/09 18:37
05/23/09 18:37
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
He can't use too much friction though, otherwise the tank would not move forwards either. You'll probably need to use invisible wheels for your tank, just like a car. Just use an invisible wheel model at the end of every track.
xXxGuitar511 - Programmer
|
|
|
Re: Stop movement along entity's y axis?
[Re: xXxGuitar511]
#267443
05/24/09 02:31
05/24/09 02:31
|
Joined: May 2009
Posts: 258 Chicago
Jaeger
OP
Member
|
OP
Member
Joined: May 2009
Posts: 258
Chicago
|
I think I know why my tank was skidding sideways. I was using central force, and it was applying it along the world's X axis. So when I tried to turn it seemed to skid sideways. I've got the physics based bullets working now, and it's spectacular. Now I just have to audit their mass and velocities to get them working exactly like their real life counterparts.
I was thinking about the invisible wheel concept at the beginning, but I may be able to do this without it. I'm not sure yet. The driving physics are going to be the hardest part, so I'm saving it for last, really. I've got a lot to do. The reason I'm doing this with physics is because they're faster than c_move and other instructions (says the manual), and more realistic. The target audience is people who enjoy realistic WWII simulations like IL-2 Sturmovik, or WWIIOL. I'm trying to eliminate the arcade-style elements of it. The main way this game will be played is online, however there will be a single player mode.
I think this engine was a major win though. I doubt I'll ever regret spending the money on it. It's been able to do everything I've needed it to so far, and at a cost only the fraction of most professional engines. I'm still trying to get used to it and Lite-C though. I used to program small apps in C++, and this is quite different, but more convenient for games.
Another question though:
Do you think Lite-C has the potential to make a truly convincing and realistic flight model for aircraft? Or would I need to use a "higher" language?
Last edited by Jaeger; 05/24/09 02:34.
|
|
|
Re: Stop movement along entity's y axis?
[Re: darkinferno]
#267450
05/24/09 03:01
05/24/09 03:01
|
Joined: May 2009
Posts: 258 Chicago
Jaeger
OP
Member
|
OP
Member
Joined: May 2009
Posts: 258
Chicago
|
I thought so. I've just never seen a truly realistic flight model made with Lite-C. Maybe there's one out there though. If you've ever played IL-2 Sturmovik, especially with the mods from AAA (allaircraftarcade.com), you'll know what I mean by "realistic". I'm a private pilot in real life, and that is the best WWII flight simulator I've ever played. It's written in Java, which is what a lot of companies use for flight models these days. C++ is also very popular for flight sims. From what I've seen so far, Lite-C seems to be almost a hybrid between C and C++, with a modified library of functions, commands, instructions, and a much more convenient system of implementing 2D and 3D graphics (basically). I assume if I ever needed to, I could even use this write my own flight physics engine, or even a library of functions and instructions. I know how difficult and time consuming that could be though. Hopefully when I get more familiar with the engine and Lite-C language, I can make a good flight model effectively.
|
|
|
Re: Stop movement along entity's y axis?
[Re: KiwiBoy]
#267937
05/26/09 22:42
05/26/09 22:42
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
Expert
|
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
[long answer] ...You really don't want to use a physics engine for a flight sim. I've made quite a few using GS. My first project with GS was actually recreating the Wright Flyer in Kittyhawk, NC. My most recent project was a WWII flight simulator inspired by A) Return to Castle Wolfenstein & B) my new Joystick. The flight sim turned out great, but I ran out of ideas for the game. I had even added an unlimited terrain system. If I ever decide to open it up again, I'll probably post some videos, and then release it to the community...
[short answer] Yes, GS works just fine for flight simulators. It's about the programmer, not the language...
xXxGuitar511 - Programmer
|
|
|
Re: Stop movement along entity's y axis?
[Re: xXxGuitar511]
#268048
05/27/09 10:45
05/27/09 10:45
|
Joined: May 2009
Posts: 258 Chicago
Jaeger
OP
Member
|
OP
Member
Joined: May 2009
Posts: 258
Chicago
|
Yeah, I wouldn't want to use the physics engine that comes with the engine. It's just not made for flight. A flight sim physics engine has to be specifically made for the task, if you're going to use one. While it's pretty good to hard code an advanced flight sim, they're getting so complex these days that a good physics engine is unbeatable. I can't wait for Storm of War: Battle of Britain. It's made by the same people who made the revered IL-2: Sturmovik. They're also working on a new WWI sim, which is going to be awesome! <3 I'm I had core flight sim junkie in case you haven't noticed, heheh. But languages do have limitations. They all have different advantages/disadvantages. The reason I ask is because I haven't really looked into the concept of a true flight sim for Lite-C, and haven't ever seen one. I know it can make a flight GAME fairly easily, but flight SIMS are few and far between, even from large dev companies. I'm sure it can be done, but like any, would take a looonnng time to perfect, especially when your target audience expects you to adhere to the real historical performance of WWII aircraft. If you're P-51 Mustang can just "glide" away from the Focke Wulf 190-D9, you're going to have a LOT of angry customers! There are just so many factors... Altitude, engine temperature, fuel mixture, wind, air pressure, etc, to name a few. Real flight sims aren't for the faint of heart! Btw, I fixed the "skidding" problem with some help from "EvilSOB". I was applying force incorrectly, and had gravity far too high. My bullet physics have turned out to be a major win imho. They're great, and I've input real life data into the formulas and made it very realistic. I'm still not quite happy with it though. Adjustments are still needed. Oh... sorry to ramble on so long, lol.. P.S.- If you ever need ideas for anything involving planes, guns, or WWII, I'm the man to ask!
Last edited by Jaeger; 05/27/09 10:47.
|
|
|
|