Code Monkey home page Code Monkey logo

ksicardoom's Introduction

KSICARDOOM - GameDev like it's the 90's

KSICARDOOM is an advanced ray-casting game written from scratch in C, with an engine that supports :

  • Multiple sectors with different floor and ceiling heights.
  • Wall, floor and ceiling textures.
  • Fixed, animated, 360° sprites.
  • 3D camera movements, jumping and crouching.
  • Projectiles, collectibles, and events.
  • Loadable map files.
  • Simple multiplayer using UNIX sockets.
  • Background and event triggered sounds.
  • Modular design, and ready interface for implementing bots.

The Game :

Projectiles have animations when destroyed, and make sound.

Stairs, Elevators and floors which are impossible in traditional ray-casting are implemented in this engine.

Normal World Rules don't apply to the engine's world

The Map Editor :

The map editor is using a GUI library build from scratch, on top of SDL2, that supports :

  • Buttons
  • Check-boxes
  • Sliders
  • Tabs
  • Lists
  • Canvas

The editor can either create a new map, or edit an existing one, the map format is a special KSICARDOOM file, containing assets, map layout and sprite positions.

Can add, and edit, walls, portals and sprites.

Can change height of floor and ceiling in addition to brightness for each sector.

Ray-casting Explained :

Following lots of requests from students at 1337 school, I have published a video on YouTube (In Moroccan Darija) titled "Raycasting Engine, as fast as possible (with code)", and provided some P5.js sketches you can play with, to better understand how all components work, (Camera, DDA, Drawing, Textures).

Here is the link to the sketches :

Special Thanks :

  • Thanks to all my peers at 1337 Coding School, who appreciated my work and encouraged me to add new features.
  • Special thanks to !SilentCorner and the computer graphics guys, for being competitive in their creativity, and my friend ksikso (couscous) for suggesting the name.
  • Deep thanks to msidqi, MBarkErras and ilkou for their contributions to the project, and always being there to discuss new ideas, even with their limited free-time.

ksicardoom's People

Contributors

ilkou avatar kerneloverseer avatar mbarkerras avatar msidqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ksicardoom's Issues

Editor crashes with a segmentation fault when a new portal is added

The editor crashes when a new portal is added, because no default target sector is assigned to the portal, so it crashes when trying to render it.
How to solve:

  • Editor side fix : Add default value to portal everytime
  • Renderer side fix : Check when the portal takes to a null sector before trying to render

Sprite rendering misalignment

while rendering a sprite in the game, the first ray to hit the sprite always stays without drawing, so it leaves a gap where you can see the background, happens every time, and more visible when resolution_ratio is set to higher values.
Possible causes:

  • sprite wall not being generated in the first iteration of finding a sprite.
  • sprite texture is not taken from the animation struct in the first iteration due to missing values.
  • the x value is incremented before drawing a sprite

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.