Hello Friends,
I have been using babylonjs for a while now (mainly trying to learn game dev). Needless to say, it is one of the greatest frameworks i have ever used, with the active community, supportive maintainers and regular updates.
I have learned a lot form the forums and different resources, so I thought I owe something to the community. It might not be much, but it toke me a long time to get it going.
It has some of the basics of an FPS game, hopefully someone will find parts of it useful. These are mainly:
- Ray casting
- Collision detection
- Animations
- HUD
- Basic AI and Path finding (A*) with some kind of obstacle avoidance
- A basic trick for a better performance for the path finding algorithms
- Attaching meshes to bones
- Pickups
- Headshots (yeah)
- Objects cashing
- Mobile support (joystick camera)
- Difficulty level simulation
- Babylon files of the models extracted from CS 1.6
- Some minor modification to babylonjs script to add nozzle flash and a custom loading screen
- Full screen
- Point lock
- Player Health
- Dynamic wall generation
- Jump and crouch
- Device Detection
- Respawn
- Continues enemy generation
- Sounds
- Shader material
- Asset manager
- In-game menu
The project uses 3.x version of babylonjs. I tried porting to 4.0 but got some issues animating the player.
All models were extracted from CS 1.6 and fixed using blender. I own nothing of them.
Source code can be found here: GitHub - akhawatrahTW/cs1.6.
To try it: https://cs16.herokuapp.com/
Hopefully this will be helpful to someone.