[Added] GAMEINFO keys for startup screen

Moderator: Developers

GAMEINFO keys for startup screen

Postby Gez » Mon Feb 20, 2012 9:56 am

This code adds two new GAMEINFO keys:
STARTUPTYPE = "Game Name" allows to choose the startup screen will be displayed (on Windows systems only since I haven't found code for graphical startup screens on the SDL side). Valid values are Doom (text), Heretic, Hexen and Strife. This overrides the game default.
STARTUPSONG = "lump name" allows to choose which song to play during the Hexen loading screen, just in case you don't want to name that song "orb".
Attachments
startup.zip
(1.01 KiB) Downloaded 26 times
Gez
 
Joined: 06 Jul 2007

Re: GAMEINFO keys for startup screen

Postby Xaser » Mon Feb 20, 2012 11:25 am

Ah, nice! I was hoping to make use of the Hexen-style bar for Hacx. Got the graphics lying around and everything. ;)
User avatar
Xaser
secretly a supercomputer being a government
 
Joined: 20 Jul 2003
Location: .plɹoʍɹǝʌǝu.

Re: GAMEINFO keys for startup screen

Postby Tormentor667 » Mon Feb 20, 2012 11:50 am

Awesome :)
User avatar
Tormentor667
 
Joined: 16 Jul 2003
Location: Germany

Re: GAMEINFO keys for startup screen

Postby Enjay » Mon Feb 20, 2012 12:38 pm

This'll allow a nice little bit of customisation right from the moment the game launches.

Does ZDoom still require the graphics lumps to be in the native format for the startup type or can PNGs (or whatever) be read these days?
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Gez » Mon Feb 20, 2012 12:53 pm

I haven't changed the rest of the code, so it'll still load them as their native formats. SLADE 3 can do the conversions to the graphical formats, and for Heretic's you have to use the same editors you'd use for ENDOOM.
Gez
 
Joined: 06 Jul 2007

Re: GAMEINFO keys for startup screen

Postby Enjay » Mon Feb 20, 2012 1:06 pm

I haven't had much.. er, any success in getting graphics in to the correct format in the past. I thought I'd got the steps right in SLADE but when I try to replace STRTBOT in Strife, the graphic simply doesn't show up and when I try to replace NOTCH in Hexen, the startup screen doesn't show at all and ZDoom just uses the normal ZDoom startup window and then goes to the title graphic.

Would you mind stepping me through exactly how to use SLADE to get these graphics correct?
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Enjay » Tue Feb 21, 2012 7:08 pm

Oh, it looks like this has been added. Thanks Gez and Randy. :thumb:

I don't suppose there is any chance of getting the loader tweaked so that it can load PNGs and the usual range of graphics supported for other uses is there :?:
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Tormentor667 » Wed Feb 22, 2012 6:53 am

Thanks, yeah :) It still needs some kind of a editing info as I have no idea how to work with that atm. Or maybe, Gez, would you mind doing an example for HPack while you're at it anyway? :P
User avatar
Tormentor667
 
Joined: 16 Jul 2003
Location: Germany

Re: GAMEINFO keys for startup screen

Postby Gez » Fri Feb 24, 2012 1:59 pm

Enjay wrote:Would you mind stepping me through exactly how to use SLADE to get these graphics correct?


Turned out a few issues had to be fixed first. So, you'll need first to get a new version of SLADE's map editor branch, r1169 or later. (I'm uploading r1169 as I type.) Second thing, go to Editor->Preferences->Graphics, and make sure the "Offer additional conversion options" checkbox is checked.

So, here we go:
To replace Strife startup graphics: make images in the right size, which can be converted to the palette used. Convert them to Doom flat; since technically that's the same thing, just with different dimensions. (Without the "additional conversion options" thing, only 320xsomething and flat-compatible dimensions can be converted.)

For example, here is an awe-inspiring replacement robot for the Strife introduction:
Spoiler:

So dreadful. The outcome?
Spoiler:


For Hexen, you've got to have a 640x480 paletted picture with 16 used colors or less in the palette.
Spoiler:

If the image can be converted, you'll see the "Planar" choice appear in the drop-down list.
Spoiler:


Same deal with the notches. They have to be scrupulously the same size, and they have to use the same palette as the main image because they don't use their own palette information. When converting images that have the correct dimensions, you'll see a "4-bit (paletted)" choice available.
Spoiler:


Afterwards, it's plug-and-play.
Gez
 
Joined: 06 Jul 2007

Re: GAMEINFO keys for startup screen

Postby Graf Zahl » Fri Feb 24, 2012 2:33 pm

To be honest, that's an utterly counterproductive workflow. If these things need to be customizable they should be able to read other graphics formats, too, not just some totally outdated specialty files. The texture management code isn't that bad that it can't be done. You can easily create textures without using the texture manager for this.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: GAMEINFO keys for startup screen

Postby Enjay » Fri Feb 24, 2012 4:09 pm

Success!

Image

Thanks for the modified SLADE and the info Gez. Now to see if I can do something more interesting with it. :biggrin:

I do agree that it would be better if this was opened up to all image formats. I remember when some other graphics (the Heretic autopage and final graphics ring a bell) were limited to a specific format. Nowadays, just whack a PNG into the file and ZDoom takes care of the rest. Much easier and with better results (eg higher resolutions and so on).

At least I have something new to play around with any way. Thanks again.

[edit] Hmmm, Hexen startup screens - I have a graphic in the right format and it shows when the game starts. However, I don't seem to be able to get it to use its own palette. If I select "existing/global" as the palette, the existing palette seems to get thrown out of the window and the image is greyscaled. If I pick a palette from a specific game (any of them) the image shows just fine in the palette that I have picked. Should "existing/global" not preserve the existing palette? I mean, there is already a greyscale option on the list.

(and a side question, is there a way to add extra palettes to SLADE?)

[edit2] Hmmm, I just read the palette documentation and I now understand "existing/global" and how to use a custom PLAYPAL lump. There doesn't seem to be an ability to read a palette from a graphic or for me to add a palette in non PLAYPAL format (eg being able to use Paint Shop Pro palettes somehow would suit me). Is that correct?
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Gez » Fri Feb 24, 2012 5:40 pm

Graf Zahl wrote:To be honest, that's an utterly counterproductive workflow. If these things need to be customizable they should be able to read other graphics formats, too, not just some totally outdated specialty files. The texture management code isn't that bad that it can't be done. You can easily create textures without using the texture manager for this.

Sure, it'd be better, but what we have right now is enough for my needs. Eventually more customization might come (e.g., changing the text displayed and at what coordinates in the Heretic startup screen) but it's not especially priority.

Enjay wrote:[edit] Hmmm, Hexen startup screens - I have a graphic in the right format and it shows when the game starts. However, I don't seem to be able to get it to use its own palette. If I select "existing/global" as the palette, the existing palette seems to get thrown out of the window and the image is greyscaled. If I pick a palette from a specific game (any of them) the image shows just fine in the palette that I have picked. Should "existing/global" not preserve the existing palette? I mean, there is already a greyscale option on the list.

That's odd. I might have to look into that.

Enjay wrote:(and a side question, is there a way to add extra palettes to SLADE?)

A ton! Select a palette (not necessarily the first palette of a PLAYPAL lump, by the way), and from the Palette menu you can choose "Add to custom palettes" to add it permanently, or "Test palette" to add it only for the current session.

Enjay wrote:[edit2] Hmmm, I just read the palette documentation and I now understand "existing/global" and how to use a custom PLAYPAL lump. There doesn't seem to be an ability to read a palette from a graphic or for me to add a palette in non PLAYPAL format (eg being able to use Paint Shop Pro palettes somehow would suit me). Is that correct?

You can import palettes. Put some palette lump somewhere, then use the "Import from" option from the palette menu. You can import a palette that exists as a image, as a raw list of RGB info, or as a JASC, CSV or GIMP palette. If I'm not mistaken, JASC is the format used by Paint Shop Pro, right? So yeah, you can import them into the PLAYPAL format.
Gez
 
Joined: 06 Jul 2007

Re: GAMEINFO keys for startup screen

Postby Enjay » Fri Feb 24, 2012 6:07 pm

Thanks for the answers and explanations. Yes, JASC is the Paint Shop Pro format and it works perfectly. Thank you.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Enjay » Sat Feb 25, 2012 10:23 am

Another thing that is worth mentioning that I just discovered with the Strife startup. The wiki correctly points out that the background image only has part of the central portion of it drawn to screen and that lines 0 to 56 and 152 to 199 are not drawn. Because they appear black in Strife, I just assumed that "not drawn" = "drawn black". However, the colour that is actually used is palette entry 240.

Fortunately in Doom, where this is most likely to be used, entry 240 is a dark blue colour that will probably be acceptable to most people. Heretic has a sort of pea-soup green and Hexen has a red brick-like colour. These may, or may not, suit people's needs but as far as I can tell, the colour used is fixed to palette entry 240 and cannot be customised.

[edit]
Startup screen success.

Image

The WAD has an altered palette, hence the blue not being in the Doom palette. Just for info, here's the Doom PLAYPAL colours:

Image

Which, IMO, looks really pretty nice (possibly better than my palette - but I prefer my palette in game, for this mod at least).

Heh, I just noticed that both screenshots have the projectile in exactly the same spot.
[/edit]
Last edited by Enjay on Sat Feb 25, 2012 11:33 am, edited 3 times in total.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: GAMEINFO keys for startup screen

Postby Gez » Sat Feb 25, 2012 11:19 am

Yep:
Code: Select allExpand view
   StartupBitmap = ST_Util_CreateBitmap (320, 200, 8);
   ST_Util_BitmapColorsFromPlaypal (StartupBitmap);

   // Fill bitmap with the startup image.
   memset (ST_Util_BitsForBitmap(StartupBitmap), 0xF0, 64000);
   FWadLump lumpr = Wads.OpenLumpNum (startup_lump);
   lumpr.Seek (57 * 320, SEEK_SET);
   lumpr.Read (ST_Util_BitsForBitmap(StartupBitmap) + 41 * 320, 95 * 320);

The "memset" line is where it's filled with 240 (0xF0). Then the bitmap lump is partially drawn over it.
Gez
 
Joined: 06 Jul 2007

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Yandex [Bot] and 0 guests