Page 1 of 3

[ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 11:27 am
by Nash
Image




Requires GZDoom g2.4pre-820-ge5a3d22 or later

Consider this beta quality! An official 1.0 release will be released alongside the next official version of GZDoom (should be around March 2017)


Inspired by the basic game kits that come with Unreal Engine 4... I give you the first game kit of its kind released for the ZDoom community. Side Scroller Game Starter Kit!

Features:

- Fully written in ZScript. No KEYCONFs, no cringe-worthy ACS. It Just Works.
- Smooth scrolling, uncapped framerate camera
- Animation framework - standing still, walking, jumping, etc. Easy to expand to fit your needs
- No need to tell your players to setup custom key bindings - uses default control scheme for movement
- Movement is completely customizable (just alter MoveSideScrollerPlayer as you please!)

I'm short on time right now and don't have time to make a more user-friendly documentation of the API or some kind of programming guide, but I think I've commented the stuff well enough so if you have a use for this kit; you probably won't have trouble navigating my code.

I tried to make my code as clean as possible. There are no errors or warnings in the console during startup.

This is a barebones game kit. You are expected to take this and build your game on top of it. If something is missing, you are probably going to have to do it yourself. :P Things like double-jumping, wall-jumping, more animations, attacking, crouching, monster AI etc... I purposely left them out. It's easy to expand the engine to do whatever you want. Have fun!

Hopefully this will spark more interest in ZScript and perhaps pave way for more game starter kits!

Bugs/Oversights I'm Aware Of (will fix next release)
- None so far

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".

GitHub Repository

Wanna chat about my mods? Join my studio's Discord server, Mischief Donut!
Image

I spend an uncountable amount of hours making mods. Consider supporting me on Patreon for cool benefits!
Image

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 11:53 am
by AFADoomer
Very nice! I remember the pain of making something like this work with ACS once upon a time...

One note: Do you have cl_capfps set? With uncapped framerate, I get a lot of player sprite flickering when moving...

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 11:57 am
by Nash
To all: I forgot an important piece of code to destroy the camera when the level ends... I saw about 5 downloads earlier. So please re-download. Sorry for the inconvenience!

AFADoomer: No, my framerate is uncapped. You can see in the video that it's running at 60 FPS with no sprite flickering and very smooth camera movement, as well as player movement. I'm not sure why you are getting such problems?

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 12:34 pm
by Death Egg
Oh, fuck. I've been waiting almost a decade for something like this, thank you!

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 12:52 pm
by Nash
If anyone other than AFADoomer is also getting flickering player sprites, please let me know. It doesn't happen for me and now I'm a little worried.

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 1:04 pm
by GENTEK
Wow! Nice stuff Nash like always! :D I can imagine old console games revived with new effects & levels! 8-)
On my side all works like a charm! :wink:

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 2:04 pm
by YukiHerz
This will help me a lot, thanks Nash!

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 3:05 pm
by AFADoomer
Nash wrote:If anyone other than AFADoomer is also getting flickering player sprites, please let me know. It doesn't happen for me and now I'm a little worried.
OK, did some more testing, and it only happens at resolutions over ~1600x900... So it may be a problem on my end - I've just never had issues with anything like this before, and I usually run at 1920x1440.

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 3:19 pm
by Nash
Hmm that's odd. I ran the game with 1920x1200, and also 1920x1080, in full screen mode (the latter was what I used to record the video with FRAPS), no flickering...

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 4:05 pm
by AFADoomer
Nash wrote:Hmm that's odd. I ran the game with 1920x1200, and also 1920x1080, in full screen mode (the latter was what I used to record the video with FRAPS), no flickering...
I think the problem's on my end somewhere... I'm seeing now that I get the same problem with the standard chasecam, it's just less noticeable.

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 6:19 pm
by Nash
Could it be a graphics hardware or driver-related issue? You'd best get your stuff checked. :O

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sun Feb 26, 2017 7:10 pm
by protox
Awesome work, thanks!

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Mon Feb 27, 2017 1:17 pm
by Enjay
No flickering here. Frame rate not capped and 1920x1200. Works very nicely.

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Mon Feb 27, 2017 8:43 pm
by Hellstorm Archon
Aw yiss

Now I can finally see about making a Doom-styled Metroidvania I've always wanted to make (just as soon as I learn ZScript). :)

Re: [ZScript] Side Scroller Game Starter Kit

Posted: Sat Mar 04, 2017 9:00 pm
by YukiHerz
I know this isn't even the 1.0 release and this is something you already know about yourself, but posting just in case, if you spam the jump button/press it at the right time, you can continuously jump mid-air.