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

#1 2018-08-29 23:30:54

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

Character system update

Character system update

Starting from build 18.830-dev, we'll have an updated character system. Modders should take notice of this update.

1. New multipliers have been added and old ones have been removed. Removed multipliers (like rolluphillslope, brakingthreshold and others) didn't help much and were quite obscure in their meaning. The new ones are: friction and charge.

2. A new block called abilities has been conceived. The engine provides a few built-in abilities (moves) that you can turn on/off.

3. The charge-and-release ability (aka "spindash") has been moved into the engine. It used to be controlled by scripts. However, given that this is such a basic ability (used by virtually by every MOD, as well as Open Surge itself), I decided to move it into the engine. This allows everyone to benefit from engine updates that deal with this ability. Not only that, but the physics for it has also been improved.

Important for modders: please update your character .chr files according to the documentation. To benefit from the improved physics and improved calculations for the charge-and-release ability, you'll need to remove/erase the old .player_spindash_controller object in the scripts/legacy folder. This object is spawned by the companion objects of your characters.

Offline

#2 2018-08-30 08:53:44

TheSeventhEmerald
Member
From: Spain
Registered: 2010-04-19
Posts: 302

Re: Character system update

Nice changes!

I only have a suggestion, that may be already implemented: the abilities block contains only built-in moves or can be customized? It would be very cool if these moves are read from some file (or maybe recognized as a class in SurgeScript or something similar). This way I could create an ability and check it on for every character I want, or I could download abilities as any other game asset (such as maps or music).

BTW, all the changes look amazing! I'm very hyped about the 0.5.0 thing big_smile


Piece of cake...!

Offline

#3 2018-08-30 13:17:39

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

Re: Character system update

TheSeventhEmerald wrote:

Nice changes!

I only have a suggestion, that may be already implemented: the abilities block contains only built-in moves or can be customized? It would be very cool if these moves are read from some file (or maybe recognized as a class in SurgeScript or something similar). This way I could create an ability and check it on for every character I want, or I could download abilities as any other game asset (such as maps or music).

BTW, all the changes look amazing! I'm very hyped about the 0.5.0 thing big_smile

Hi TheSeventhEmerald,

The abilities block contains built-in moves. Custom abilities are handled by scripts. Custom abilities can be added by adding objects to the companion.

The update should come today. smile

Offline

#4 2018-08-30 22:27:06

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

Re: Character system update

Nice!
I liked how you mentioned the method of creating a more traditional platformer game. The only obstacle to this for now is not being able do edit the collision box size due to sensors and such, making a scenario like "Mario and Mini-Mario" impossible to do without having to write a collision script by the ground up.

It makes me very honored to see my brickset included in dev-builds also! big_smile
I intend to improve on it a lot and make it more presentable from time to time. smile
Importing levels from the original games is super fun and more practical than ever now with the new system, it's cool to see that it's helping developing the engine in some way.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#5 2018-09-06 09:10:15

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

Re: Character system update

further on the collisions topic, it would be most useful if the collision maps also worked for sprites so we could fine tune the collisions of any given sprite, not only the player

Also I believe the new angle detection system causes characters to play the ledge animation more often when stopped on a slope. but because the character is not moving, the engine defaults its angle to 0 and then the ledge logic kicks in.

Last edited by KZR (2018-09-06 09:13:43)


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

Offline

#6 2018-09-06 20:47:51

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

Re: Character system update

KZR wrote:

further on the collisions topic, it would be most useful if the collision maps also worked for sprites so we could fine tune the collisions of any given sprite, not only the player

Yes, that makes sense. Have you checked the Sensor utility?

I'll be updating every item to SurgeScript, and in the process I'll be building a new API for accessing the engine. I'm open for suggestions. smile

Offline

#7 2018-09-06 23:44:07

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

Re: Character system update

that's the old brick_*() functions crunched into one, and it only works for bricks. Correct me if I'm wrong, I assume you are computing collision shapes for sprites based on their opaque pixels. sometimes this produces undesirable results.

let's say surge stretches an arm over or in front of himself. you want his collision to stay consistent and take only the body into consideration, so that if an enemy projectile flies by it will not hit the arm. if the collision is precomputed, the only way to effectively change the hitbox is to also modify the sprite.

Last edited by KZR (2018-09-06 23:45:18)


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

Offline

#8 2018-09-08 01:53:52

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

Re: Character system update

KZR wrote:

I assume you are computing collision shapes for sprites based on their opaque pixels. sometimes this produces undesirable results.

No.

I'm doing the opposite. Collisions are checked against sensors, not against Surge's sprite.

Pixel perfect collision will become impossibly slow once we move to A5. Working with individual pixels stored in video memory is untenable.

When I designed the new brick system, I had the A5 port in mind. There's a very efficient system that works on regular RAM, so we won't have these issues.

KZR wrote:

let's say surge stretches an arm over or in front of himself. you want his collision to stay consistent and take only the body into consideration, so that if an enemy projectile flies by it will not hit the arm. if the collision is precomputed, the only way to effectively change the hitbox is to also modify the sprite.

Detecting collisions between sprites on SurgeScript will come through a new method, most likely through (a combination of) geometric shapes. Let's call them colliders.

Offline

#9 2018-09-24 13:18:32

SynfigMaster91
Member
Registered: 2017-10-10
Posts: 144

Re: Character system update

Alexandre wrote:
Character system update

Starting from build 18.830-dev, we'll have an updated character system. Modders should take notice of this update.

1. New multipliers have been added and old ones have been removed. Removed multipliers (like rolluphillslope, brakingthreshold and others) didn't help much and were quite obscure in their meaning. The new ones are: friction and charge.

2. A new block called abilities has been conceived. The engine provides a few built-in abilities (moves) that you can turn on/off.

3. The charge-and-release ability (aka "spindash") has been moved into the engine. It used to be controlled by scripts. However, given that this is such a basic ability (used by virtually by every MOD, as well as Open Surge itself), I decided to move it into the engine. This allows everyone to benefit from engine updates that deal with this ability. Not only that, but the physics for it has also been improved.

Important for modders: please update your character .chr files according to the documentation. To benefit from the improved physics and improved calculations for the charge-and-release ability, you'll need to remove/erase the old .player_spindash_controller object in the scripts/legacy folder. This object is spawned by the companion objects of your characters.

Hi, Alex. I try to move my Speedy character to your latest new version, but when I try to run a level after modifying it to add Speedy, I get this error:

'Can't find sprite 'SD_SPEEDY' (animation 0)'

What's going on? sad

Offline

#10 2018-09-24 13:53:05

SynfigMaster91
Member
Registered: 2017-10-10
Posts: 144

Re: Character system update

Never mind. I fixed the problem. I forgot to add the .spr file. My bad +sweatdrop in anime style+

Offline

#11 2018-10-03 02:50:43

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

Re: Character system update

since we're discussing characters, I see two things that can be improved:

a dust effect with the spindash (can be a sprite)

a faster spindash release, and the possibility to charge it up, 3 to 5 times maybe?


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

Offline

#12 2018-10-03 11:56:51

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

Re: Character system update

KZR wrote:

since we're discussing characters, I see two things that can be improved:

a dust effect with the spindash (can be a sprite)

a faster spindash release, and the possibility to charge it up, 3 to 5 times maybe?

Absolutely.

For a dust effect to be placed, scripting can be used. Currently, we do not have a sprite for it though.

The release speed can be configured in the character file.
(also, if you press the jump button a lot while charging, the character will go faster)

Offline

#13 2018-10-03 14:15:23

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

Re: Character system update

how's this

dust_3.png

giphy.gif

ok, since the rest is already in, could the sample pitch be raised every time you charge, so that we have an audio cue?


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

Offline

#14 2018-10-04 01:31:13

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

Re: Character system update

KZR wrote:

how's this

dust_3.png

giphy.gif

Did you make this?

Would you mind if I asked you something? Some time ago, I made an animation of a water splash (played when Surge gets into water). However, my sprite is not very convincing. Would you make a better water splash? (more frames, more convincing water)

water.png
sprites/fx/water.spr

KZR wrote:

ok, since the rest is already in, could the sample pitch be raised every time you charge, so that we have an audio cue?

We can try it.

Offline

#15 2018-10-04 09:35:33

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

Re: Character system update

yes, you know I would not contribute materials from other sources. I've gotten quite proficient at pixel art and animation in the last few years, as I've been involved in a few projects besides my own.

I figured I'd return home with the acquired experience smile

so, yes, I'll redo the splash right away. perhaps even add a small sinewave distortion to the bubble

by the way, give me a list of graphics you'd like to see redone.
Particle and special effects are quite simple, as I can generate them and capture the results, or even start from a still image.

In fact this gave me an idea for a particle generator app, which will automatically export frames from any generated effect.

image.png

planned features:

-user may define particle parameters
-multiple layers of particles
-blending effects and shaders
-loading user images
-static and dynamic particles (react to movement, rotate, may have collision with other particles)
-exporting sequence to PNG

hopefully with the jump to A5 we get to use PNG alpha, making the effects look a lot more convincing.


also, can we set separate animations for rolling and charging? the roll animation doesn't convey the action very well

6b0a3c091d654d94358b372af2d34a8f2ca7a4c7_00.gif

see how Sonic slightly angles forward and blurs?

Last edited by KZR (2018-10-04 10:11:39)


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

Offline

#16 2018-10-04 12:02:27

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

Re: Character system update

KZR wrote:

yes, you know I would not contribute materials from other sources. I've gotten quite proficient at pixel art and animation in the last few years, as I've been involved in a few projects besides my own.

ah, that's why.

KZR wrote:

I figured I'd return home with the acquired experience smile

that's great, because we were lacking in this area (graphics)

KZR wrote:

by the way, give me a list of graphics you'd like to see redone.

Change the item boxes for a handheld gaming device (a red one, like the one Surge holds on his waiting animation). That's your suggestion coming true.

The checkpoint sprite.

The "animal prison" at the end of levels (not only a new sprite, but a redesign).

There's more to do, but if you can get these done, I'll ask you some things related to Sunshine Paradise later.

--

A bigger project:

Change Charge (his sprite looks too much like Sonic). Make him in the art style of the Salamander. Also, we'll need a "stomp" animation.

If this bigger project succeeds, we can tackle the other characters. smile

KZR wrote:

also, can we set separate animations for rolling and charging? the roll animation doesn't convey the action very well

yes, if you can draw it.

Offline

#17 2018-10-04 22:03:26

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

Re: Character system update

great, looks like I have work for some time. Don't expect much done until next week, though. I'll try to finish the splash before the weekend.

here's a quick shot at the item box in handheld style

handheld.png

giphy.gif

handheld_anim.png

some sort of explosion can be made as a separate sprite to complement the effect
I'll add a flickering light effect too, for when the item picture is displayed


this sort of thing takes me 30-60 minutes so they're the perfect bite-sized exercise for schedule gaps. I can do a lot more smaller things than focusing long times on one thing,  I'm afraid. And I don't have time on weekends because of my son, so I can only work on this between shifts.

Not like I have to explain myself, but I figured I'd let you know what you can count on smile

Last edited by KZR (2018-10-04 22:13:00)


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

Offline

#18 2018-10-04 23:23:32

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

Re: Character system update

here's my attempt.

handheld.png
handheld320.png
it can more easily rest, but I have more difficulty coming up with this pixel shading, so I made it flat.

KZR wrote:

Not like I have to explain myself, but I figured I'd let you know what you can count on

In this case I would suggest you to pick only small things, but put the absolute best quality possible on the work.

While suggestions will be given, it's possible that some works might get rejected.

If you feel the pull to contribute, it's great, please do so in the absolute best spirit smile

Offline

#19 2018-10-06 04:14:49

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

Re: Character system update

I've been experimenting a lot with the new system, and I have to say, it's incredible how much you can change the game's feeling with these values alone! I got very close results to a traditional platformer! Thank you for giving that focus to those looking to do something other than the default Sonic's physics!

I have two questions about it:

  • It seems that the movement in the air is predefined, if I'm not mistaken. Are there plans to be able to customize these values too?

  • I don't know what the current plans for making the collision editable are, but I noticed that when the player jumps, the collision box gets lower and a bit wider (I supose that is to fit it with the rolling animation). If customizing sizes is out of the question, could we have an option to have a fixed value, even when jumping? The constantly size changing can be a bit of trouble for more accurate platformers.

Last edited by Race the Hedgehog (2018-10-06 04:15:58)


PunBB bbcode test
Creating and Editing Sprites.

Offline

#20 2018-10-06 11:53:00

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

Re: Character system update

handheld2.png
image.png
giphy.gif
30 FPS
it kind of looks like a red game gear

Last edited by KZR (2018-10-06 12:02:51)


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

Offline

#21 2018-10-06 16:02:40

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

Re: Character system update

Race wrote:

I don't know what the current plans for making the collision editable are

I'm aware of this request, though it isn't supported yet.

Messing with the collision sensors is a pain. Get a few pixels wrong, and there will be glitches everywhere.

I proposed the creation of a configurable "collision box", a simple abstraction that would be mathemagically mapped to the real sensors.

Race wrote:

but I noticed that when the player jumps, the collision box gets lower and a bit wider (I supose that is to fit it with the rolling animation). If customizing sizes is out of the question, could we have an option to have a fixed value, even when jumping? The constantly size changing can be a bit of trouble for more accurate platformers.

Regarding editing the jumping collision region: I haven't thought about it. I see the validity of what you're saying. There's a different configuration for rolling, and that's on purpose.

For the time being, what if you roll out a jump of your own?

Race wrote:

I got very close results to a traditional platformer! Thank you for giving that focus to those looking to do something other than the default Sonic's physics!

I'm glad it helps. Our extended niche is retro platformers.

Once you succeed, I would ask you to share your results with the community smile

Race wrote:

It seems that the movement in the air is predefined, if I'm not mistaken. Are there plans to be able to customize these values too?

I'm not sure what you mean?

KZR wrote:

it kind of looks like a red game gear

yep, that's awesome.

I wonder how the following would look like in-game?

ezgif_2_a9b6d3b87bdb.jpg
Retropixl_retrogaming_retro_gaming_Sega_Game_Gear_Red_4.jpg

Enjoy Coca Cola (see the cartridges)

Offline

#22 2018-10-06 18:38:03

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

Re: Character system update

Alexandre wrote:

I proposed the creation of a configurable "collision box", a simple abstraction that would be mathemagically mapped to the real sensors.

That sounds great!
Even if it were to be a separate object that could have a functional and customizable collision box, it would already be great for me. I tried to make one myself with the old API, but I didnt get a perfect constant result.

Alexandre wrote:

For the time being, what if you roll out a jump of your own?

Yea, is not as big as a problem, I believe that springfying the player would already fix my case.

Alexandre wrote:

Once you succeed, I would ask you to share your results with the community smile

No problem! For now they are super experimental projects to see what can and what can not be done with the engine, but as soon as I achieve a more presentable result I'll be sure to show it here. smile

Alexandre wrote:

I'm not sure what you mean?

It seems that modifying friction, acceleration and deceleration only changes the player's movement on the ground.
While its movement in the air is always the same, independent of the values.


PunBB bbcode test
Creating and Editing Sprites.

Offline

#23 2018-10-07 01:55:23

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

Re: Character system update

Race the Hedgehog wrote:

It seems that modifying friction, acceleration and deceleration only changes the player's movement on the ground.
While its movement in the air is always the same, independent of the values.

ah, yes. There's an acceleration that takes place in the air as well. Good point, we need to add it.

Offline

#24 2018-10-08 16:42:40

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

Re: Character system update

Version 18.1008-dev includes two new multipliers: airacceleration and airdrag. The charge sound has also got variable pitch, as has been suggested (feedback is welcome).

I ask you guys to test things out and see how well adjusted the default multipliers are.

Thank you.

Offline

#25 2018-10-08 21:45:24

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

Re: Character system update

image.png


just downloaded and extracted to a new folder


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