| Example: Basics of FPS | |
|
|
Author | Message |
---|
Phantom107 Admin
Posts : 206 Join date : 2008-01-03 Location : The Netherlands
| Subject: Example: Basics of FPS Fri Jan 04, 2008 2:49 pm | |
| Basics Of FPSI've created an example about the basics of FPS. Features: - First Person Camera
- HUD Display
- Looking Around With The Mouse
- Moving Around
- Shooting Instant Bullets
- Generating Terrain To A Model
- Particles
Download Version 1download it here (0.01 MB)Basics of FPS 2This is the version 2 update to "Basics of FPS". It includes requested features. - Included the rotating HUD map
- Included 3d gravity (with jumping!)
- Importing a 3d model into GM
- Included a gun model which rotates along with the camera. I know the model is bad and has no texture, but it's just to show how the rotating is done
Download Version 2download it here (0.01 MB)
Last edited by on Sat Jan 12, 2008 2:50 am; edited 7 times in total | |
|
| |
stewrat Loyal Poster
Posts : 78 Join date : 2008-01-04
| Subject: Re: Example: Basics of FPS Sat Jan 05, 2008 5:18 am | |
| Great Great Great! Could you insert the 3d men into this and make it so you can shoot them? Make yours run a little slower though! Or you could use my WW2 man. I never got a clear look at your 3d man, but it looked better than mine. | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sat Jan 05, 2008 3:56 pm | |
| stewrat, you could just put your own men in. Just take your draw codes, and then make a person called "Enemy" in the example, then put all the creation codes, and then just program the paths and movment and stuff | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sat Jan 05, 2008 3:58 pm | |
| too bad I cant look at any of these games right now, since my other computer that I have pro on isnt turning on rightnow... | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sat Jan 05, 2008 7:30 pm | |
| looks real nice now that I played it. Also, stewrat mentioned you made some 3d men? What topic is that under? | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sun Jan 06, 2008 2:32 am | |
| there should be a gun and a hud map | |
|
| |
Phantom107 Admin
Posts : 206 Join date : 2008-01-03 Location : The Netherlands
| Subject: Re: Example: Basics of FPS Sat Jan 12, 2008 2:48 am | |
| Updated to version 2. Includes the requested features! | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sun Jan 13, 2008 4:15 pm | |
| For some reason I cant get the model Gun1 to work. I put it in the same folder as the game, and its still named Gun1... But it isnt showing up... | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sun Jan 13, 2008 4:17 pm | |
| hm wierd nvm now It did show up... | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Thu Jan 17, 2008 12:22 am | |
| //draw the block d3d_draw_block(x-64,y-64,1 ,x+64,y-64,128,background_get_texture(bac_Crate),1,1)
This doesnt work in this example, whats wrong with it? | |
|
| |
slayer64 Heavy Poster
Posts : 143 Join date : 2008-01-05
| Subject: Re: Example: Basics of FPS Thu Jan 17, 2008 2:38 am | |
| - Code:
-
//draw the block d3d_draw_block(x-64,y-64,1 ,x+64,y-64,128,background_get_texture(bac_Crate),1,1) the 2 y's have a -64 on them, making them the same might make the block disappear. if your making a wall try using - Code:
-
d3d_draw_wall(x,y,z,x+128,y,128,tex,1,1); and bac_crate might need to be spelled back_crate. | |
|
| |
Phantom107 Admin
Posts : 206 Join date : 2008-01-03 Location : The Netherlands
| Subject: Re: Example: Basics of FPS Thu Jan 17, 2008 10:55 am | |
| Remember you can use d3d_draw.. functions for testing things out, but make sure everything in the real game needs to be a model. | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Fri Jan 18, 2008 3:59 pm | |
| slayer those suggestions didnt work, and Im drawing a box, not a wall. The wierd thing is that this codes always worked before | |
|
| |
slayer64 Heavy Poster
Posts : 143 Join date : 2008-01-05
| Subject: Re: Example: Basics of FPS Fri Jan 18, 2008 5:40 pm | |
| - Code:
-
d3d_draw_block(x-64,y-64,1 ,x+64,y+64,128,background_get_texture(back_crate),1,1) well i put this in room maker and it makes a 64x64 box, is your texture transparent? idk what to tell you this code works. did u turn on hidden surface removal? d3d_set_hidden(0); if that is off then things look strange. maybe u are drawing a health bar on the screen, and u have to set an orthographic projection. so make sure the depth of that object is -1000 or something. is the depth of the object that sets the projection 1000 it should be so things look 3d and not 2d. | |
|
| |
Phantom107 Admin
Posts : 206 Join date : 2008-01-03 Location : The Netherlands
| Subject: Re: Example: Basics of FPS Fri Jan 18, 2008 7:43 pm | |
| Not really.
It all depends on the drawing order, actually. I can prove it, since in my engine every single instance is depth 0. You just need to make sure you draw the camera first, than everything 3d, than the orthographic view.
You can do this in a very complicated way, which will lead to really interesting drawing and speed techniques, but you might as well set good depth. You just need to make sure the camera has the lowest depth of all instances (I would use 8192), and have an instance specifically for the hud have a depth greater than all instances (I would use -8192). | |
|
| |
slayer64 Heavy Poster
Posts : 143 Join date : 2008-01-05
| Subject: Re: Example: Basics of FPS Sat Jan 19, 2008 1:55 am | |
| yea, yea, phantom your right as always. | |
|
| |
Guilty Sparks Heavy Poster
Posts : 154 Join date : 2008-01-05 Location : USA East Coast
| Subject: Re: Example: Basics of FPS Sun Jan 20, 2008 4:50 pm | |
| hm now it did draw them but thier at randomized hieghts, and they move around with the character. I have no clue why this isnt working, It allways has before... | |
|
| |
Phantom107 Admin
Posts : 206 Join date : 2008-01-03 Location : The Netherlands
| Subject: Re: Example: Basics of FPS Sun Jan 20, 2008 4:52 pm | |
| | |
|
| |
Sponsored content
| Subject: Re: Example: Basics of FPS | |
| |
|
| |
| Example: Basics of FPS | |
|