[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Big pack of questions

Big pack of questions

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Big pack of questions

Postby Freemanoid » Sat Jan 09, 2010 6:11 pm

Hello everyone! I would like to ask about many things.
My engine is darkplaces.
1.Is it possible to put on background in menu bsp map? How?
2.How to overcome a problem with animation of characters, for example, when the standard character runs and shoots, its animation represents its at a stop while it moves.It looks very much unreal. Whether it is necessary to divide for this purpose a body and legs?
3.Whether probably to use the weapon with a binding to bones of the character, not to draw 10 times of the same character with the different weapon.
4.Is it possible to move screen to the left or to the right when the character raises for example, a knife.
5.How to make so that when the weapon got out, an animation began for this weapon like got out.
6. Is it possible to make more realistic sky? How?
7. Is it possible to attach sagdoll to items (like weapons, ammo and other) and ragdoll to characters. How?
8. Is it possible to make 3rd person view when somebody killing you? Something like in Left 4 dead. How?
9. How can I put better textures in map in darkplaces?
10. Is it possible to use sprites for weapon shooting. How?
11. Is it possible to make game rounds? How?
12. Whether it is possible to learn to go the character on walls and a ceiling? (like Alien)
13. How can I attach sprites to walls (like bulletholes)
14. Is it possible to make 2d radar? How?
15. Is it possible to move standart quake chat down? How?
16. How can I use idle animation for weapons?
17. Is it possible to make characters body visible from 1st person? For example, if you move camera down, you can see your body and legs.
18. How can I make special color transparent?

I will be glad if you answer at least pair questions. Thanks!
^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Re: Big pack of questions

Postby Wazat » Sat Jan 09, 2010 7:51 pm

1.Is it possible to put on background in menu bsp map? How?

I'm not sure what you're asking. Can you explain?

2.How to overcome a problem with animation of characters, for example, when the standard character runs and shoots, its animation represents its at a stop while it moves.It looks very much unreal. Whether it is necessary to divide for this purpose a body and legs?

If you want the upper body (i.e. the part that operates weapons) and lower body (the part that handles movement) to act independently, then yes they probably need to be separate models. That's how most games handle it.

Alternately you could try coding some kind of feature (kinomatics?) into the engine that lets you have different parts of the same model animate separately, and the engine tries its best to interpolate the sections between so it looks natural. That is unfortunately a challenging feature to do well, and you would probably want more advanced models than .mdl (I think Q3 has skeletons etc, but they solve this issue simply by dividing up the model).

3.Whether probably to use the weapon with a binding to bones of the character, not to draw 10 times of the same character with the different weapon.

Ah, visual weapons. Yes, you have the option of making 10 separate models to show 10 different weapons (the way the player model has axe frames and ranged weapon frames).

Or you can instead make only one player model in a format with tagging (i.e. Q3 format and others), and attach the weapon model to the hand attach point. This is by far the best option, imo. You should be able to make the attached weapon invisible to the player it's attached to, so that you can show a different weapon model on his screen so it looks good to him too.

4.Is it possible to move screen to the left or to the right when the character raises for example, a knife.

Well, there's punchangle, but that's more for knocking the player's screen around on impact. Can you explain more of what you mean by moving the screen? Do you mean rotate it, or shift it to the side?

There are some camera operations you can do like offsetting the view (modify view_ofs, or create a separate camera).

5.How to make so that when the weapon got out, an animation began for this weapon like got out.

Erm, I'm guessing that what you mean here is animation frames for the weapon coming into view (pulling it out of the backpack or off the belt, for example). You can also do animation frames for the weapon going out of view before the next weapon comes in. Yes, you can do this. I've done it with a few of my mods, including Conquest.

You can do this a couple of ways:
1) Animate the weapon model with the frames for pulling out and putting away. Then change the player's .weaponframe as though he were attacking, but use it to play the weapon in/out frames instead. Keep the player from attacking during this time by using .attack_time (or whatever that variable is).
2) Use the DP extension that lets you do a view model for client. Spawn an entity that will be the player's weapon (that he sees on his screen). Use this instead of .weaponmodel. Its position and angle are relative to the player, so all you need to do is move the weapon down to make it go off the player's screen, then change it to the new weapon model and move it up again. You can do more tricky stuff like changing angles etc too if that looks better.

6. Is it possible to make more realistic sky? How?

Look into Skyboxes. They're much more realistic than Quake's skies.

7. Is it possible to attach sagdoll to items (like weapons, ammo and other) and ragdoll to characters. How?

I don't remember where the thread is, but search the forums for sagdoll. Someone (Urre?) made a very impressive QC-only physics system that included sagdoll etc.

8. Is it possible to make 3rd person view when somebody killing you? Something like in Left 4 dead. How?

Yes, you can do 3rd person view using either the engine (stuffcmd the console command to the player), or by creating a QC-based chase camera.

9. How can I put better textures in map in darkplaces?

I believe you include .tga files with the better quality replacement textures in the textures folder... I forget though. Check darkplaces' dpextensions.qc and/or documentation. You should find instructions there.

10. Is it possible to use sprites for weapon shooting. How?

Sprites are used all the time in Quake. I used adquedit to make mine, but I think there are much more sophisticated programs to make them now. You basically treat the sprite as though it were a model, and you can change its frames to animate it (if it has frames). The flame puff for explosions and bubbles from drowning players are examples of Quake sprites. You can also do much higher-quality versions with new engine features from Darkplaces.

11. Is it possible to make game rounds? How?

I'll let someone else answer that. I know it's possible and probably fairly easy, but someone else should have better experience than I do.

12. Whether it is possible to learn to go the character on walls and a ceiling? (like Alien)

Oh, walking on walls and the ceiling? Yes, but it's tricky. Quake makes movement easy as long as you are moving along the floor, but if you want to move across other surfaces you have to do all the physics yourself. You can do it, however, and you can change camera angles to match the walls.

Basically you'll need to change the player's movetype (to fly) or gravity (to 0.00001), and then use tracelines to figure out where walls are and keep the player against them as he tries to move around.

13. How can I attach sprites to walls (like bulletholes)

Spawn an entity at the impact point of the bullet. Change that entity's model to the sprite. Set the sprite's angle to the trace_plane_normal (after doing a traceline against the wall). The sprite will also need to have a flag set that tells it to be oriented (I forget which one).

14. Is it possible to make 2d radar? How?

Yes. There are several options. One is to use .viewmodelforclient to make a bunch of models that stay in the same relative position on the player's screen. Spawn a bunch of bubble sprites (or some other sprite) to represent things the radar detects, and move them around as necessary. Also spawn another sprite or model for the body of the radar itself, if you want.

Another option is to use the engine features that put graphics directly on the player's 2D screen. I believe Darkplaces supports this, but I don't know the feature very well. Someone should be able to help you with it.

15. Is it possible to move standart quake chat down? How?

I don't know what you mean.

16. How can I use idle animation for weapons?

Basically, in the player's pre think (client.qc), or his stand, run, pain etc animations, call a function that cycles through the frames of the weapon's idle animations. While the player's walk & run animations are changing the player's .frame, this function they call changes his .weaponframe.

17. Is it possible to make characters body visible from 1st person? For example, if you move camera down, you can see your body and legs.

Yes. You'll need to spawn an entity, set its nodrawtoclient to the player, make it follow the player's origin & velocity (i.e. movetype_follow), and have it mimic the player's frames etc. I forget if movetype_follow is done client-side, but if not you'll need some other way to make it follow the player client-side so lag doesn't cause problems. You may even want to cut off the head of the model you use and make other changes to the model so the player won't get visual artifacts from seeing from within his own head.

18. How can I make special color transparent?

Well, in sprites there's a specific color that is always transparent. It's an ugly color, hard to miss. In models there isn't such a thing. However, by experience I've found that when a model becomes transparent enough with .alpha, black actually becomes the most transparent and looks like it's not there. This has allowed me to create some fairly cool effects with partially transparent objects.

I hope my answers help you!
-Wazat
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Re: Big pack of questions

Postby Teiman » Sun Jan 10, 2010 2:10 am

Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Re: Big pack of questions

Postby c0burn » Sun Jan 10, 2010 2:49 am

c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Postby Freemanoid » Sun Jan 10, 2010 5:37 pm

^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Postby ceriux » Sun Jan 10, 2010 7:54 pm

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Wazat » Sun Jan 10, 2010 10:13 pm

Ah, so item #1 is a 3d background with things happening as the player navigates the menu, as seen in Half-Life 2, Left4Dead, Borderlands, and Warcraft 3, among other modern games. Darkplaces can definitely do this, and Lord Havoc once talked about how he wanted people to, but I don't think anyone has taken the opportunity yet.

Basically, instead of starting demos, your autoexec.cfg (or whatever startup cfg file starts up the demos) should load up a map named menu. The command would be "map menu".

Create your menu.bsp map, with whatever monsters, civilians etc you want. Then add QC code to the player's spawn function that checks the map name. If it's menu.bsp, then turn the player into an observer that cannot move etc. Any button presses from him will bring up the menu and he can start up a game from there.


#4: Moving the screen rapidly to one side and then slowly bringing it back is the job of .punchangle. For example, self.punchangle_x = -2 makes the player's view kick back when he shoots a weapon. If you did a larger punch angle and on yaw instead of pitch, that may give you what you want: self.punchangle_y = 25; It will slowly return to normal on its own, so you just have to change .punchangle once.

Try that out and see if that's what you want. If it doesn't work for you, we can think of something else.

#10: Darkplaces can give you several options. You could just make the flame a part of the model, as is done with the shotgun. This however wouldn't be a sprite and might not look the way you want it to.

A second option is to use a model format with tags, then spawn your muzzleflash sprite and attach it to the tag at the tip of the gun. This has the advantage of making the sprite follow the gun as it moves.

A third option is to guess (through trial and error) at the position for the sprite and spawn it there manually. Then you can either leave it at that, or you can make it follow the player with movetype_follow (it will follow the player as he moves & turns, but will not follow the gun if the gun's animations make it move around).

I'll leave the other questions to other people who know.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Wazat
 
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Postby Chip » Sun Jan 10, 2010 11:16 pm





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 ceriux » Mon Jan 11, 2010 12:12 am

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Chip » Mon Jan 11, 2010 12:14 am





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 ceriux » Mon Jan 11, 2010 12:16 am

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Chip » Mon Jan 11, 2010 12:19 am





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 ceriux » Mon Jan 11, 2010 1:22 am

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Freemanoid » Mon Jan 11, 2010 11:36 am

Thanks for all of your reply's, but what about quake3 model tagging, how can I attach upper body and legs? I dont understand properly how it works. Can someone help me, or post a link where I can read about this?
^O,..,o^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Postby ceriux » Tue Jan 12, 2010 4:57 am

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest