Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Getting Started: First Person Shooter


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Axium Cog   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 May 2012 - 02:45 PM

Ive been combing the forums and havnt found much generic help on the subject, mostly just highly specific topics, so here I am.

I am beginning a Multiplayer First Person Shooter in C#.

If anyone could give an outline of what the major parts of such an engine are, what aspects of functionality are handled by which part, and if possible a skeleton of such an engine would be greatly appreciated.

Please keep replies as verbose as possible, post such as "just use XNA" are not inherently helpful. Please describe how to leverage XNA. This post will likely help others in the future.
Thank you in advance for your help.

Edited by Axium Cog, 27 May 2012 - 03:01 PM.


Sponsor:

#2 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 27 May 2012 - 03:04 PM

You could check out Unity? As far as an engine really goes it doesn't matter. Do you have any prior programming experience? You haven't said so it's difficult to really say what you should do. If you're a beginner that changes the options really till you get up to speed with C#.

#3 Axium Cog   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 May 2012 - 03:24 PM

I am a computer science major, and very familiar with C#. The idea here is to create an engine from scratch. Im just not sure where to begin. I have XNA and OpenTK which are great to keep from reinventing the boilerplate but as far as how to structure an engine has proven a bit enigmatic.
Thanks for your help so far.

#4 Inuyashakagome16   Members   -  Reputation: 835

Like
1Likes
Like

Posted 27 May 2012 - 03:44 PM

I suggest you check out Game Engine from Scratch...Why?
Really good topic for the subject you're talking about. Personally, from what I've read from that topic and many others it's really a "Do you really wanna remake the wheel?" type of topic. As a beginner if you've never played around with graphics I would suggest sticking with a tutorial with a basic game engine like SFML. Also, this tutorial C++ and SFML
It is about C++ but it's a good guide for anyone who's interested in game development. Plenty of articles popped up when I searched for C# and SFML on google so you could try that out. I've recently started using that tutorial and playing around with SFML myself and it's very easy to get use to syntax wise.


EDIT: Also, check this out. http://www.amazon.com/Introduction-Engine-Design-Using-DirectX/dp/1590590813/ref=sr_1_6?ie=UTF8&qid=1338155105&sr=8-6 < Legit book at C# and game engine development. The reviews aren't too great but it's something.

Edited by Inuyashakagome16, 27 May 2012 - 03:46 PM.


#5 BCullis   Crossbones+   -  Reputation: 1813

Like
1Likes
Like

Posted 27 May 2012 - 03:54 PM

Ive been combing the forums and havnt found much generic help on the subject, mostly just highly specific topics, so here I am.

That's because it's mostly an issue of highly specific topics. You can break the major systems down into a few categories, which may or may not be spun off into their own threads (programming threads, not forum threads). You say you have OpenTK? Look at the way that framework is broken down: that's about as good a high-level view as you can get in a succint answer. Usually you'll have sub-components handling:
Graphics(shaders, cameras, animation (which can overlap with physics...) )
Physics
Input
Networking
AI
Content/resource management (level loading, scenegraphs, segment-culling or segment-pausing, etc)
...I'm sure I'm forgetting something...

And one game loop to rule them all. The XNA base game class actually sets up a decent game loop for you: initialization, followed by a loop of update->render. Update is where you do everything but graphics processing, basically.

So what would you like more specific information on?

Edited by BCullis, 27 May 2012 - 04:12 PM.

Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#6 Axium Cog   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 May 2012 - 04:11 PM

Graphics(shaders, cameras, animation (which can overlap with physic...) )
Physics
Input
Networking
AI
Content/resource management (level loading, scenegraphs, segment-culling or segment-pausing, etc)


This is more along the lines of what im looking for, thank you.

So what would you like more specific information on?


As far as multiplayer games are concerned, i know some of these functions are offloaded from the client and placed on the server. I know its a balancing act of just how much do you place on the server, but any guidelines would be helpful.

This is what i know so far:
Client Side- User Input, Graphics, Physics, Resource management, and of course some aspects of networking.

Server side is a little more enigmatic, aside from managing connections, what does the server handle? I imagine AI, keeping track of locations, and informing clients of what they can see?

Thank you both for your help thus far.

#7 BCullis   Crossbones+   -  Reputation: 1813

Like
1Likes
Like

Posted 27 May 2012 - 04:30 PM

A good server/client setup doesn't trust the client as far as it can throw them. Clients should send input and render visuals/audio. Server should be authoritative for everything else. The server tells the client enough to keep the player informed as to what they should be trying to do next (i.e. "there are players in your field of view, and an enemy over there shooting at you"). The second you let the client say "player is at this location now" with no sanity checks, you're opening up to location and teleportation hacks, among other problems (inventory hacks, speed cheats, invulnerability cheats, and so on).

Basically, the client should tell the server "player clicked on this object while at its current location", and the server will be able to determine "that's standing in front of a control lever, so now they've opened the bay doors, which I will update the game state with and notify all my clients and AI/physics routines".
Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#8 Axium Cog   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 May 2012 - 04:43 PM

A good server/client setup doesn't trust the client as far as it can throw them. Clients should send input and render visuals/audio. Server should be authoritative for everything else.

I see the value in this but doesnt that put alot of load on the server?

Basically, the client should tell the server "player clicked on this object while at its current location", and the server will be able to determine "that's standing in front of a control lever, so now they've opened the bay doors, which I will update the game state with and notify all my clients and AI/physics routines".


So 3d mesh collisions are handled server side? I can understand not being able to trust the client with saying what direction it was facing cause then you end up with CS snap shooting shenannigans, but this seems a little odd to be completely server side. Could you elaborate on the physics portion of this?

As a side note once i get a firm understanding of all of this i plan to post a conceptual template of where each piece of behavior takes place and the general structure/routine of these engines.

#9 BCullis   Crossbones+   -  Reputation: 1813

Like
1Likes
Like

Posted 27 May 2012 - 05:15 PM

I see the value in this but doesnt that put alot of load on the server?

When you remove the graphics processing, the load is less than you might think, but yes, servers are supposed to handle appreciable amounts of data processing.

So 3d mesh collisions are handled server side? I can understand not being able to trust the client with saying what direction it was facing cause then you end up with CS snap shooting shenannigans, but this seems a little odd to be completely server side. Could you elaborate on the physics portion of this?


Broad-phase collision detection (the first part of a 2-stage broad and narrow phase system) reduces the number of calculated collisions to those with a high chance of occurring in this time frame. This can be made further efficient by only calculating physics near any player presence, or using a cheaper collision model (like simpler forms vs high-poly collision meshes). Expensive collision hulls are only used on high-performance systems, or in games like fighters where there are only a handful of ptentially colliding meshes in the entire scene.

Also, physics calculations can be done much less frequently (like on the order of 6-10 times per second, as a guess number) and still produce fully acceptable reactions as they can do interpolated time steps internally. This reduces processing requirements a lot compared to the 60 fps people want for believable graphics rendering.

As a side note once i get a firm understanding of all of this i plan to post a conceptual template of where each piece of behavior takes place and the general structure/routine of these engines.

I'm willing to bet it already exists somewhere. If it helps your learning process, go for it, but otherwise I'd save yourself some time and just make your game Posted Image

Edited by BCullis, 27 May 2012 - 05:17 PM.

Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#10 Axium Cog   Members   -  Reputation: 110

Like
0Likes
Like

Posted 27 May 2012 - 05:57 PM

Thank you sir i believe i have enough to get started. You have been very helpful.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS