[ZScript] Side Scroller Game Starter Kit
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 188
- Joined: Tue Jul 01, 2014 10:44 am
- Operating System Version (Optional): Windows 10/Linux Mint
- Location: Stuck in Illbleed once more.
Re: [ZScript] Side Scroller Game Starter Kit
This is looking nice, Nash! Will definitely look into learning how to use this!
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
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)YukiHerz wrote:if you spam the jump button/press it at the right time, you can continuously jump mid-air.
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
-
- Global Moderator
- Posts: 1503
- Joined: Mon Dec 02, 2013 6:01 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Where corruption is redefined daily.
Re: [ZScript] Side Scroller Game Starter Kit
Hmm, my brain made me skip that one bit of text .
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
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
- 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
-
- Posts: 1048
- Joined: Sun Aug 02, 2015 1:20 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
- Location: Czech Republic
Re: [ZScript] Side Scroller Game Starter Kit
I'm gonna make a side-scroller similar to The Terminator on the Genesis/Megadrive if I can rip the sprites.
-
- Posts: 265
- Joined: Wed Mar 28, 2012 2:27 am
Re: [ZScript] Side Scroller Game Starter Kit
Just leaving a message to say that I'm using this as a ZScript reference. Thanks.
-
- Posts: 2067
- Joined: Thu Jul 04, 2013 8:01 am
- Graphics Processor: nVidia with Vulkan support
- Location: Mount Olympus, Mars
Re: [ZScript] Side Scroller Game Starter Kit
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: I have managed to retrieve and pack these from here.
Meanwhile, if any of you are interested to port Prince of Persia on GZDoom, here you are all graphical elements from the game: I have managed to retrieve and pack these from here.
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
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.
-
- Posts: 139
- Joined: Thu Aug 25, 2011 3:17 pm
Re: [ZScript] Side Scroller Game Starter Kit
Excellent!
-
- Posts: 198
- Joined: Tue Aug 14, 2012 10:16 pm
Re: [ZScript] Side Scroller Game Starter Kit
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?
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
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...
-
- Posts: 198
- Joined: Tue Aug 14, 2012 10:16 pm
Re: [ZScript] Side Scroller Game Starter Kit
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.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
Sure, I guess I can plop in a simple enemy that moves back and forwards or something.
-
- Posts: 198
- Joined: Tue Aug 14, 2012 10:16 pm
Re: [ZScript] Side Scroller Game Starter Kit
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 all
// 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
}
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: [ZScript] Side Scroller Game Starter Kit
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.
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.