Phantom107 Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Phantom107 Forum

Phantom107's Forum. Discuss about games, GML, 3d, game design here. Enjoy your stay ;)
 
HomeSearchLatest imagesRegisterLog in

 

 Example: Basics of FPS

Go down 
4 posters
AuthorMessage
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Example: Basics of FPS Empty
PostSubject: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeFri Jan 04, 2008 2:49 pm

Basics Of FPS
I'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 1
download it here (0.01 MB)

Basics of FPS 2
This 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 2
download it here (0.01 MB)


Last edited by on Sat Jan 12, 2008 2:50 am; edited 7 times in total
Back to top Go down
https://phantom107.actieforum.com
stewrat
Loyal Poster
stewrat


Posts : 78
Join date : 2008-01-04

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat 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.
Back to top Go down
http://www.yogamerclub.piczo.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat 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
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat 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... Sad
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat Jan 05, 2008 7:30 pm

looks real nice now that I played it. Very Happy Also, stewrat mentioned you made some 3d men? What topic is that under?
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSun Jan 06, 2008 2:32 am

there should be a gun and a hud map
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat Jan 12, 2008 2:48 am

Updated to version 2. Includes the requested features! Smile
Back to top Go down
https://phantom107.actieforum.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSun 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... Question
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSun Jan 13, 2008 4:17 pm

hm wierd nvm now It did show up...
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeThu 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?
Back to top Go down
slayer64
Heavy Poster
slayer64


Posts : 143
Join date : 2008-01-05

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeThu 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.
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeThu 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.
Back to top Go down
https://phantom107.actieforum.com
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeFri 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
Back to top Go down
slayer64
Heavy Poster
slayer64


Posts : 143
Join date : 2008-01-05

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeFri 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.
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeFri 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).
Back to top Go down
https://phantom107.actieforum.com
slayer64
Heavy Poster
slayer64


Posts : 143
Join date : 2008-01-05

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSat Jan 19, 2008 1:55 am

yea, yea, phantom your right as always.
Back to top Go down
Guilty Sparks
Heavy Poster
Guilty Sparks


Posts : 154
Join date : 2008-01-05
Location : USA East Coast

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSun 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...
Back to top Go down
Phantom107
Admin
Phantom107


Posts : 206
Join date : 2008-01-03
Location : The Netherlands

Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitimeSun Jan 20, 2008 4:52 pm

Upload the editable?
Back to top Go down
https://phantom107.actieforum.com
Sponsored content





Example: Basics of FPS Empty
PostSubject: Re: Example: Basics of FPS   Example: Basics of FPS Icon_minitime

Back to top Go down
 
Example: Basics of FPS
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Phantom107 Forum :: Tutorials & Examples-
Jump to: