[ZScript] Side Scroller Game Starter Kit

Post your example zscripts/ACS scripts/etc here.
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.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

[ZScript] Side Scroller Game Starter Kit

Post 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
Last edited by Nash on Thu Sep 01, 2022 6:05 am, edited 11 times in total.
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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...
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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?
User avatar
Death Egg
Posts: 198
Joined: Tue Aug 14, 2012 10:16 pm

Re: [ZScript] Side Scroller Game Starter Kit

Post by Death Egg »

Oh, fuck. I've been waiting almost a decade for something like this, thank you!
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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.
GENTEK
Posts: 673
Joined: Mon Aug 05, 2013 5:10 pm

Re: [ZScript] Side Scroller Game Starter Kit

Post 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:
User avatar
YukiHerz
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

Post by YukiHerz »

This will help me a lot, thanks Nash!
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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...
User avatar
AFADoomer
Posts: 1322
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post by Nash »

Could it be a graphics hardware or driver-related issue? You'd best get your stuff checked. :O
User avatar
protox
Posts: 39
Joined: Sat Mar 22, 2014 6:40 pm

Re: [ZScript] Side Scroller Game Starter Kit

Post by protox »

Awesome work, thanks!
User avatar
Enjay
 
 
Posts: 26516
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post by Enjay »

No flickering here. Frame rate not capped and 1920x1200. Works very nicely.
User avatar
Hellstorm Archon
Posts: 1176
Joined: Sun Oct 24, 2010 7:37 pm
Preferred Pronouns: They/Them
Location: 404 Error- Location of User Not Found
Contact:

Re: [ZScript] Side Scroller Game Starter Kit

Post 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). :)
User avatar
YukiHerz
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

Post 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.
Post Reply

Return to “Script Library”