News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
 
they would design the format to make it easy on themselves

...and they even failed at that!!! http://www.team5150.com/~andrew/carmack/johnc_plan_1997.html#d19970707 (section beginning "anatomy of a mis-feature").

well, it was supposed to be a fiend...

It's real close though, and a whole ton better than my first attempt at doing this with C# 8 or so years back. 
 
http://necros.slipgateconstruct.com/temp/nowthatsafiend.jpg

Silly mistake... tried reading in verts on the frames directly. :P 
Oh Thanks For That Link 
It's nice that that .plan stuff is archived. I never had internet back then (plus I was too young) but that seems very interesting now. :) 
 
Good stuff with the fiend. You gonna take this all the way and do texturing too?

The .plan archive is essential reading, it's a great window into the thinking behind why much of Quake is the way it is, and can be very informative for decisions of the "should I add/remove/change this feature?" kind. 
Skinzz 
Good Job, Necros... 
I can see its eye in that shot :) 
Heresy! 
Fiends don't have eyes. 
Yes They Do! 
You guys don't do a whole lot of looking at things, do you?

http://www.lunaran.com/pics/fiends...

And now, shambler will argue that those aren't actually eyes:
 
Herp Derp 
http://www.lunaran.com/pics/fiendshaveeyes.jpg
ZOMG! I've been wrong all this time!!! 
 
I thought those were nipples? 
Coding-related Questions 
Now that the RMQ project has split up, what's happening with the BSP2 format? Will it still be updated? Do any engines other than the RMQ Engine support it yet?

Also, is anyone willing to do some coding for new boss monsters? PM is currently cleaning up and debugging Drake, but doesn't want to spend time adding entirely new monsters/features/etc. I totally understand this POV but it'd be nice if Drake had a unique final boss of some sort.

Looks like eyes to me. Now the Shambler, on the other hand... 
Can Someone Make Me A Demon Skin 
With no eyes? This is horrible. 
Hm 
Glases are fine, horns another question.

http://members.home.nl/gimli/gdemon.jpg 
 
maybe I'm just tired, but that was hilarious. :D 
@Tronyn 
Since I was linked here from IRC, I might as well answer to Tronyn:

FTE and Darkplaces (and Hmap2) support BSP2, but DP's version is slightly different.

I would guess that DirectQ also supports it, and Baker and Rook's engines might as well.

I have switched to Warsow's FBSP for my project, so BSP2 will get no updates from me. The Schism team would probably be the ones to maintain it now. Perhaps ask at their forum.

You should talk to MH, Spike and Lordhavoc to get the BSP2 support in those engines harmonised.

Quakespasm did not want to support BSP2 when I asked.

I don't normally read this forum anymore, but I'm willing to help where I can. Poke me per mail or IRC if someone wants to talk to me. 
OBJs + PCX! 
http://necros.slipgateconstruct.com/temp/objdrawing.jpg

Thanks to preach for his pcx loading code in the md3tomdl converter. The runlength encoding stuff was confusing the crap out of me.
Also, I had to flip the pcx data on the x axis AND reverse the pixel array order after loading it... is that normal? If it's not then I must have messed up the UVs on the OBJ... 
Heh 
actually, flipping x axis and reversing the order is basically just flipping y axis right? :P 
Triple Post 
looks like it's a thing with obj... just flipped v component when loading the obj instead of goofing with the pcx. 
Y Axis 
There is an issue to be aware of with "intuitive" coordinates and storage of data. The natural order of storing skin/image data (at least the one taken in the mdl format) comes about I think from their usual representation as a string (in the purest array of numbers sense). Since we are used to text flowing from left-to-right then step down a line and repeat (for english-speakers) we extend that idea to the order pixels should be stored in the skin.

The place where this begins to cause a conflict is when we start thinking about cartesian co-ordinates on the skin. The standard mathematical axes on a graph has the y value increase as you move upwards. So if you have something that wants to put the origin of the coordinates in the bottom-left of the skin, you need to reflect the skin in y to compensate.

Having said that, if you're actually going to render the 2d skin somewhere, you really ought to apply the reflection to the skin vertices rather than the image file itself. Otherwise you will cause a lot of confusion for the user who has an expectation on what their skin looked like. 
 
Having said that, if you're actually going to render the 2d skin somewhere, you really ought to apply the reflection to the skin vertices rather than the image file itself. Otherwise you will cause a lot of confusion for the user who has an expectation on what their skin looked like.

Yes, this is what I ended up doing. I want to be able to display the skin either for drawing on (probably not) or changing UV coordinates, so having the thing upside down is not an option.

Turns out that this is a common thing with the OBJ format as many of the loading examples I read had a bit of code involving flipping the v component of the texture coordinates. 
Woohoo 
OBJ -> MDL perfectly functional! FUCK YEAH.
Still can't import more than 1 frame, but I don't think that's going to be a big deal. 
Coding Challenge 
Suppose that we have the following functions:

is_first_player: returns true if self is the first player in the server

is_last_player: returns true if self is the last player in the server

toggle_func_playerclips: finds all func_playerclip entities in the map and toggles them between SOLID_BSP and SOLID_NOT.

Your task: comment and critique the following scheme for implementing func_playerclip entities:
1) add
if(is_first_player())
    toggle_func_playerclips();
to PlayerPreThink.
2) add
if(is_last_player())
    toggle_func_playerclips();
to PlayerPostThink.

The main question for consideration: is there any way for a player to become 'stuck'? Extra credit for considering the implications if is_first_player and is_last_player are not available. 
Coding Challenge Fixed 
Forgot to preview so the entities weren't encoded...

Your task: comment and critique the following scheme for implementing func_playerclip entities:
1) add
if(is_first_player())
����toggle_func_playerclips();
to PlayerPreThink.
2) add
if(is_last_player())
����toggle_func_playerclips();
to PlayerPostThink. 
 
You might not be able to change .solid like that without setting model.
Might be safer to do the func_togglewall trick where you translate the clipmodel far away when 'off' and put it back into place when 'on'.

Beyond that, at first glance, seems like it would work? 
Re: Gb 
Hey, thanks for the response - helpful stuff. What's your email / how can I contact you? PS all the stuff on your blog looks amazing. Cheers. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.