Sonic Super Jam - Sonic ZX

In Progress Sonic Super Jam - Sonic ZX 1.0

No permission to download
The project is currently under development.
Working on new enemies for Sonic ZX and I'm running into some scripting issues. First here the scripts in question within escript.c.
void tosser(void Bomb, float dx, float dy, float dz, float Vx, float Vy, float Vz)
{ // Tossing bomb with desired speed
void self = getlocalvar("self");
int Direction = getentityproperty(self, "direction");
int x = getentityproperty(self, "x");
int y = getentityproperty(self, "a");
int z = getentityproperty(self, "z");
void Shot;

if (Direction == 0){ //Is entity facing left?
dx = -dx; //Reverse X direction to match facing
}

Shot = projectile(Bomb, x+dx, z+dz, y+dy, Direction, 0, 1, 0);
tossentity(Shot, Vy, Vx, Vz);
changeentityproperty(Shot, "speed", Vx);
}
void shooter(void Shot, float dx, float dy, float dz, float Vx, float Vy, float Vz)
{ // Shooting projectile with speed control
void self = getlocalvar("self");
int Direction = getentityproperty(self, "direction");
int x = getentityproperty(self, "x");
int y = getentityproperty(self, "a");
int z = getentityproperty(self, "z");
void vShot;

if (Direction == 0){ //Is entity facing left?
dx = -dx; //Reverse X direction to match facing
}

vShot = projectile(Shot, x+dx, z+dz, y+dy, Direction, 1, 0, 0);
changeentityproperty(vShot, "velocity", Vx, Vz, Vy);
changeentityproperty(vShot, "speed", Vx);
}

Here's how they're implemented. Loop 1 is for testing the attack without waiting for the next time for them to pull it.

anim attack1
range 50 100
delay 5
offset 94 87
bbox 87 54 18 26
frame data/chars/BombAngel/Walk0.gif
frame data/chars/BombAngel/Walk1.gif
frame data/chars/BombAngel/Walk0.gif
frame data/chars/BombAngel/Walk1.gif
frame data/chars/BombAngel/Walk0.gif
frame data/chars/BombAngel/Walk1.gif
frame data/chars/BombAngel/Walk0.gif
frame data/chars/BombAngel/Walk1.gif
frame data/chars/BombAngel/Walk0.gif
frame data/chars/BombAngel/Walk1.gif
@cmd dasher -1 0 0 1
@cmd shooter "BMBAA" 0 0 0 7 0 0
frame data/chars/BombAngel/A1-0.gif
frame data/chars/BombAngel/A1-1.gif
@cmd shooter "BMBAA" 0 0 0 7 0 0
frame data/chars/BombAngel/A1-0.gif
frame data/chars/BombAngel/A1-1.gif
@cmd shooter "BMBAA" 0 0 0 7 0 0
frame data/chars/BombAngel/A1-0.gif
frame data/chars/BombAngel/A1-1.gif
@cmd shooter "BMBAA" 0 0 0 7 0 0
frame data/chars/BombAngel/A1-0.gif
frame data/chars/BombAngel/A1-1.gif
delay 30
@cmd dasher 0 0 0 1
frame data/chars/BombAngel/Walk0.gif

anim attack2
loop 1
range 0 100
delay 6
offset 94 87
bbox 87 54 20 28
frame data/chars/BombAngel/A2-0.gif
frame data/chars/BombAngel/A2-1.gif
frame data/chars/BombAngel/A2-2.gif
delay 3
@cmd dasher -2 0 0 1
@cmd tosser "BMBAA2" 20 40 3 3 3 0
frame data/chars/BombAngel/A2-3.gif
frame data/chars/BombAngel/A2-4.gif
@cmd dasher -1 0 0 1
@cmd tosser "BMBAA2" 20 40 3 3 2 0
frame data/chars/BombAngel/A2-3.gif
frame data/chars/BombAngel/A2-4.gif
@cmd tosser "BMBAA2" 20 40 3 3 1 0
frame data/chars/BombAngel/A2-3.gif
frame data/chars/BombAngel/A2-4.gif
@cmd dasher 0 0 0 1
delay 8
frame data/chars/BombAngel/A2-1.gif
frame data/chars/BombAngel/A2-2.gif
frame data/chars/BombAngel/A2-1.gif
frame data/chars/BombAngel/A2-2.gif
frame data/chars/BombAngel/A2-1.gif
frame data/chars/BombAngel/A2-2.gif

Here's my issues.
-Shooter for some reason, is making the shot jump in the air like a bomb, when not only is there nothing telling it to do so but it's copied from an attack that's long since used the same setting but correctly.
-Tosser is working as intended now but after I set the 3rd digit to 3, it was originally 0 because it's suppose to be dz but for some reason is controlling vx.

These script work fine any other time though, but I got to thinking, I'm using OpenBORv6412, maybe that has something to do with it? Anyway I could find workarounds but I'd like some consistency if it can be helped, these things are throwing me off, and I already struggle with scripting.

x)
 
Lol, I ran into another issue. First I forgot I made another script.c specifically for Bloodbane's scripts, don't know if that will effect something or not with 3 .c files used regularly by entities. Ok, so I'm using this shooter 4 script but all the projectiles are spawning to the far side of the screen regardless of the entity shooting it, seen in the attached shot.

The script
void shooter4(void Shot, float dx, float dy, float dz, float Vx, float Vy, float Vz, int Face)
{ // Shooting special projectile with speed and direction control
void self = getlocalvar("self");
int Dir = getentityproperty(self, "direction");
void vShot; int SDir;

if(Dir == 0){ //Is entity facing left?
Vx = -Vx; //Reverse Vx direction to match facing
if(Face == -1){ //Opposite
SDir = 1;
} else {
SDir = 0;
}
} else {
if(Face == -1){ //Opposite
SDir = 0;
} else {
SDir = 1;
}
}

if(Face == -2){ //Left
SDir = 0;
} else if(Face == 2){ // right
SDir = 1;
}

vShot = spawn01(Shot, dx, dy, dz);
changeentityproperty(vShot, "velocity", Vx, Vz, Vy);
changeentityproperty(vShot, "direction", SDir);

return vShot;
}

The anim:
anim attack3
loop 1
range 0 100
delay 6
offset 186 207
bbox 156 93 58 52
#frame data/chars/FlameFang/A3-0.gif
@cmd shooter4 "FLAFA3" 0 50 0 -3 3 0
@cmd shooter4 "FLAFA3" 0 50 0 3 3 0
frame data/chars/FlameFang/A3-1.gif
@cmd shooter4 "FLAFA3" 0 50 0 -3 3 0
@cmd shooter4 "FLAFA3" 0 50 0 3 -3 0
frame data/chars/FlameFang/A3-2.gif
@cmd shooter4 "FLAFA3" 0 50 0 3 0 0
@cmd shooter4 "FLAFA3" 0 50 0 0 -3 0
frame data/chars/FlameFang/A3-3.gif
@cmd shooter4 "FLAFA3" 0 50 0 -3 0 0
@cmd shooter4 "FLAFA3" 0 50 0 0 3 0
frame data/chars/FlameFang/A3-0.gif
@cmd shooter4 "FLAFA3" 0 50 0 3 0 0
@cmd shooter4 "FLAFA3" 0 50 0 -3 0 0
frame data/chars/FlameFang/A3-1.gif
@cmd shooter4 "FLAFA3" 0 50 0 3 -3 0
@cmd shooter4 "FLAFA3" 0 50 0 0 -3 0
frame data/chars/FlameFang/A3-2.gif
@cmd shooter4 "FLAFA3" 0 50 0 -3 -3 0
@cmd shooter4 "FLAFA3" 0 50 0 0 3 0
frame data/chars/FlameFang/A3-3.gif
@cmd shooter4 "FLAFA3" 0 50 0 3 3 0
@cmd shooter4 "FLAFA3" 0 50 0 -3 3 0
frame data/chars/FlameFang/A3-0.gif
Help is appreciated. (y)

x)
 

Attachments

  • bor - 0108.png
    bor - 0108.png
    41 KB · Views: 4
Technically, and I mean that literally, yes. The usual bells and whistles of your basic OpenBOR mod is still there. 4 hit combos, tap twice to run, etc, but I did disable grabs. at sets this apart from SAR is the stages and enemies themselves are modeled after Gunstar Heroes and Contra Hard Corps, with most of the enemies being from Bloodbane's Contra Locked and Loaded mod, reworked for Sonic ZX. The majority of enemies can be taken out in one hit, it's mainly the bigger robots and bosses you have to actually worry about. Most of the time to, especially in the first segment of stage 1, you wont be stopped once, you just run and hit enemies as you go.

The playable cast is modeled after a steam game called Nelo and a Mugen video I came across where OP versions of Sol Badguy and Krizalid were spamming their super attacks on each other, so the moves of the cast were made to be more powerful and look more flashy compared to SAR, and to be more Sonic like, the chars move almost twice as fast as in my past mods. There's also the double jump skills, where pressing jump twice will perform attacks that hit enemies multiple times, exactly like Gunstar Heroes.

Basically, Sonic ZX is going to be less like a beat'em up game with Sonic characters and more like high speed action game that I think Sonic would be better for. While I got some things I still need to take care of, there will be more Sonic ZX content in the future.

x)
 
Thanks man, I've given myself a 2 day break from modding and just played some games to enjoy myself. I'll be going to be soon and after I get back home from work, I'll get to updating ZX again. My to do list isn't that long so it depends on how long it takes to correct some issues and make a few changes.

x)
 
For the most part I've been silent on most of what I worked on with Sonic ZX, but since I got a playable demo out now, along with one coming soon, I'll share one of the new features I'm adding to the game that was meant to be in the mod before, Guest Fighters!

First up is Leonardo, who was already in Sonic Adventure Revolution. Spent some time last night going through different fighters in Mugen for Special effects, mainly Justice from Guilty Gear and Igniz and Krizalid from King of Fighters, for Leo and other the new fighters. Couldn't find an effect that matches Leo's special from Shredders Revenge but I found a decent charging effect from an edited version of K', Orochi K' (Mentioning this in case it needs it needs to be pointed out later or credited), so I decided to combine that with an effect I got from either Igniz or Krizalid, so one effect for enemies up close and another for the rest of the screen. Since the idea of Sonic ZX is creating an action game that focuses more on stronger special abilities from the main cast, the guests will get the same treatment, since the Turtles only seem to get some special abilities in different fighting games, both the 16 bit classics I played recently. Go Mikey.
1661911975372.png1661911979749.png

EDIT: Uploaded some videos to youtube. They were already on Bitchute, just moved them over.

x)
 
Last edited:
I like the gameplay (not much the mix of art style though) but in the bunny video you were leveling up every 15-20 seconds, and that interrupts greatly the flow of the game. Imagine if you were doing a 4 player playthrough
 
I had thought about how level up slows the game down. Maybe I can find what part of the script controls that and lower the time, or stop it entirely.

EDIT: About the gameplay, do you think it's a better fit for Sonic and other platform style characters? It's meant to be like Gunstar Heroes but replacing guns with super powers, and taking cues from Nelo, and I may go with this style in other mods.

x)
 
Last edited:
I had thought about how level up slows the game down. Maybe I can find what part of the script controls that and lower the time, or stop it entirely.

EDIT: About the gameplay, do you think it's a better fit for Sonic and other platform style characters? It's meant to be like Gunstar Heroes but replacing guns with super powers, and taking cues from Nelo, and I may go with this style in other mods.

x)
It would be better if the action isn’t stopped and you get a on-screen level up notification + a “level up” sound/voice sample.
About the gameplay, you mentioned Gunstar Heroes, I think sprites from that game fits better for enemies. The gameplay fits for the kind of game you are aiming for.
 
Maybe I can find what part of the script controls that and lower the time, or stop it entirely.

Find levelup.txt in data/chars/misc/levelup folder. This is the entity spawned when levelup occurs. Here's the header of that entity:
Code:
name    levelup
type    text
subtype    noskip
lifespan    3
setlayer    999999

facing   1

palette none

This entity is type text which means it pauses the game when this entity appears. Even worse, it has noskip subtype preventing player from skipping it.

To solve this pausing issue, the obvious solution is to replace type text into none. This might cause another problem in which the levelup text might be left behind while respective player has gone elsewhere.

There are two ways to solve the latter issue:
1. Instead of regular spawn, levelup text is spawnbound to respective player. You'd need to modify levelup scripts for this though. And also simplify levelup animation cause it might cover the player.
2. Simplify levelup animation and change it into a simple effect which appears briefly.

#2 is easier to do.
 
It would be better if the action isn’t stopped and you get a on-screen level up notification + a “level up” sound/voice sample.
About the gameplay, you mentioned Gunstar Heroes, I think sprites from that game fits better for enemies. The gameplay fits for the kind of game you are aiming for.
I'll speak with Bloodbane about that.
I get what you mean now, but if I were going to use Gunstar enemies, I would've used Phantom, the mook you fight who goes invincible after a few hits. Side note, that's what inspired me to use that mechanic for mid bosses and real bosses, thankfully, NickyP's Satam mod had the code I needed. Another thing, I did want to go with more realistic looking bots. I wanted Dr Robotnik to be more threatening in this game, so I wanted the bots I used to be more realistic, that's why I grabbed a lot of enemies from Bloodbane's Contra mod instead of using the ones from my Sonic mod, and that's with the playable cast being more powerful here, so motobugs and such wouldn't fit what I was going for. Megaman X and Zero bots could've worked though, I recolored one of the X enemies for one of the Swat Bots after all.

....
"2. Simplify levelup animation and change it into a simple effect which appears briefly."
When I first read what you said about Spawnbound, I instantly thought of those Ninja Turtle skate boards you helped me implement in Sonic Adventure Revolution for flying levels. I could easily do that, but the one thing I'd need help with is the function that spawns that.

x)
 
I instantly thought of those Ninja Turtle skate boards you helped me implement in Sonic Adventure Revolution for flying levels.

Oh those boards use different method. They are coded to follow specific player. It's different than being bound to player.
I could easily do that, but the one thing I'd need help with is the function that spawns that.

Well, this is the function that you could use:
C:
void spawnBind(void Name, float dx, float dy, float dz, int Dir, int Flag)
{ // Spawn entity and bind it
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, dz);
   bindentity(Spawn, self, dx, dz, dy, Dir, Flag);
}

However, since Levelup text is spawned by special function, you'll need to find that function in lvup.c inside data/scripts/levelup folder. This is the function:
C:
void spawnLvup(void ent)
{
    clearspawnentry();
    setspawnentry("name", "levelup");
    void vSpawn=spawn();
    float fX = getentityproperty(ent, "x");
    float fY = getentityproperty(ent, "a");
    float fZ = getentityproperty(ent, "z");
    changeentityproperty(vSpawn, "position", fX, fZ, fY + 1);
    changeentityproperty(vSpawn, "direction", 1);
}

This function is similar to spawn01 function except that it specifically spawn levelup text and position it near defined entity. If you want to add binding effect, you could modify it into this:
C:
void spawnLvup(void ent)
{
    clearspawnentry();
    setspawnentry("name", "levelup");
    void vSpawn=spawn();

    bindentity(vSpawn, ent, 0, 0, 1, 2, 0);
}

I've tried it and it works well 😎

BTW while we're modifying function in lvup.c, why don't you adjust required scores to get lvlup? this would reduce times you see levelup displayed.
This is the function you need to modify:
C:
int getLevel(void score)
{
    int lv;
    if(score>500000){
        lv=34;
    }else if(score>450000){
        lv=33;
    }else if(score>400000){
        lv=32;
    }else if(score>350000){
        lv=31;
    }else if(score>300000){
        lv=30;
    }else if(score>265000){
        lv=29;
    }else if(score>255000){
        lv=28;
    }else if(score>245000){
        lv=27;
    }else if(score>235000){
        lv=26;
    }else if(score>225000){
        lv=25;
    }else if(score>215000){
        lv=24;
    }else if(score>205000){
        lv=23;
    }else if(score>195000){
        lv=22;
    }else if(score>185000){
        lv=21;
    }else if(score>170000){
        lv=20;
    }else if(score>160000){
        lv=19;
    }else if(score>150000){
        lv=18;
    }else if(score>140000){
        lv=17;
    }else if(score>130000){
        lv=16;
    }else if(score>120000){
        lv=15;
    }else if(score>110000){
        lv=14;
    }else if(score>95000){
        lv=13;
    }else if(score>85000){
        lv=12;
    }else if(score>75000){
        lv=11;
    }else if(score>65000){
        lv=10;
    }else if(score>56000){
        lv=9;
    }else if(score>48000){
        lv=8;
    }else if(score>40000){
        lv=7;
    }else if(score>32000){
        lv=6;
    }else if(score>24000){
        lv=5;
    }else if(score>16000){
        lv=4;
    }else if(score>8000){
        lv=3;
    }else if(score>4000){
        lv=2;
    }else{
        lv=1;
    }
    return lv;
}

FYI 4000 is minimum score for level 2, 8000 for level 3 and so on.
 
Last edited:
Tried the script, it does work but there's one issue, ad I tried multiple times with changing "facing" in the header, the text spawns backwards.
Spoiler: Been working on Silver and 4 other chars for ZX. Coming soon.
1662420113131.png
I do like the fact that the level up function works like Guardian Heroes now. Always wanted a Sonic game like that. :cool:

Before I forget, I added "void spawnLvup" and "int getLevel" to lvup.c exactly as you posted it.

x)
 
Last edited:
I tried multiple times with changing "facing" in the header, the text spawns backwards.

Oh that's because the bind function forces facing right for the text regardless of text' facing direction.
C:
bindentity(vSpawn, ent, 0, 0, 1, 2, 0);

2 means spawned text will always face right.
You could replace that with -2 or flip your level up text to solve this issue :)
 
Yo people, just visiting to drop this video

I been wondering how to go about working on future projects and I'm going to use Sonic ZX as a base, but I'd like to get some suggestions. After the video I would just want to know what you guys think should happen after the mid boss fight. Fast character, can take out enemies quickly, and many ways enemies and the game itself can be designed. If the suggestions are doable I'll try to add them to the stage in some way and post an update.

x)
 
Back
Top Bottom