Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#26 2018-08-15 02:45:49

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Physics update

A new physics update has just came out. It includes fixes on underwater physics, improvements to the rolling animation and changes to the animation speed - now it takes into account the movement of the player.

Download here.

I now plan to resume the work on SurgeScript - it was paused for awhile. I was working on the engine integration before I switched to improving the physics. If you find anything off on the physics, please let me know.

Enjoy! smile

Offline

#27 2018-08-15 13:01:24

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Physics update: automatic angles

at this update rate and quality, if that RPi port succeeds, I'll be developing RPi games with Open Surge in the future big_smile


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#28 2018-08-17 01:40:33

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

The new physics engine is great, indeed. Compared to 0.1.4, it's a totally new engine. Compared to 0.2.0, it's a huge improvement.

I tweaked a few more things today, but I think the physics engine is in a very good shape now big_smile

Offline

#29 2018-08-17 18:47:13

Race the Hedgehog
Member
From: Sao Bernardo do Campo, Brazil
Registered: 2010-12-16
Posts: 163
Website

Re: Physics update: automatic angles

Alexandre wrote:

A new physics update has just came out. It includes fixes on underwater physics, improvements to the rolling animation and changes to the animation speed - now it takes into account the movement of the player.

Wow! The engine is getting more and more polished really fast and it's really great to see that.
It's so nice to feel excited about the engine again 6 years later. I missed checking the forums daily. :')
I think you could apply the new speed system to the jump animation too, since the genesis games also function like that. There's a section on Sonic Retro explaining how it works.

Alexandre wrote:

If you find anything off on the physics, please let me know.

I'm pretty sure there's a glitch going on with bricks with the cloud behavior.

Race the Hedgehog wrote:

If the player hits a cloud brick in a certain way, he is transported down immediately and dies. This is a major glitch.

At the beginning, it was assumed that the glitch happened because I used an entire image to build a brickset.
However, I built a new one using 256x256 chunks, the same method that the original sonic uses, and that glitch remained.
At first, I thought it was due to the gaps that some bricks had. But importing the same brickset to an older build without the mask function (version 18.606-dev), the glitch disappears! And platform detection also works better.

Here's the brickset and the stage, to see what I'm saying best.
Just try to jump on the first plataform, where normally would be a ring box, to see what is happening.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#30 2018-08-18 00:21:12

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Race the Hedgehog wrote:

Here's the brickset and the stage, to see what I'm saying best.
Just try to jump on the first plataform, where normally would be a ring box, to see what is happening.

Oh yes, I've seen it. I'll take a look at the cause.

Thanks for letting me know smile

Offline

#31 2018-08-22 23:15:04

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Hi Race,

Today's update (18.822-dev) includes a fix for the issue you have raised. Please let me know if it works for you. smile

Additionally, let me suggest against putting discontinuities on the collisions. Platforms should be smooth for best performance.

s205.png

Offline

#32 2018-08-23 04:36:20

Race the Hedgehog
Member
From: Sao Bernardo do Campo, Brazil
Registered: 2010-12-16
Posts: 163
Website

Re: Physics update: automatic angles

it doesn't seem to be working sad
i recorded a video to show it and compare it to an older build, which works more as it should.
i also tried to see how that level that i did with a single massive brick worked in this earlier build, and it turn it out fine.

Alexandre wrote:

Additionally, let me suggest against putting discontinuities on the collisions. Platforms should be smooth for best performance.

yea, and i'm aware of that.
I imported the original ghz collision with no changes, but I plan to adjust it more to play smootly on the engine later on.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#33 2018-08-24 03:53:26

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Try again on 18.824-dev. cool

It seemed to still bug on the edges. It took me a while to figure this one out. The cause: a sensor was being incorrectly calculated for 1 frame. roll

Note: the spindash will be replaced very soon.

Offline

#34 2018-08-24 18:46:06

Race the Hedgehog
Member
From: Sao Bernardo do Campo, Brazil
Registered: 2010-12-16
Posts: 163
Website

Re: Physics update: automatic angles

Yes!!
It works! It even makes my old brickset work! big_smile

One thing I noticed, bricks with the cloud behavior don't seem to recognize angles, like the default ones, is this intentional? Might be a barrier for what I'm trying to do.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#35 2018-08-24 19:36:30

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Race the Hedgehog wrote:

One thing I noticed, bricks with the cloud behavior don't seem to recognize angles, like the default ones, is this intentional? Might be a barrier for what I'm trying to do.

I'm not sure what you mean. All bricks recognize angles, but I have just added a threshold for visual purposes, so it is visually more stable when you're on a curve that is close to flat.

Offline

#36 2018-08-25 21:48:57

Race the Hedgehog
Member
From: Sao Bernardo do Campo, Brazil
Registered: 2010-12-16
Posts: 163
Website

Re: Physics update: automatic angles

I mean, here's a brick functioning with the OBSTACLE behavior:
a2pslj.png
And here's the same one, but with the CLOUD behavior:
2nvdkar.png
Physics don't see to apply either.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#37 2018-08-25 23:23:50

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Race the Hedgehog wrote:

Physics don't see to apply either.

Physics do apply. There's something called a slope factor that affects the speed of the player when he/she is on a slope.
However, this modifier only applies if the angle is above a certain threshold that we have added (see page 1). Currently, this threshold is about 45º. That is a lot. We ought to lower it a bit.

edit: if the player is going downhill, maybe we don't need a threshold at all

edit 2: if you find other things that need polishing, please let me know

Last edited by Alexandre (2018-08-26 01:21:37)

Offline

#38 2018-08-26 07:01:14

Race the Hedgehog
Member
From: Sao Bernardo do Campo, Brazil
Registered: 2010-12-16
Posts: 163
Website

Re: Physics update: automatic angles

Oh, I'm not talking about the threshold, I think that's very close to perfect already.

What I'm trying to show in the image above is that the CLOUD bricks do not recognize the angles, whereas those of the OBSTACLE behavior recognize.

I want to explain better, but I'm not home for now. To see what I'm saying, change all the bricks behavior from my old brickset from OBSTACLE to CLOUD, and see how different it is.

It's as if all cloud bricks have 0 angle all the time. The image I posted shows this.

I think it's a glitch, I don't think the platforms should stop recognizing the angles when they are in the CLOUD behavior.
(If it's still not as clear, I can send a DM explaining better without a language barrier tongue)


PunBB bbcode test
Creating and Editing Sprites.

Offline

#39 2018-08-26 15:16:51

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Hi Race,

See if it works for you on 18.826-dev.

Indeed you were right, there was something off.

Thanks for pointing that out.

Offline

#40 2018-08-27 17:11:22

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Physics update: automatic angles

one thing I noticed is that the camera is too rigid. I know we have talked about this before, but it becomes very visible on small terrain variations, where the camera seems to jitter, when in reality it is just following the player's exact position.


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#41 2018-08-28 03:26:48

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

KZR wrote:

one thing I noticed is that the camera is too rigid. I know we have talked about this before, but it becomes very visible on small terrain variations, where the camera seems to jitter, when in reality it is just following the player's exact position.

Hey KZR,

I have disabled the old camera script. A new one will come shortly, made in SurgeScript smile

Thanks for playing.

Offline

#42 2018-09-20 11:42:23

G.E.R.
Member
From: Russia, Krasnodar
Registered: 2017-12-26
Posts: 177

Re: Physics update: automatic angles

About the new Open Surge realise I want to say a several thoughts and questions.
1. Collision mask and auto-angles system is great. I understand correctly, than now we can to draw any curves  road in brickset file and engine will automatically determine the angles and not spoil the physics of movement? And when I use a Collision_Mask.png---file, engine will processing a brick and allocate in this brick a passable end obstacle zones,  I understand correctly?

2. I saw a Green Hill level map on the program files. Are you released this opportunity?

3. When will be full Surge Script' manual?

Offline

#43 2018-09-20 12:50:18

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

Hey G.E.R.,

G.E.R. wrote:

A1. Collision mask and auto-angles system is great. I understand correctly, than now we can to draw any curves  road in brickset file and engine will automatically determine the angles and not spoil the physics of movement? And when I use a Collision_Mask.png---file, engine will processing a brick and allocate in this brick a passable end obstacle zones,  I understand correctly?

Yes, you can draw your curves on the brickset and import them as a single brick.

Yes, the collision mask image defines which pixels are solid and which aren't.

More information: http://opensnc.sourceforge.net/wiki/index.php/Bricksets

G.E.R. wrote:

2. I saw a Green Hill level map on the program files. Are you released this opportunity?

This is Race's brickset. Even though it is not part of the game, it has helped with development and testing. It will be removed.

G.E.R. wrote:

3. When will be full Surge Script' manual?

I'm working on the SurgeScript integration, so there's still more to come (SurgeEngine API). As I replace the built-in items by SurgeScript objects, more will be added to the docs.

Currently, you can find the manual at: https://alemart.github.io/surgescript (work-in-progress)

My YouTube channel has also SurgeScript tutorials, and I plan to make more of them, preferably based on users' questions.

Offline

#44 2018-09-21 17:38:56

G.E.R.
Member
From: Russia, Krasnodar
Registered: 2017-12-26
Posts: 177

Re: Physics update: automatic angles

I watched your video earlier and see the themes on our forum by other users, but I haven't written any of my scripts yet at the moment. I mean the articles in Wiki, witch looks like article about API.

I have some notes about the game. How acceptable will be use of objects from Sonic's game? I mean the item boxes, final signpost, ect. Still, this object by SEGA, and these are branded for Sonic. I don't think that we need to imitate Sonic's game, but we can make minor changes to design of these basic objects. I think, it will give the game a uniqueness, at the same time, continuity will be traced.

Also, I ask you to think about implementation a broken-brick in the engine - it's obstacle brick, but it will broke when player attack it. The function of the quick export level map from level editor in PNG file will also be useful.

Offline

#45 2018-09-21 19:36:38

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

G.E.R. wrote:

I have some notes about the game. How acceptable will be use of objects from Sonic's game? I mean the item boxes, final signpost, ect. Still, this object by SEGA, and these are branded for Sonic. I don't think that we need to imitate Sonic's game, but we can make minor changes to design of these basic objects. I think, it will give the game a uniqueness, at the same time, continuity will be traced.

Let me begin with this: we are not using any sprites from the Sonic games.

We are sharing concepts, and it comes mostly from historical reasons. As much as SuperTux is inspired by the mechanics of Mario, this is inspired by the mechanics of Sonic (and other platformers).

Some sprites, like the signpost, need an update. I'd like something in the style of KZR's sprite of the salamander (retro art). Other objects, like the springs, we can let them be.

The item boxes again come from historical reasons; they were nicely designed by Celdecea, an ex-member of the community. If you can come up with something that reminds FOSS software, we can discuss it. (a .tar.gz that you decompress lol)

https://upload.wikimedia.org/wikipedia/ … ip.svg.png

G.E.R. wrote:

Also, I ask you to think about implementation a broken-brick in the engine - it's obstacle brick, but it will broke when player attack it

Make a breakable brick and use strong_player.

Offline

#46 2018-09-22 17:53:42

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Physics update: automatic angles

ok, so here's a thought. if the need to change the item boxes arises, we could make them handheld consoles, like the one surge has. when you destroy them the cartridge pops out and the "game" is your powerup.
the handheld's screen could show a short animation of its effect on the player, interrupted by noise, back to the icon, noise, repeat


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#47 2018-09-23 03:29:53

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

KZR wrote:

ok, so here's a thought. if the need to change the item boxes arises, we could make them handheld consoles, like the one surge has. when you destroy them the cartridge pops out and the "game" is your powerup.
the handheld's screen could show a short animation of its effect on the player, interrupted by noise, back to the icon, noise, repeat

That is good.

Offline

#48 2018-10-31 22:02:49

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Physics update: automatic angles

how do you disable automatic angles? I was trying something different, using a player whose sprites are legs, and spawning a torso object which attaches to it.

walking on flat ground works perfect. but as soon as a change in terrain appears, the torso does not attach correctly, since it attaches to the bounding box and not to the rotated sprite.

I don't want this to affect all players, only this one. is it possible?

another thing I noticed is that attaching is somewhat delayed, by 1 or 2 frames. is it somehow faster if I use player xpos/ypos ?

Last edited by KZR (2018-11-01 00:51:30)


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#49 2018-11-01 13:28:24

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,279
Website

Re: Physics update: automatic angles

This sort of specific thing is better handled by scripting. Make the player invisible and script the rest.

The SurgeScript Player API should come soon.

Offline

#50 2018-11-05 14:17:12

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

Re: Physics update: automatic angles

hmm, how about porting the physics engine to surge script, so we can modify it to our needs? It would also allow the less knowledgeable to do some small changes without the need to set up a compiling environment and learning the whole process - which I must say was quite frustrating.

also I noticed there are some scripts related to collisions but I don't know what they do.  collisions between objects<->objects and player<->objects seem to be off by quite a lot, around 16 pixels or so. like, a 3*3 sprite passing at 16 pixels distance from an object which is merely 24 pixels big was triggering the object's collision even though in practice they would never even touch in the slightest

ok, spoiler alert:

image.png

the green line is where the bullets stop hitting the barrel. as if the barrel was so tall as up to the yellow area. in fact, the png and the frame are only as big as that. the barrel is seen in-game as the blue box shows. there also seem to be a wider collision area, as show in red.

Last edited by KZR (2018-11-05 18:21:00)


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org