1 registered members (AbrahamR),
717
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
List of things I need help with
#371049
05/17/11 16:33
05/17/11 16:33
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
Instead of me keep creating different topics which must annoy others including me! Ill just list what I need help with here.
1. Camera, I want the camera to follow my model but it doesnt do what I want properly, when the model turns so does the camera. I want the camera to always be behind the model and not turning out of view.
2. File path, I have too many files now and I would like to organize them I saw that "pragma_path" is what I need but I am not quite sure how to use this properly?
3. I want to create a main menu, just one that says start, options and exit. I looked on AUM like a member suggested but it listed a script and never gave a location for it.
4. Fullscreen, I have looked for this on search also but can't find any solution to make the game start in fullscreen mode.
Last edited by JakeBilbe; 05/17/11 16:44.
|
|
|
Re: List of things I need help with
[Re: JakeBilbe]
#371054
05/17/11 17:02
05/17/11 17:02
|
Joined: Nov 2010
Posts: 96 Vienna
Schubido
Junior Member
|
Junior Member
Joined: Nov 2010
Posts: 96
Vienna
|
Hi, (1) camera that follows player can be done this way :
assume variable player is the pointer to the player entity ...
... if you move the code in the players action you can replace "player" by "my"
#define CAM_DISTANCE 200 // distance to player
VECTOR v; // helper variable for vector
vec_set(camera.x,player.x); // camera on players position
vec_set(camera.pan,player.pan); // look same direction as player
vec_for_angle(v, camera.pan); // get the vector for the direction
vec_normalize(v,CAM_DISTANCE); // set lenght of vector to distance of camera to player
vec_sub(camera.x,v); // subtract vector from camera position (= move backwards)
(2) Have a look into the online manual section Precompiler->#define; PRAGMA_PATH is explained there. You can also use add_folder(). (necessary if you want to have a directory structure also in the published game) (3) Have a look here fore menues LBGUI (4) Full screen : video_screen = 1;
|
|
|
Re: List of things I need help with
[Re: Schubido]
#371080
05/17/11 20:16
05/17/11 20:16
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
Camera is finally sorted although it is a little high, as for the rest thank you ever so much .
Last edited by JakeBilbe; 05/17/11 20:21.
|
|
|
Re: List of things I need help with
[Re: JakeBilbe]
#371111
05/18/11 01:04
05/18/11 01:04
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
Schubido, your camera code is unnecessarily complex and difficult to accurately adjust. Here's a better alternative:
vec_set( camera.x, vector(-100,0,50) ); // change this number to move camera relative to player
vec_rotate( camera.x, player.pan );
vec_add( camera.x, player.x );
vec_set( camera.pan, player.pan );
Also Jake, you can change the video mode at any time during your game by using the video_switch() function.
Last edited by Redeemer; 05/18/11 01:40. Reason: Added one extra line of code to camera snippet
|
|
|
Re: List of things I need help with
[Re: Redeemer]
#371129
05/18/11 08:56
05/18/11 08:56
|
Joined: Apr 2009
Posts: 81
JakeBilbe
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2009
Posts: 81
|
I actually figured Schubido's code out lol, but I shall use that because I might need to change the angle or something later on so thanks. Also what would be a proper jump code? at the moment I am using:
if (key_space)
{
me.z +=16; //if space is pressed jump
ent_animate(me,"jump",jump_percentage,ANM_CYCLE);
//ent_playsound(me,woosh,100); //jumping plays woosh sound
}
if (me.z > 52)
{
c_move(me,vector(0,0,-4.7),nullvector,GLIDE); //if the player is above z.20 then glide down at 0.8 speed, enable collision
//ent_animate(me,"jump",jump_percentage,ANM_CYCLE);
}
also, how can I set video_switch() to (key_o)?
Last edited by JakeBilbe; 05/18/11 10:40.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|