Spawning Sprites

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Nash
 
 
Posts: 17452
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Spawning Sprites

Post by Nash »

Don't worry about feature requesting floor decals - it has been asked before many times, even when zdoom.org didn't exist yet. The answer was basically "no because it's difficult to do in Doom's software renderer".

I imagine it'd be much easier to do in OpenGL (the dynamic lights kind of already draws a plane on flats) - if I were Graf Zahl, I wouldn't mind making it a GZDoom-exclusive feature...
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

Nash wrote:Don't worry about feature requesting floor decals - it has been asked before many times, even when zdoom.org didn't exist yet. The answer was basically "no because it's difficult to do in Doom's software renderer".

I imagine it'd be much easier to do in OpenGL (the dynamic lights kind of already draws a plane on flats) - if I were Graf Zahl, I wouldn't mind making it a GZDoom-exclusive feature...
Yeah. Sorry I haven't been on in a few days. I've been busy with finals. Anyway, so does anybody have a method that would, even if complicated, allow me to put footprints in the snow as the player walks around? I need examples before I can decide how I'm going to do this. So lots of help is needed. :D
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Spawning Sprites

Post by Spleen »

Nero wrote:
Nash wrote:Don't worry about feature requesting floor decals - it has been asked before many times, even when zdoom.org didn't exist yet. The answer was basically "no because it's difficult to do in Doom's software renderer".

I imagine it'd be much easier to do in OpenGL (the dynamic lights kind of already draws a plane on flats) - if I were Graf Zahl, I wouldn't mind making it a GZDoom-exclusive feature...
Yeah. Sorry I haven't been on in a few days. I've been busy with finals. Anyway, so does anybody have a method that would, even if complicated, allow me to put footprints in the snow as the player walks around? I need examples before I can decide how I'm going to do this. So lots of help is needed. :D
Maybe you *can* use models, if you find some way to dynamically rotate them through ACS such that they are always aligned with the flat slope. :ugeek:
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Spawning Sprites

Post by Enjay »

I've no idea how convincing, or otherwise, this will look on slopes but here's a basic "proof of concept" WAD just to demonstrate the flat 3D model method. Load up the file then go and run around somewhere nice and bright like the open grassy area in map01, then stop and look behind you. ;)
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

Enjay wrote:I've no idea how convincing, or otherwise, this will look on slopes but here's a basic "proof of concept" WAD just to demonstrate the flat 3D model method. Load up the file then go and run around somewhere nice and bright like the open grassy area in map01, then stop and look behind you. ;)
Great thank you! I just downloaded this and I'll have to transfer it to my Windows partition since I'm on a Mac. How do I add the files? On top of it, I have another question. What is wrong with my SNDSEQ lump that I added? Here it is:

Code: Select all

//These are the custom sounds that are used for effects in All Alone.

//Plays once for error on Hand Pads for door controls
:PadError
	volume 127
	playuntildone plats/dserror
end

//Plays once for the signal that the door is going to open
:PadOpen
	volume 127
	playuntildone plats/dsopen
end
Um these 2 sounds are just sounds that need to be played when the player presses "use" next to a switch. Like the error one is meant to make an error buzz when the player can't do that. The other is like "ok can do this" and then the effects happen. I also use SoundSequence in ACS to activate it. Doom Builder highlights commands when you spell it right so I don't have syntax errors there. I need to know what is wrong with the SNDSEQ lump. HELP!!! :D
User avatar
Tormentor667
Posts: 13534
Joined: Wed Jul 16, 2003 3:52 am

Re: Spawning Sprites

Post by Tormentor667 »

Enjay wrote:I've no idea how convincing, or otherwise, this will look on slopes but here's a basic "proof of concept" WAD just to demonstrate the flat 3D model method. Load up the file then go and run around somewhere nice and bright like the open grassy area in map01, then stop and look behind you. ;)
This is pretty nice :) I really need to find out how to do easy MD2 models that work with GZDoom... is there a chance that someone ever will do a little tutorial for this? Teacher often have a special opportunity to do things like that... ;)
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

Tormentor667 wrote:
Enjay wrote:I've no idea how convincing, or otherwise, this will look on slopes but here's a basic "proof of concept" WAD just to demonstrate the flat 3D model method. Load up the file then go and run around somewhere nice and bright like the open grassy area in map01, then stop and look behind you. ;)
This is pretty nice :) I really need to find out how to do easy MD2 models that work with GZDoom... is there a chance that someone ever will do a little tutorial for this? Teacher often have a special opportunity to do things like that... ;)
Yeah but how do i load up the md2's? I tried to just load the folder with gzdoom, but that did nothing. Please tell me how to do this.
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Spawning Sprites

Post by Enjay »

Just load the whole zip file. Don't extract anything.



As for MD2/MD3 tutorials, I'm a clumsy amateur compared with Nash. He's the one that pointed me in the right direction and he has a very good handle on models. I think I'm pretty good at getting them working in GZdoom these days and I'm reasonable at tweaking existing models to my taste, but I'm not much good at making something from scratch. I just haven't had the time to sit down and work through any tutorials or anything yet.
User avatar
Nash
 
 
Posts: 17452
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Spawning Sprites

Post by Nash »

Tormentor667 wrote:MD2 models
I hate hate hate HATE this word (and this crappy model format)! :evil:
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

Enjay wrote:Just load the whole zip file. Don't extract anything.
Ok kools. I'll try that. How would I incorporate that into my wad though so that it only works on certain maps?

Wow! Thank you soo much!!! This works freaking awesome! I like! I don't think this will work too realistically on slopes, but that's ok. I haven't gotten that far in the mapping to decide how to do the ground outside. Wow!!! Now I just need help with incorporating your footprints into my wad. Oh, is it possible to turn this effect on and off through ACS?

Well, freaking awesome footprints. I may edit them to be a bit darker so they are a bit more apparent on snow, but not so much as to be unrealistic. Thanks for your help there.:mrgreen:

Oh, nevermind with the SNDSEQ lump stuff. I was having troubles for a while there but I got it figured out. I think a little secondhand pot smoke really helped there. :D
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Spawning Sprites

Post by Enjay »

As for switching them on and off, my initial reaction as to how to do it would be to have an A_Jumpifinventory (or whatever the syntax is) and have the player code jump past the frames that spawn the footprints if the inventory item is present. That way you could use ACS to give/remove the inventory item as the player moves off/on to the snow.




And, yeah, Nash's rantette about MD2 is justified. If you have a complex model with accurately and critically placed vertexes there is nothing worse than saving your model to find that all your vertexes moved slightly during the saving process. Even worse when it is an animated model because different frames may save the vertexes in different places so the whole model may wobble as it animates. MD3 is much better. Unfortunately, I enjoy the simplicity of the Quake Model editor (told you I was an amateur) and it only saves MD2. I also use Milkshape which has a far greater range of model support, but it also has disadvantages such as when it imports an MD3 model, it loses all the animation frames. But it is a far more powerful too generally and my use of it is increasing, especially as I am using more MD3 models. Nash has spoken about GMax being good, but I haven't tried it myself, so I'm looking forward to the tutorials that he has mentioned for this.
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

Enjay wrote:As for switching them on and off, my initial reaction as to how to do it would be to have an A_Jumpifinventory (or whatever the syntax is) and have the player code jump past the frames that spawn the footprints if the inventory item is present. That way you could use ACS to give/remove the inventory item as the player moves off/on to the snow.
Yeah, noob here with this kind of stuff (meaning me). I have no idea how to use A_Jumpifinventory. I looked it up in the wiki and it looks like it has to be something in DECORATE either for the new player class or for the code for the footprints. I have no idea. This is something I would need your help with Enjay. When I loaded up the zip in GZDoom, I didn't notice the footprints until I was out in the green grassy area in Map01. But when I went back and looked I could see them. They looked really kool though. Does it still spawn if I was to jump around? Or does it only appear in places where the player has touched?
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Spawning Sprites

Post by Enjay »

At present, it spawns a foot print twice (one left, one right) as the player goes through his walking animation. This will still happen regardless of where the player is - if his walking animation is being used, the footprints will get spawned. I think we'll need to call on the help of the DECORATE gurus (ie not me) to see if there is a way of making the footprints spawn only when the player is touching the ground.

The inventory jump (in pseudo-code) would be something like this:

PLAY A 0 A_JumpIfInventory ("inventoryitem", 1, 2) //check for the presence of the inventory item and jump past the next frame if it is there
PLAY A 0 A_SpawnitemEx (do footprint spawning stuff here) //spawn a footprint
PLAY A 4 //normal walking frame that gets jumped to if the inventory item is present

At least I think that's roughly how it would work, someone may chip in with a better solution. You'd need to define the inventory item too, however, I find the already built in strife "QuestItemX" actors useful for this kind of thing.
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: Spawning Sprites

Post by Sarah »

OOOOk? I have like nothing to contribute. I looked at that and basically just started gibbering to myself. I may be able to map, but this is complicated. Yeah, I'd say we need some outside help. Oh, when this gets sorted out, you'll want credit of course for the footprint stuff, right? Well, we can figure it out later.

Right now we need to just get this sorted out so I can get this into the game.
And I'm not sure what you mean by jumping ahead frames. Is that a visual effect or just something that happens in the code?

If we use an inventory item, wouldn't we:

1. need an OPEN or ENTER script to be checking to see if the player has the item at all time in the map?
1.1 and if the player had the item then spawn the footprints?
2. need scripts that give or take that said inventory item?

And if we do use an inventory item, doesn't that mean that it is the item that is doing the spawning of the footprints?

See if it gets organized like this, then I might be able to understand this a bit better. :D
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Spawning Sprites

Post by Enjay »

Nero wrote:If we use an inventory item, wouldn't we:

1. need an OPEN or ENTER script to be checking to see if the player has the item at all time in the map?
1.1 and if the player had the item then spawn the footprints?
2. need scripts that give or take that said inventory item?
No, it's simpler than that. (At least my idea is simpler than that - there may be a better way) The DECORATE would check if the item was present in the player's inventory. If it was, it skips past the frame that drops the footprint actor. If the item isn't present, then the frame isn't skipped and the footprint gets dropped. That is all done with decorate.

The scripting would be used when the player enters or leaves a snowy area. As the player enters, a script removes the inventory item and the DECORATE stops skipping past the footprint frame. When the player leaves the snowy area, he is given back an inventory item so the DECORATE starts skipping past the footprint spawning frame again.

There is no need for an open or enter script to do it this way and, seeing as how you will need a custom player class anyway to drop the footprint, you can either give the inventory item as a startup item, or not, depending on whether the player is going to start in the snow or not.

As for the actual script, it would depend somewhat on how you set up your map, how many ways on and off the snowy area etc there were. This is the kind of script that the likes of HotWax seem to excel in so hopefully he, or some other talented scripter, can chip in at some point.


As for credit, all I've really done is show an example of how a footprint can be dropped. That really doesn't require much credit at all. A name check in the text file would be nice. :)

Return to “Editing (Archive)”