WebGL Counter-strike 1.6

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.

11 Likes

allllright, this is cool!

first thoughts are though that the mouse does not handle well, its like there is an acceleration to it or something.

Second is that everything feels weightless if that makes sense.

Umm really fun that you got this prototype working, a little refinement and it could be quite cool.

Is the ability for player vs player an option yet?

2 Likes

Thanks @Pryme8 for taking a look.
I am not sure what I did wrong about the mouse movement. It could be that I modified the mouse sensitivity on the free camera?
I think the “weightless” feeling comes from the bad sync between animation speed and displacement.
I am working on a completely new version with a different environment and multiplayer support.

Keep posting updates!

Also maybe toss up a little dev blog about it.

1 Like

Can’t agree more!

Awesome work!!

This is really cool!

Your project is great, I also love CS 1.6, I think you should learn more from here http://localwar.xidayun.com/
I hope you will successfully develop cs 1.6 on babylonjs and share the source code for us to learn together

2 Likes