so this will be my first mod if i can pull it off, and i have no clue what i'm doing. i crafted a flashlight mod for the first Quake, but QuakeC was a little easier to work with.
so where i'm at so far: I have a compiler and the 3.21 source code, and i've got my solution file up and running. i recognize some of the same concepts in the source that i saw in Q1, but i don't know how to go about creating the file for the torch itself, or what i would need to tweak in the other files to go along with that.
yes, i'm a total noob to the coding thing, so i'm gonna get it out there before anyone else can that i'm ignorant of all this and in over my head. but i want to figure out how to pull this off. i just need some guidance for where to start. i have the cubemaps and sfx i used for Q1, which i would think would be usable in this instance as well.
i've also plumbed Berserker's files, but i can't find where in his mod the flashlight is implemented, so if anyone else might have an idea, that could be a good place to start, and provide some good resources.
and if there's something else out there like this that i just haven't found, please show it to me.
Although I'm not familiar with QuakeC, I've made a mod in Quake 2 that uses a flashlight. If you go with Quake 2 it's pretty straight forward adding it to the base mod if you know basic C programming, here's a short tutorial:
abel1389 As a beginner you probably want something simple, short, providing results that will not get you bogged down or discouraged early on, so I doubt you want to dig through tons of lazarus code to be honest just to extract a simple flashlight. The code I provided is straight to the point and minimum of what you need to get you started. I've used it before and I didn't run into any crashes, so I doubt you'll either. If you're really worried about it though, you can always add the pointer to g_save.c later once you get a feel for things.
I'd go through a bunch of tutorials found on this page, before getting buried in lazarus though:
Hm, while I have faith in the Lazarus authors, I'm not sure a TE_FLASHLIGHT temp entity makes the most sense, either. That means the flashlight will be transmitted at every frame for which it is active. I guess, if it only contains a 48 bit packed origin, that's not awful. But might it be more efficient to just spawn an actual entity that can be delta-compressed (like the tutorial Null posted)? I guess the temp entity allows you to define a custom payload (color, radius, etc) as well, which is nice, but again, lacking in network efficiency. If a regular entity were used, you'd have to overload other entity state fields for radius and color.. meh, maybe I'm overly concerned with bandwidth.
Last Edit: May 14, 2015 8:48:23 GMT -5 by jaydolan