Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jun 14, 2009 16:34:02 GMT -5
Will clean Quake make the engine easier to program for programmers or newbies aswell? Like are there plans for a front-end for designing new weapons, items and units? Like for example if I modeled a new weapon that required both rocket and cell ammunition, will it be easy (or easier) for me to add it to the game?
- Mike
|
|
|
Post by peeweerota on Jun 14, 2009 17:48:20 GMT -5
From some of the talks with Paril, ease of adding weapons is an intended feature. From looking at the code, yes that is absolutely the case.
Every weapon has it's own cpp file where it's own functions are defined. However the ability to use both ammo types is a bigger change than it sounds. First of all in order to subtract both ammo types, you'd either need a slight redesign of weapon_generic or a simple way to subtract that ammo at the end of that weapon's p_weapon functionality.
Second you would need to rewrite some noammoweaponswitching and weapon_change functionality so that the game checks for both ammo types before switching weapon.
Lastly you need to decide how you want to display that information to the user in the new hud code. This is insanely improved in clean code, but still a consideration. I personally would blink the different ammo types in a similar fashion to the way it blinks between armor and power armor.
|
|
|
Post by Paril on Jun 15, 2009 14:26:31 GMT -5
You nailed the description.
The weapons in CleanCode are designed to work exactly like the original system; there are no "alternate" ammo types at this point, or multiple ammotypes. It is possible, but would require a re-write of the system; you'd be better off making a new ammotype.
WeaponGeneric does not handle the ammo, each weapon calls a function that you can override with a new class (virtual function).
One of CleanCode's design ideas is to be easy for new programmers to get in to. At it's current stage, there is lots of unused and broken code; it may seem complicated right now. One main point of CleanCode is that we use C++ and take advantage of object orientation, so you will need to have basic C++ experience before you jump into this.
However, frontend isn't the word you're looking for for these. We call them systems. CleanCode is a collection of a bunch of systems that come together to work as a game; CleanWeapons, CleanBar, CleanMenu, CleanCTF, CleanItems.
-Paril
|
|
Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jun 17, 2009 22:25:53 GMT -5
Oh well, I guess my new weapon will just have to be solar powered Would the same problem exist for hurting the player as an ammo type? Another question: How about using clean code with other mods? Like Airquake2 or maps that include dlls?
|
|
|
Post by Paril on Jun 27, 2009 16:43:54 GMT -5
CleanCode will include a frontend build that you can shove into the release/ directory. It can run some very basic systems (ie, our hashing indexing system and clean printing functions), but it will not gain any other features from CleanCode such as object orientation. This build will not only allow you to run a mod as a frontend, but allow you to run a frontend to a mod as a frontend such as GameCam.
You'd have to explain what "hurting the player" would mean. For picking up ammo it's pretty simplistic, but if you wanted something like trapped ammo ala Vortex, you would create a mock item entity (even inherit the CItemEntity class and overload the "touch" function) that would not be picked up, but rather do damage/explode and then free the entity right after. This would let you easily use any existing item class with this, as you could just allocate a new CTrappedItem for example and pass the CItemEntity over the copy constructor.
-Paril
|
|
Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jun 29, 2009 4:05:39 GMT -5
By hurting the player I mean using your health as an ammo type. Like the weapon does 20 damage but hurts you for 10. Not splash damage, it just injures you when you use it.
|
|
spirit
Quake 2 Mapping Club
maps.rcmd.org
Posts: 509
|
Post by spirit on Jun 29, 2009 11:12:32 GMT -5
If I ever came across such a weapon I'd hurt the designer.
|
|
|
Post by Paril on Jul 3, 2009 0:30:04 GMT -5
Oh that's entirely possible, just set no ammo-type and lower the health in the ::Fire function. And by lower the health I mean Player->TakeDamage -Paril
|
|
|
Post by James on Jul 5, 2009 11:44:13 GMT -5
By hurting the player I mean using your health as an ammo type. Like the weapon does 20 damage but hurts you for 10. Not splash damage, it just injures you when you use it. I would never use this gun, not for a second.
|
|
Mikemc
Quake 2 Mapping Club
Reminiscing this & that & having such a good time
Posts: 344
|
Post by Mikemc on Jul 21, 2009 2:59:18 GMT -5
|
|
|
Post by Paril on Jul 22, 2009 17:01:36 GMT -5
Not yet, James and I are going to be purchasing a domain for ourselves sooner or later, it'll be there once we have a site/portal/blog/forum.
Anything with health can be pushed, theoretically.
-P
|
|