Page 2 of 3

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sun Mar 05, 2017 10:01 am
by SuperSomariDX
This is looking nice, Nash! Will definitely look into learning how to use this!

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sun Mar 05, 2017 10:14 am
by Nash
YukiHerz wrote:if you spam the jump button/press it at the right time, you can continuously jump mid-air.


Yeah, it's already written in the OP... it's a simple oversight. I've already fixed it. I'm also looking at making the player movement more tweak-friendly so you can customize the platforming "physics" to better suit your type of game (you will be able to adjust the movement from slidey Mario, to tight-as-f$@k Symphony of the Night)

I'll also add crouching and jump-through platforms but that's about it.

I probably won't add much else though because I cannot assume what kind of platform game anyone would want to make. There's too many possibilities. I'm not going to write peoples' games for them. =P

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sun Mar 05, 2017 10:22 am
by YukiHerz
Hmm, my brain made me skip that one bit of text :p.

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Wed Mar 08, 2017 8:50 am
by Nash
8 March 2017 update:

- Added ZScript versioning compatibility (requires GZDoom g2.4pre-820-ge5a3d22 now)
- Added player acceleration and deceleration to control the tightness of the player movement.
- Added dynamic jump height. Hold the jump key to jump higher. Tap the jump key to do short jumps.
- Added crouching.
- Fixed infinitely-jumping bug.
- Made demo map a little bigger.

The player movement properties can be customized in zscript/SideScrollerGame.zsc

Notice: I will no longer upload attachments to the forum, to conserve web space. To grab the latest version of the SDK, just go to the Github page, click the large green button that says "Clone or download", then "Download ZIP".

I plan to add a few more basic functionality before declaring this SDK final:

- Jump through platforms
- Pain and death state
- A simple attack animation
- Moving platforms

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Fri Mar 10, 2017 7:33 am
by Oberron
I'm gonna make a side-scroller similar to The Terminator on the Genesis/Megadrive if I can rip the sprites.

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Mon Mar 13, 2017 10:21 am
by Agentbromsnor
Just leaving a message to say that I'm using this as a ZScript reference. Thanks. :)

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Tue Mar 14, 2017 10:24 am
by Ozymandias81
This is awesome... Gonna check it while I can.

Meanwhile, if any of you are interested to port Prince of Persia on GZDoom, here you are all graphical elements from the game:
PoP.7z
Prince of Persia graphics resources
(142.13 KiB) Downloaded 67 times

I have managed to retrieve and pack these from here. :D

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Tue Mar 14, 2017 10:57 am
by Nash
Making a Prince of Persia-style platform movement will be a little complicated. The Prince's movement is restricted to tiles, so some additional work will be needed to make sure the player's movement adheres to those tiles. The Prince also has a lot of smooth animations (very impressive for the 90's) so obviously a lot more code is needed to make the Prince play all those animations.

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Tue Mar 14, 2017 11:26 am
by blood
Excellent!

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Thu Mar 23, 2017 12:56 pm
by Death Egg
This is probably an odd request, but is there any way you could add functionality to switch between this and normal, first person gameplay mid-level, kind of like how SRB2 can switch between 2D and 3D gameplay on a whim?

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Thu Mar 23, 2017 5:53 pm
by Nash
It's definitely possible to add that functionality, but it's beyond the scope of a basic game kit. The purpose of this kit is to cater solely to typical side scrollers only...

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sat Apr 01, 2017 4:54 pm
by Death Egg
Will you be including basic enemy AI in future releases? I'm really loving the current version by the way, it's inspired me to finally work on learning coding properly and begin work on rebooting a game I've worked on and off on for 16 (!) years.

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sat Apr 01, 2017 8:24 pm
by Nash
Sure, I guess I can plop in a simple enemy that moves back and forwards or something.

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sat Apr 01, 2017 9:33 pm
by Death Egg
I have this code for my project that I accidentally fucked up. I was trying to implement friction and braking as in this guide, the friction worked but the braking kept giving me problems. No matter how much I reformat it, it still throws the player to either the left with an insane velocity or to the right. I am really new to this coding stuff so I've been trying to avoid getting help for all the other bugs, but this one is really kicking my ass.

Code: Select allExpand view
// apply X velocity
      if (sideInput != 0) //if there is input
      {
         if (vx >= 0 && sideInput > 0) vx += PLAYER_ACCELERATE; //if velocity is above 0 & pressing right, add acc
         else if (vx <= 0 && sideInput < 0) vx -= PLAYER_ACCELERATE; //if velocity is below 0 & pressing left, sub acc
         vx = Clamp(vx, -SideMove1, SideMove1); //velocity = Limit(Velocity,input left, input right)
      }
      else if (sideInput == 0 && vx != 0) //if there's no input and velocity isn't 0
      {
         if (dir == DIR_Left) vx += (PLAYER_FRICTION * vx); //if facing left, add friction
         else if (dir == DIR_Right) vx -= (PLAYER_FRICTION * vx); //if facing right, sub friction
      }
      else if (sideInput == 0 && vx == 0) //if there's no input and velocity is 0
      {
         vx *= PLAYER_FRICTION; //Velocity = Velocoity * Friction
      }

      // braking
      if (sideInput != 0 && vx != 0) //if there's no input and velocity isn't 0
      {
         if (vx < 0 && sideInput > 0) vx += PLAYER_DECELERATE; //if velocity lower than 0 & facing right, add decelleration
         else if (vx > 0 && sideInput < 0) vx -= PLAYER_DECELERATE; //if velocity is above 0 & facing left, sub decelleration
      }

Re: [ZScript] Side Scroller Game Starter Kit

PostPosted: Sun Apr 02, 2017 12:31 am
by Nash
Just a wild guess: in the braking part, what happens if you do vx *= PLAYER_DECELERATE; ? I don't understand what's going on but if you say your character is being thrown off very far, it could be because you're adding velocities in the braking part.

Disclaimer: I have no idea what's going on and I'm not familiar with Sonic's movement physics so it could be that my response is waaaay off.