Base QuakeC - progs 2.0
Moderator: InsideQC Admins
21 posts
• Page 2 of 2 • 1, 2
frag.machine wrote:Something I adopted in my current mod is to split all missile attacks in a separated .qc file and then all the weapons are just bounded to the corresponding fireSomeStuff() function. It's far from ideal because the functions don't have a fixed signature yet, but that helps a lot to reuse code.
Yes! That's what I want! Modularity! New weapons added as plugins, not as editing the existing ones or adding more functions to the weapons.qc file.
Let the base source code untouched and add new qc files which in turn be referenced in a src file.
What about having a monster template? With behaviour, damage, speed, and so on. Want a new monster? Take the template and add your own variables.
The same for weapons, func_ stuff, etc.
Sorry for this, but I'm working on an old site and I need to make it modular and reuse LOTS of PHP code.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
Chip wrote:What about having a monster template? With behaviour, damage, speed, and so on. Want a new monster? Take the template and add your own variables.
The same for weapons, func_ stuff, etc.
Smells like OO-QuakeC.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Chip wrote:frag.machine wrote:Something I adopted in my current mod is to split all missile attacks in a separated .qc file and then all the weapons are just bounded to the corresponding fireSomeStuff() function. It's far from ideal because the functions don't have a fixed signature yet, but that helps a lot to reuse code.
Yes! That's what I want! Modularity! New weapons added as plugins, not as editing the existing ones or adding more functions to the weapons.qc file.
Let the base source code untouched and add new qc files which in turn be referenced in a src file.
What about having a monster template? With behaviour, damage, speed, and so on. Want a new monster? Take the template and add your own variables.
The same for weapons, func_ stuff, etc.
Sorry for this, but I'm working on an old site and I need to make it modular and reuse LOTS of PHP code.
Templates are great too, especially for a stripped down version of QC. A monster template would be very helpful... maybe four types of monster templates would be good: One flying, one swimming, one jumping, and one walking. And something similar for weapons.
So, how far down do you strip the QC code? Error, suggested down to the necessities... what would the necessities be?
Good God! You shot my leg off!
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
Templating system
Junrall wrote:So, how far down do you strip the QC code? Error, suggested down to the necessities... what would the necessities be?
I'd say the bare necessities would be the core functions of the QC. Let's look at all the mods created for Quake. What has been modified? What hasn't been modified? What is the most modified feature?
We could start with the weapons and isolate all functions in a template. Then, the resulting QC file could be included somewhere. I'm thinking OO PHP here (as I'm a PHP programmer), but QC files are included in a .src file.
After the template has been stripped down (and rewritten while we're at it), it can be documented with functions, variables, constants. Also the dependencies would be written down and documented thoroughly.
It would be a helluva work, and all mods' source code should be browsed.
In an ideal world, we might end up with hundreds of ready-to-plug-in weapon templates (shotguns, RPGs, railguns, firethrowers, and so on).
Back to work now.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
I'm not familiar with OO or PHP... though, since I'm stuck at the airport for several hours I can do a quick search for OO and PHP to see where you are coming from.
'sigh' I'm losing my co-worker pretty soon... which means I'll be traveling a crap load! Aaarg! this is going to take from my Quake time! LOL
So, if I'm reading you right... a person would just snatch up all of the functions involved with the weapon code, drop that into a working template qc file (I'm assuming to ease the process of stripping it down and to separate it from the main code), then strip the template down to something simplified... with basic/generic weapons.
I do like the idea of separating the weapons in to their own qc files... would make it easier to find stuff!
Ok, well... I got get back to work myself... well, sitting here for one thing!
Back again:
Ok, desregard some of my floundering above...
you pretty much summed it up.
I'm sooo tired...
'sigh' I'm losing my co-worker pretty soon... which means I'll be traveling a crap load! Aaarg! this is going to take from my Quake time! LOL
So, if I'm reading you right... a person would just snatch up all of the functions involved with the weapon code, drop that into a working template qc file (I'm assuming to ease the process of stripping it down and to separate it from the main code), then strip the template down to something simplified... with basic/generic weapons.
I do like the idea of separating the weapons in to their own qc files... would make it easier to find stuff!
Ok, well... I got get back to work myself... well, sitting here for one thing!
Back again:
Chip wrote:After the template has been stripped down (and rewritten while we're at it), it can be documented with functions, variables, constants. Also the dependencies would be written down and documented thoroughly.
It would be a helluva work, and all mods' source code should be browsed.
In an ideal world, we might end up with hundreds of ready-to-plug-in weapon templates (shotguns, RPGs, railguns, firethrowers, and so on).
Ok, desregard some of my floundering above...
I'm sooo tired...
Good God! You shot my leg off!
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
Decided to try my hand at cleaning up weapons.qc
I'm not sure how useful what I have so far is...
Just trying to reduce redundancy a bit
http://dl.dropbox.com/u/1776436/weapons%20rewrite.qc
lemme know whatcha think
I'm not sure how useful what I have so far is...
Just trying to reduce redundancy a bit
http://dl.dropbox.com/u/1776436/weapons%20rewrite.qc
lemme know whatcha think
-

gnounc - Posts: 424
- Joined: Mon Apr 06, 2009 6:26 am
21 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest