This is a pseudo 3d game written in C programming language, and running on the windows command line. Engine of this game uses RayCasting technology to draw lines on screen. It creates an illusion of a 3 dimensional game, but really it is only a 2d map.
It works stably on the Windows 10 command line. In earlier OS versions, updating the command line may be slow.
First of all you need to clone repository. The following command to do it:
git clone https://github.com/Nikita-bunikido/3D-FPS-game-command-line.git
You can do it like that:
cd 3D-FPS-game-command-line
mingw32-make
After that you have a solved .exe file:
./NSHOOT.exe
If you want to play online with your friend, you need to setup a multiplayer. Your computer and a friend's computer must necessarily be connected to the same local network to play online. Then on your computer in menu of the game you need to choose 's' - Server. And your friend need to choose 'c' - Client. Your friend need to know your IPv4 adress. If you don't know it, open the command line (Win + R), write cmd and paste the command:
ipconfig
Then write this adress on client and enjoy!
If you want to play offline write 'o' - Offline in the menu.
Basic management:
W | A | S | D | SPACE |
---|---|---|---|---|
go ahead | go left | go back | go right | shoot |
Mouse for camera rotation.
-
All walls textures now in folder
3D-FPS-game-command-line\RES\
You can change it, and after that it will change in the game. It can be avaiable by .txt files parser, integrated in this repository. -
Now you can generate a brightness chars in textures.
=======
= =
= ~ =
= ~1~ =
= ~ =
= ; =
=======
This is a texture. It will be the same in game.
4444444
4 4
4 ~ 4
4 ~1~ 4
4 ~ 4
4 ; 4
4444444
And this is a texture, but 4 and 1 will be visible like chars with brightness 4 and 1.
You can use these characters to make a brigthess chars: 1234
Added:
- Basic Ray-Casting algorithm
- Color depth
- Management
- Sky with stars
- Basic floor
Here is some demonstration of how does it work:
Ray-Casting algorithm:
Working depth of color:
Randomly generated stars:
Added:
- Textured walls
- Volumetric 3D floor
- Weapon layout
- More than one texture on map
- Bugs fixed
Here is some demonstration of how does it work:
5x5 textured walls:
Weapon overlay:
Working 3D floor:
Now you can play with your friends. In version 3.0 added a local network multiplayer.
Added:
- Local network multplayer
- More textures on walls
- Menu
- Reworked weapon
- Fixed bugs
Here is some demonstration of how does it work:
7x7 textures:
ASCII weapon. (Probel to shoot):
Multiplayer test:
Added:
- Ray-casting small optimization
- Kills count
- Fish-eye effect fixed
- Collision detection (beta)
- Fixed bugs
Here is some demonstration of how does it work:
Fixed fish eye effect (now walls are flat):
Also added a kills count (works with multiplayer):
Collision detection also working, but not perfect for now. We will rework it later.
Enjoy!