Simple Scorched Earth, Worms game

Get help using Construct 2

Post » Sat Dec 16, 2017 11:25 am

Yep, both things are considered, first just playing around to see all together and check the limitations and see how far can go this prototype. That visuals can wait for the moment ;) . The physics pieces falling is what i mentioned in my last post, but i don't know hot to achieve them.
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Sat Dec 16, 2017 4:07 pm

Seriously, why do you need physics? Your particles are simply flying, falling and bouncing off the floor/walls. Bullet can do all this. And, I'm guessing, Bullet must be much better for performance.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,375
Reputation: 84,377

Post » Sat Dec 16, 2017 4:40 pm

dop2000 wrote:Seriously, why do you need physics? Your particles are simply flying, falling and bouncing off the floor/walls. Bullet can do all this. And, I'm guessing, Bullet must be much better for performance.


Hi, actually my particles are doing that yes, and bullet is enough but i want to do more.

I want sprites colliding with walls/floor/player, i want that after shot a bullet a shell is spawned in the other side bouncing on the floor. I want some group of objects falling and get breaks on colliding with the floor, bouncing debris(1x1 ,1x2 pixels...) and interact with others,etc...

I just want keep all the doors open, then will see the limitation of engine, perfomance and what kind of game can be done using the cool stuff ;) .
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Sat Dec 16, 2017 8:20 pm

Here are the shell bullets on shoot, can't fix the rotations stop after time XD

Image

In the default physics there is in properties an "Angular Damping" but on Chipmunk only i found:

Damping = Decrease the simulation of the speed but affects to all objects

Angular velocity= Is set when the shell bullet creates and keep that velocity always.

So i made another event that if Angular velocity is greater than 0 = Sprite.AngularVelocity-10,, and works in this way but in no realistic mode, here a gif to show:

Image

I saw @R0j0hound say this on the chipmunk physics thread
2. applying a force in the opposite direction as the velocity or angleOfMotion.


But at some point you get negative values, or the velocity is negative and you get positive values, don't know how to detect each case depending of angle of motion / velocity :S .
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Sat Dec 16, 2017 9:57 pm

Make the magnitude of the force proportionate to the speed.

apply force at angle of motion with magnitude -speed*number

where number is the strength of the force
B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Sat Dec 16, 2017 10:33 pm

@R0J0hound yep, worked , thanks! I need to detect the side left-right to add -speed or speed to give the exact angular rotation but now looks much better.
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Fri Dec 22, 2017 10:26 am

Uh, just found that if you set "prevent rotations" to "No" there is no need of set angular damping. In fact when you set "Prevent rotations" to yes is when the sprites rotates always to infinity, weird :S .
B
30
S
12
G
3
Posts: 685
Reputation: 5,112

Post » Fri May 11, 2018 6:31 pm

@matriax, can you please upload your completed working capx :)
B
10
S
2
G
4
Posts: 27
Reputation: 2,159

Previous

Return to How do I....?

Who is online

Users browsing this forum: facecrime and 10 guests