Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 801 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stop movement along entity's y axis? #266839
05/20/09 09:11
05/20/09 09:11
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline OP
Member
Jaeger  Offline OP
Member
J

Joined: May 2009
Posts: 258
Chicago
I've made a lot of progress with my tank demo, and I've got the tank moving around. It's phenttype is ph_box, and the forces push it around across the terrain, and you turn it via torquing forces.

However, it has a bad habit of wanting to skid sideways, along its own Y axis. This makes it look silly, and quite unconvincing. I'm searching for a way to stop all side-to-side or Y axis movement. I haven't had any good ideas yet. If I can get this thing solved, I'll practically be done with the basic physics work.

So if you guys have any ideas, please let me know! Thanks!

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 Offline
Expert
xXxGuitar511  Offline
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: xXxGuitar511] #267311
05/23/09 05:34
05/23/09 05:34
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i TOTALLY agree with xxxguitar511, i think this game should be hardcoded, however, I don't know the gamestyle that your aiming for and physic does bring a few unique elements.... i take it you've tried:

-setting your friction to 100
-setting you damping to 100
-using phent_clearvelocity if no keys is pressed

but since this is only a physics box, i think friction alone should do it depending on your movement code

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 Offline
Expert
xXxGuitar511  Offline
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
J
Jaeger Offline OP
Member
Jaeger  Offline OP
Member
J

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: Jaeger] #267448
05/24/09 02:53
05/24/09 02:53
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
its all possible if you can code it right...

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
J
Jaeger Offline OP
Member
Jaeger  Offline OP
Member
J

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". wink 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: Jaeger] #267543
05/24/09 19:53
05/24/09 19:53
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
I toy with free flight a lot so its easy for me to see that flight sims in the actual sense of the term is only a matter of coding.
Dont know about physics though.


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
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 Offline
Expert
xXxGuitar511  Offline
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
J
Jaeger Offline OP
Member
Jaeger  Offline OP
Member
J

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! laugh 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! wink

Last edited by Jaeger; 05/27/09 10:47.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1