Another "Realistic" wing attempt
4 posts • Page 1 of 1
Another "Realistic" wing attempt
Hi ppl!
During a lots of test I've become to this type of wing. It uses same idea as RaWing and others spawn-collision wing. This "wing" is simple, phunlet-safe and pretty realistic. It has quadratic dependence of force on speed, adjustable via spawned circles density multipler.
One of key idea is to kill circle instantly after collision instead of collideSet switching
Upd: Now I use double layer killer-collision plates (idea from Kakomi's wing)
Another good optimization is how to detect speed and make a force depend on it. It's not necessary to calculate speed - position is enough. That means last e.pos stored in textureMatrix property of orange box (spawner) and on next onHitByLaser you just calculate distance of wing move and proportionally increase density of spawned circles. The problem is high-speed leak so you need to make plane with air friction and limit max speed to ~100 m/s.
That's all. Changing multipler (2500 by default) you can calibrate wing for your airplane weight.
K-Wings can be easily scaled but don't forget to proportionally change radius of spawned circles
[scene]32991[/scene]
During a lots of test I've become to this type of wing. It uses same idea as RaWing and others spawn-collision wing. This "wing" is simple, phunlet-safe and pretty realistic. It has quadratic dependence of force on speed, adjustable via spawned circles density multipler.
One of key idea is to kill circle instantly after collision instead of collideSet switching
Upd: Now I use double layer killer-collision plates (idea from Kakomi's wing)
Another good optimization is how to detect speed and make a force depend on it. It's not necessary to calculate speed - position is enough. That means last e.pos stored in textureMatrix property of orange box (spawner) and on next onHitByLaser you just calculate distance of wing move and proportionally increase density of spawned circles. The problem is high-speed leak so you need to make plane with air friction and limit max speed to ~100 m/s.
- Code: Select all
onHitByLaser = (e)=>{
scene.addcircle({
pos := e.pos;
radius := 0.035;
color := [1, 1, 1, 1];
drawcake := false;
drawborder := false;
collideset := 32;
density := 2500 * ((e.pos(0) - textureMatrix(0)) ^ 2 + (e.pos(1) - textureMatrix(1)) ^ 2);
airFrictionMult := 100000
});
textureMatrix = [e.pos(0), e.pos(1), 1, 1, 1, 1, 1, 1, 1]
};
That's all. Changing multipler (2500 by default) you can calibrate wing for your airplane weight.
K-Wings can be easily scaled but don't forget to proportionally change radius of spawned circles
[scene]32991[/scene]
Last edited by Kilinich on Sat Oct 31, 2009 5:56 pm, edited 4 times in total.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Another "Realistic" wing attempt
I've found exactly the same wing design was made by Kakomi
So mine is just a replica with some improvements.
So mine is just a replica with some improvements.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Another "Realistic" wing attempt
Nice, i'd like to make a plane with it,
I tried it for several times, but I can't make a realistic plane
Kilinich, can you add a nice, and easiely to edit plane engine? So I can make planes etc. I'll give you cred of course
But became even morre noobish since a lot of new functions are in Algodoo, it really sucks, because I have no clue how laserscripting works etc. I don't know how functions, Arrays etc work so :S
Tnx anyway
I tried it for several times, but I can't make a realistic plane
Kilinich, can you add a nice, and easiely to edit plane engine? So I can make planes etc. I'll give you cred of course
But became even morre noobish since a lot of new functions are in Algodoo, it really sucks, because I have no clue how laserscripting works etc. I don't know how functions, Arrays etc work so :S
Tnx anyway
-

Jelmerholland - Posts: 61
- Joined: Mon Aug 31, 2009 7:51 pm
- Location: NL
Re: Another "Realistic" wing attempt
Jelmerholland wrote:IKilinich, can you add a nice, and easiely to edit plane engine? So I can make planes etc. I'll give you cred of course
No, but I can upgrade old good NGne
And make an example of usage
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest




