Click here to Skip to main content
14,209,828 members
Rate this:
Please Sign up or sign in to vote.
See more:
Could you guy help me for a second? I have a problem with my game programming. I planned to make a game by Unity to help student enjoy their study. It will be a multiplayer FPS game, players will shoot each other, if someone is shot, there is an question appears in the screen and the one who was shot, has to answer the question. In case the player choose the wrong answer, they will lose a chance to continue the battle. I want to insert question packs for the player so when they got shot, the question will be exported randomly to the screen (but not repeat the questions which were exported) but i have no idea how to write the code, btw i'm using C#. I wonder if anyone could help me with this? Thank you for taking the time reading, and sorry about my poor English.

What I have tried:

this is the first time i try something like writing code for my own game, so i'm really confused, i have browsed in the Internet but it didn't help.
Posted
Updated 12-Jun-19 1:41am
Comments
F-ES Sitecore 12-Jun-19 6:38am
   
You want us to tell you how to code a multi-player FPS game? In a "Quick Answers" forum? You're talking hundreds of thousands of lines of code spanning numerous disciplines. Unity comes with sample projects for a lot of major game types, including 3D games, so I'd start with that sample project. The tutorial for the project takes you through making amends to the project to get you familiar. Unity coding has a massive learning curve, it is not trivial and not for the inexperienced.
kaity by 2 days ago
   
thanks a lot! i'm a bit too hasty, i should start with simple ones first.
Rate this:
Please Sign up or sign in to vote.

Solution 1

That is a huge project. You'll have to do/write...

  • Graphics design. In 3D, even. Start at the Unity manual[^] for this. I don't know how fancy you'd like your game to be, but there's a lot of Graphics material to go through.
  • The game client code. Again the Unity manual can be your starting point. Though you'll also have to write the networking code to communicate with the game server. Look at the TcpListener or Socket and related C# classes in the documentation.
  • The game server code. After all it's multiplayer. You need a central application that handles all data that comes from the clients and sends the relevant game data to the relevant clients.
Again, that is huge. This is going to be a lot of work. Most popular video games are therefore written by a whole team of people. Especially if you don't have a lot of experience with it, you'll first need to learn about everything related to Unity, graphics, and the networking code. For that you'll need to start with smaller, much simpler, projects/games first, before you can take on something big like this.
   
Comments
kaity by 2 days ago
   
many thanks for your advice !
AlexGambler 3hrs 10mins ago
   
superb tips, thanks
Rate this:
Please Sign up or sign in to vote.

Solution 2

I have to agree with what Thomas has said - this is a massive project, and probably not something that will be "doable" within a reasonable timeframe by a single person.

However, you may be able to get a start by going here: FPS Sample - A multiplayer shooter game project | Unity[^]
But even with that huge starter, you have a lot of learning (and work!) ahead of you!
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Unity is a good choice, but if you want something more simple take a look at: free-and-easy-game-engines-for-beginners[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190617.3 | Last Updated 12 Jun 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100