Forum

func_pushable in Quake-C

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

func_pushable in Quake-C

Postby catalyst » Wed Feb 18, 2009 10:06 pm

hi again,

i become more and more addicted to the forums...
i want to make pushable objects for my mod. i copied the button's functions to plats.qc and am trying to modify them to make a pushable object. i'm stuck with the SUB_CalcMove function at the moment. What should I pass it as the third argument? For the button it was button_wait but I dont need my pushable to wait, do I?
catalyst
 
Posts: 26
Joined: Tue Feb 17, 2009 12:06 pm

Libraries

Postby Chip » Thu Feb 19, 2009 11:18 am

I just read your post and another one with some rope requirements.

So, I was wondering, could it be possible to create a library of widely used functions, which could then be incorporated into any mod. Something like library.qc which should contain "callable" (=which can be called ;)) functions.

It could be similar to dpextensions.qc, and keep it frequently updated. After adding something like 100 functions to it, I'm sure it would be pretty useful, and Quake modding will come back to life.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Postby Error » Thu Feb 19, 2009 11:24 am

there have been many things like that.

most people don't release their subs to others, but some do.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby Urre » Thu Feb 19, 2009 4:32 pm

Both of these cases are doable with Twig, well the rope isn't externally supported yet but internally it is.

Problem is Twig is DP specific (theoretically also FTEQW), and often these sorts of things require a lot of external coding to work properly, if the lib is to be modular and clean, meaning you'll be doing a bunch of the work yourself anyway. There can be example code, but example code is rarely very feature-complete, it might not do all the things you want to do, or work in the situations you want it to, and so forth. All things require work. It's like, when adding a physics lib to an engine, you might imagine that you can instantly make cool car games because of this. The truth is that you'll be doing a lot of input and camera work, a lot of tweaking of physics parameters and objects, special case handling and general cursing. Libs basicly just give you a couple more tools, they will very rarely actually do anything for you.
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Well...

Postby Chip » Thu Feb 19, 2009 5:05 pm

It would also require an updated set of QC files (and the compiled progs.dat) in order to work with the library.

It's a lot of work indeed. I will think of something and come back.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Postby leileilol » Fri Feb 20, 2009 4:00 am

Half-Life didn't need Twig.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Urre » Fri Feb 20, 2009 7:00 am

Depends on how you look at it
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Re: Well...

Postby Spike » Fri Feb 20, 2009 2:44 pm

Chip wrote:It would also require an updated set of QC files (and the compiled progs.dat) in order to work with the library.

I'm not entirely sure what you're getting at there when referring to needing a compiled progs.dat for a library of some kind. Also its not just a twig library.
An entity library that adds stuff like buzzsaws, pendulums, rotating doors, etc isn't so far fetched. For the most part it doesn't require many external interactions.
An entity library that adds monsters, however, generally needs to hook in to the existing code in order to give valid death messages, for instance.
Hooking the existing code isn't so far fetched, however - all functions are essentially just variables, and can be rerouted. But really its not worth it, best to supply the library's hooks in the form of a .patch of some kind really.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest