Page 5 of 7

Re: Untitled RPG Project

Posted: Sun Dec 18, 2016 7:00 pm
by Error
I'm going to work on ways to make it more visually pleasing if I go with the mouse driven looking system. If no mouse looking then I have to redo the inventory system for keyboard only.

FrikaC showed me once how to get a forward and reverse speed for player, but have no idea how it works. It involved dot products and that's way too advanced for me. Anyone know?

Re: Untitled RPG Project

Posted: Mon Dec 19, 2016 2:38 am
by frag.machine
Since you're using Darkplaces (but IIRC it's supported on FTE too) you can resort to the .movement vector. Just read it and you know if you're going forward or backward or strafing and at what speed.

Re: Untitled RPG Project

Posted: Mon Dec 19, 2016 6:08 am
by Spike

Code: Select all

vang = self.angles;
vang_x *= -1; //stupid quake bug
makevectors(vang);
float forwardspeed = self.velocity * v_forward; //dotproduct = vec*vec
float sidespeed = self.velocity * v_right;
float upspeed = self.velocity * v_up;
//positive means its in the same direction, negative means its the opposite (eg v_backward). the magnitude is the length of the vector in that 'axis' - if both vectors are unit vectors the result is guarenteed to be between -1 and 1.

//for completeness, to understand the values, this is the reverse of the dotproducts above (float*vector are NOT dotproducts).
vector selfvelocity = forwardspeed*v_forward + sidespeed *v_right + upspeed*v_up;
this is basically 3*3 matrix transforms. one transform is the transpose of the other, and transposes of a matrix is the inverse of that matrix when the matrix is a standard 3-axis perpendicular matrix like you get from makevectors.
throw in an add+subtract for an origin along with a second call to makevectors and you have a nice way to rotate something around a point.

or you can just use .movement, which tells you the player's intents (effectively those *speed floats before the velocity was even calculated, the raw value sent across the net scaled by cl_forwardspeed etc, but not sv_maxspeed).

Re: Untitled RPG Project

Posted: Mon Dec 19, 2016 10:48 am
by toneddu2000
Note for Spike:

Code: Select all

vang = self.angles;
vang_x *= -1; //stupid quake bug
Does affect FTE too? Or in FTE it has been fixed?

Re: Untitled RPG Project

Posted: Mon Dec 19, 2016 2:32 pm
by Spike
<offtopic responseto=toneddu2000>
makevectors, view angles, bsps, and (oriented) sprites use 'standard' pitch.
vectoangles, and mdls use inverted pitch (other mesh formats like iqm or md3 also use this style of pitch in order to allow drop-in replacements).

so ent.angles = player.v_angle; is bad
as is foo.v_angle = vectoangles(self.velocity);
door.angles = vectoangles(door.velocity); is also bad
makevectors(door.angles); is fine on a door
but makevectors(monster.angles); is probably wrong. I say probably, because more often than not the pitch is 0 and noone will notice that the bug even exists.

the bug is unfixable because 1) fixing it would break lots of mods that depend upon it being wrong. 2) the pitch's sign is context-sensitive and in situations where the context isn't easily inferable (like serverside), and its much simpler to just assume and add a *-1 than lots of logic to work around it.
advanced engines have gained a load of assumptions around it that would need to be rewritten in order to finally 'fix' it, but noone can be bothered doing so because that would just break stuff anyway so there's not really any motivation to fix it.

so no, its not fixed in FTE, nor DP, nor any engine that can still play quake which I'm aware of.
Quake2 fixed it, if that helps.
</offtopic>

Re: Untitled RPG Project

Posted: Mon Dec 19, 2016 2:39 pm
by toneddu2000
<offtopic>
Thanks man! :biggrin:
</offtopic>

Re: Untitled RPG Project

Posted: Tue Dec 20, 2016 4:52 pm
by Error
Model request. I need a similar thing but in model form. Doesn't have to be the exact same. Just a reference.

Image

Re: Untitled RPG Project

Posted: Tue Dec 20, 2016 10:08 pm
by toneddu2000
I don't understand. Do you need a 3d low poly heart model like this or a 2d silhuoette of that image you posted, only extruded a little (to make it visible from every angle)?
Because, in the first case, it could be tricky, for an artist not involved in your project, to create a model that fits your style. In the second case, just give 20 minutes! :lol:

Re: Untitled RPG Project

Posted: Wed Dec 21, 2016 2:10 am
by Error
I would take a simple low poly heart, or a 2d heart that looks like the pics there just extruded a bit. Either way... I'm open to artistic interpretation.

Re: Untitled RPG Project

Posted: Wed Dec 21, 2016 10:59 am
by toneddu2000
Hearts 2d but 3d (already unwrapped with that texture you posted. Texture not included because models use UVs following your texture. Load that texture and hearts will be textured correctly)
Image
Image
Hearts 3d but..3d! Different shapes and polycount (no textures or material but unwrapped)
Image

Download Link
Released under CC0 License, as always (read: do whatever you want with these)

Cheers

Re: Untitled RPG Project

Posted: Wed Dec 21, 2016 5:27 pm
by Error
PERFECT! Love both options. I have a use for both.

Problem. I can't convert .blend to .mdl. Could you export to .obj or even .mdl?

Re: Untitled RPG Project

Posted: Wed Dec 21, 2016 8:34 pm
by frag.machine
Error wrote:PERFECT! Love both options. I have a use for both.

Problem. I can't convert .blend to .mdl. Could you export to .obj or even .mdl?
Or .md3... Darkplaces can handle it as a regular .mdl
EDIT: Oh wait... can't you use Noesis to convert it ?

Re: Untitled RPG Project

Posted: Thu Dec 22, 2016 12:43 am
by Error
I tried Noesis and didn't see an option for .blend. Is there a plugin I need?

Re: Untitled RPG Project

Posted: Thu Dec 22, 2016 7:25 am
by toneddu2000
Jeez, just download Blender
Every model stands on a different layer (as described in note on the right of the .blend file), to open level 1 press 1 key, to open level 2 press 2, and so on
select the model you want to export, open file (file -> open), then export to obj (file -> export -> Wavefront obj) ...
But no animations whatsoever in this way..
What program did you use to make models? Now I'm curious :biggrin:

Re: Untitled RPG Project

Posted: Thu Dec 22, 2016 7:30 am
by Error
Was trying to avoid it as long as possible, but I'm getting Blender now.