Inside3D!
     

Big pack of questions
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Sat Jan 09, 2010 6:11 pm    Post subject: Big pack of questions Reply with quote

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^
Back to top
View user's profile Send private message Visit poster's website
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Sat Jan 09, 2010 7:51 pm    Post subject: Re: Big pack of questions Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Sun Jan 10, 2010 2:10 am    Post subject: Re: Big pack of questions Reply with quote

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

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


Maybe he mean a 3D background for the menu. So wen the game loads, theres a map loaded in background, showing a "idle" animation.
This is possible with engine changes.


Some games, like psychonauts, use a "3D menu", that is you can control the character, that using "doors" use features of the menu (load game, exit game, enter config).
This is possible with a "config" mod, since the current mods use commands, you can use a func_command that do the same thing that a menu would do, for most stuff (you can do that to config keys, and some specialized menus, only for the most simple things)


Quote:

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).


The way the BSP maps are compiled make so this feature can potentially cause problems as may move the camera inside a solid. A good camera code can avoid that, but the feature is not as simple as first look. imho.


Quote:

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

I don't know what you mean.


Maybe he mean put the text of the chat on the bottom on the screen. That is possible, but needs a engine change.
Back to top
View user's profile Send private message
c0burn



Joined: 05 Nov 2004
Posts: 158
Location: Liverpool, England

PostPosted: Sun Jan 10, 2010 2:49 am    Post subject: Re: Big pack of questions Reply with quote

Teiman wrote:

Quote:

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

I don't know what you mean.


Maybe he mean put the text of the chat on the bottom on the screen. That is possible, but needs a engine change.


DP already has this - con_chat* cvars Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Sun Jan 10, 2010 5:37 pm    Post subject: Reply with quote

Sorry if I am set questions in bad way, its all my english(

1. Yes, I mean 3d background for menu. Half life 2 use this feature, as I know.

15. Yes, I want to put text chat on the bottom on the screen, like in counter-strike.

2. Thank for reply, but can you explain more about quake 3 model system if you can? I try to attach upper body and legs, but I don't understand how can I do that. And another problem is rotating for legs. All animations in quake1 (for character) looks very poor, and I want to overcome this problem, but I dont understand how. If you move forward and to the left, you almost start to crying, because animation is very bad.

4. I just want to move screen very fast for example to left corner, and slowly move it back.

10. Here, I want to do like this :
From 1st person, Character become shooting, and weapon model become shooting too. When weapon model shooting, fire sprite must appear near gun barrel.

So, I am not understand, Darkplaces can support bone animation system and attaching in models?
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 969
Location: Florida, USA

PostPosted: Sun Jan 10, 2010 7:54 pm    Post subject: Reply with quote

the first one could easily be done technically we already have it... just record another demo file but have the player spawn as an observer....
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Sun Jan 10, 2010 10:13 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Chip



Joined: 21 Jan 2009
Posts: 314
Location: Romania

PostPosted: Sun Jan 10, 2010 11:16 pm    Post subject: Reply with quote

Quote:
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.


And what would that QC code that checks the map name? I'm sure it's simple as hell, but I can't figure it out. Maybe a complete code snippet might help me, as well as others.
_________________
My Projects: Quake 1 Mods | OpenQuartz 2 | ChipQuake
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 969
Location: Florida, USA

PostPosted: Mon Jan 11, 2010 12:12 am    Post subject: Reply with quote

Code:
if (world.model == "maps/e1m7.bsp")

ta'da?
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Chip



Joined: 21 Jan 2009
Posts: 314
Location: Romania

PostPosted: Mon Jan 11, 2010 12:14 am    Post subject: Reply with quote

ceriux wrote:
Code:
if (world.model == "maps/e1m7.bsp")

ta'da?


Smile I got that. What about turning player into an observer and making his key strokes bring up the menu?
_________________
My Projects: Quake 1 Mods | OpenQuartz 2 | ChipQuake
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 969
Location: Florida, USA

PostPosted: Mon Jan 11, 2010 12:16 am    Post subject: Reply with quote

im not sure about anything else but the turning a player into an observer.

read through this for observer type stuff,

http://forums.inside3d.com/viewtopic.php?t=1895

(maybe the key strokes are engine side and it will automatically do it like loading a normal menu up?)
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Chip



Joined: 21 Jan 2009
Posts: 314
Location: Romania

PostPosted: Mon Jan 11, 2010 12:19 am    Post subject: Reply with quote

Thanks, I'll dig into it and see what I can come up with.
_________________
My Projects: Quake 1 Mods | OpenQuartz 2 | ChipQuake
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 969
Location: Florida, USA

PostPosted: Mon Jan 11, 2010 1:22 am    Post subject: Reply with quote

ok, just message me if you need help. ill try my best with what ever you need.
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Mon Jan 11, 2010 11:36 am    Post subject: Reply with quote

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^
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 969
Location: Florida, USA

PostPosted: Tue Jan 12, 2010 4:57 am    Post subject: Reply with quote

i believe you just group the model in peices, then assign the parts to certain bones, dont quote me though i may be wrong.
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group