Standalone Game Template

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Standalone Game Template

Post by Nash »



This is a standalone IWAD (.ipk3) that contains the absolute bare minimum assets needed to cleanly start the engine with no errors or warnings.

- Contains a custom palette made by me from scratch - this palette is libre and you therefore won't run into any legal issues.
- Contains basic lumps, some basic textures and graphics, a basic player sprite, some basic ZScript classes and a simple test map.

Should be easy to modify - just do a search-and-replace for everything 'MyStandaloneGame' and 'My Standalone Game' and you're good to go.

The game starts with modern-style controls (WASD + mouselook) and unfiltered textures, while everything else is left to engine defaults. You are of course free to edit your game defaults as you please - just edit defbinds.lmp and defcvars.lmp.

TIP: Use Rachael's config converter utility to generate your game's defaults based off your personal config files! Generally, the procedure would be to load up your IWAD in a fresh installation of GZDoom/LZDoom, run the game, set the options to your heart's content, exit the game, rename the INI to 'gzdoom.ini', place the INI in the same folder as convert-config, then use convert-config like this:

Code: Select all

// Replace 'MyStandaloneGame' with the name of your custom game, defined in IWADINFO
convert-config MyStandaloneGame
Use this to quickly prototype a custom standalone game project for GZDoom.

You must start the game using the following command to properly load it as a custom game IWAD:

Code: Select all

gzdoom.exe -iwad MyStandaloneGame.ipk3
-OR-
lzdoom.exe -iwad MyStandaloneGame.ipk3
All assets, except the fonts, are created by me (Nash Muhandes) and are released under CC-0. For more details, read license.txt and credits.txt

Compatible with GZDoom 4.5.0 and LZDoom 3.87b.

Happy game making!

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
You do not have the required permissions to view the files attached to this post.
Last edited by Nash on Sun Apr 07, 2024 10:19 am, edited 8 times in total.
User avatar
Caligari87
Admin
Posts: 6191
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Standalone Game Template

Post by Caligari87 »

Ooo, bookmarking this. Thanks Nash!

8-)
User avatar
Enjay
 
 
Posts: 26573
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Standalone Game Template

Post by Enjay »

Potentially very useful. A lot of people ask "what's needed for a stand alone game" and the answer is now a link to this thread. :thumb:
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Standalone Game Template

Post by Rachael »

This is great! A basic "get-up-and-go" starter package with all the assets you need to get going immediately.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Standalone Game Template

Post by Nash »

I have been told that this does not start up on non-devbuilds. My mistake - looks like I was using some devbuild features.

For now, all you have to do is delete the included defbinds and defcvars lumps. You'll have to regenerate them using Rachael's config converter. I most like won't update the download in the OP because it'd be pointless to remove it now, then re-add it back when the next version of GZDoom comes out...


All fixed for GZDoom 4.5.0 and LZDoom 3.87b
Last edited by Nash on Wed Jan 06, 2021 5:17 am, edited 1 time in total.
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Standalone Game Template

Post by Rachael »

It should always start on dev builds. If it doesn't that means it's a cvar we missed, please report it, that's rather urgent especially with an upcoming release.
User avatar
Enjay
 
 
Posts: 26573
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Standalone Game Template

Post by Enjay »

It's OK, it does start with the latest dev builds. It's the older builds and the last official GZDoom that it won't start with.
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Standalone Game Template

Post by Rachael »

Ah - yes, defcvars will not even start if you use a version more recent than its config version.

@ Nash: To fix this problem, you will have to start GZDoom on 4.4.2 first, using your current config, *then* run the config converter utility on the file that 4.4.2 produces.

Defcvars is designed to be backwards compatible, not forwards compatible.

The other thing you can do is bump the version number down by 1, and then remove the new CVARs from Defcvars one by one until it stops erroring out on startup.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Standalone Game Template

Post by Nash »

Yes, the defcvars issue is already fixed on my end. However now I run into another problem (as you've seen me ask on Discord) - it seems LZDoom has no fallback fonts and will fail to start if no fonts are bundled into the IWAD. Looks like I'll have to be creating my own libre fonts (both smallfont and bigfont). This turned out to be more effort than I initially thought it'd take... >_<
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Standalone Game Template

Post by Nash »

Updated to version 1.1. Cleanly starts with no errors on both GZDoom 4.5.0 and LZDoom 3.87b. New sprites, textures and graphics.
PowerUpT
Posts: 3
Joined: Sat Mar 06, 2021 2:35 pm

Re: Standalone Game Template

Post by PowerUpT »

Hi,
I'm really glad I found this resource, because it's exactly what I need for a project! Unfortunately I'm running into a really weird issue, but not a major one now that I have identified what is happening partially.
The template was working fine, and I had barely begun trying some map editing and adding textures with it. Strangely, when I added some new textures to the ipk3 and loaded it into GZDoom (I am using the GZDoom version), it started prompting me for an iwad anyways even when I supply it one by dragging the iwad/ipk3 onto the executable, launching it with SLADE3 directly, or using a launch parameter on the command line. This leads to a launch error, that seems to be the source port freaking out about there being multiple player objects and huds loaded, due to the source port loading twice:

Code: Select all

MyStandaloneGame.ipk3:zscript/mystandalonegameplayer/mystandalonegameplayer.zc, line 1: Class name MyStandaloneGamePlayer already exists
MyStandaloneGame.ipk3:zscript/mystandalonegamehud/mystandalonegamehud.zc, line 1: Class name MyStandaloneGameHUD already exists
MyStandaloneGame.ipk3:zscript/mystandalonegameplayer/mystandalonegameplayer.zc, line 1: MyStandaloneGamePlayer already has defaults
This seems like a source port problem to me, but I'm putting it here because it only affects the template ipk3. Launching Doom 2 with a parameter also brings up the iwad prompt again, but it loads fine.

Could this be an issue with the template? I just want to ask before I put this issue on the GZDoom github. Thanks.
User avatar
giwake
Posts: 24
Joined: Sat Feb 09, 2019 6:44 am

Re: Standalone Game Template

Post by giwake »

This is GREAT! Thanks!
Triska
Posts: 2
Joined: Wed Jul 13, 2022 5:37 am
Graphics Processor: nVidia with Vulkan support

Re: Standalone Game Template

Post by Triska »

I really appreciate the effort put in here, it is really useful on digging through how everything is loaded in to a base game unit.
Though I'm also seeing the same error as PowerUpT. Happens on gzDoom 4.8.2. And I tested on a clean 4.5 as confirmed by Nash in the OP, but no luck there.

Renaming the class to match through each file just gives me the error for the new name.

Best matches I could find on the issue are the class being loaded in twice. Though after triple checking the zcsript #include in SLADE each of Player and HUD are only being loaded once. Suppressing HUD and trying to narrow it down on Player also lead to no success.

Any ideas what I'm doing wrong?
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Standalone Game Template

Post by Nash »

The entire thing is due for an overall update and I just haven't been able to look into these issues yet. Seems to be a very common problem. I'll take care of it as soon as I can (well, as soon as I figure out what's actually going on, that is - I don't seem to be getting these errors!)
Triska
Posts: 2
Joined: Wed Jul 13, 2022 5:37 am
Graphics Processor: nVidia with Vulkan support

Re: Standalone Game Template

Post by Triska »

No worries,

If there are any logs we can generate to assist, do let us know.

Return to “Resources”