This demo features a 2D level editor and a 2D platformer game designed for testing and playing levels
created within the editor. The goal of this project was to develop a simple yet powerful tool for level
creation and to ensure that the levels could be tested seamlessly within a playable environment.
Key Features of the Editor
- Add and remove sprites: The editor allows you to add and remove 2D sprites to
populate the game levels. Sprites are the core visual components of the game world, and this feature
gives you the flexibility to design environments with various elements such as characters, objects,
or obstacles.
- Add and remove game entities: Beyond sprites, you can also add or remove game
entities that represent interactive or dynamic objects within the game world, such as characters,
platforms, or triggers. This allows for the creation of a full-fledged game environment.
- Add and remove lights: Lighting plays a crucial role in setting the atmosphere and
enhancing the visual appeal of a game. The editor allows you to place lights in your levels,
adjusting their color, intensity, and range to create dynamic lighting effects.
- Custom JSON parser: The custom JSON parser lets you save and load game levels in a
structured and efficient format. This system makes it easy to store the data for the levels,
including all entities, sprites, lights, and properties, so they can be reloaded and modified later.
It also simplifies sharing and reusing level data across projects.
Key Features of the Game
- DirectX 11 for the Windows version: The game uses DirectX 11 for optimal graphics
performance and support for advanced rendering techniques on Windows platforms. This allows the game
to run smoothly with modern hardware and takes advantage of DirectX features such as
hardware-accelerated rendering and improved visual effects.
- OpenGL for the macOS version: For macOS users, the game utilizes OpenGL for
rendering, ensuring cross-platform compatibility while maintaining high performance. OpenGL provides
a robust graphics API, ensuring the game runs well on Apple devices.
- Custom collision detection: The game includes a custom collision detection system
that handles interactions between basic shapes such as circles, boxes, and capsules. This allows for
accurate detection of collisions between the player and the environment, ensuring smooth gameplay.
- Custom resolution detection: After detecting a collision, the game applies custom
resolution techniques to prevent objects from overlapping. This system ensures that objects respond
realistically when colliding with each other, whether they bounce off, slide, or stop based on the
situation.
- Sprite animations: The game supports sprite animations, allowing characters and
objects to move and interact in visually dynamic ways. This feature makes the game world feel more
alive by enabling movement and transitions, such as walking, jumping, or attacking animations.
- Level loader: The level loader allows the game to load levels that were created in
the editor. This feature ensures that the editor and game are seamlessly integrated, and it lets you
test and play any level you create directly in the game environment.
This project helped me improve my skills in game development, including collision detection and
resolution. I learned how to create a functional editor and integrate it with a game engine, gaining a
deeper understanding of how these components work together.