All Projects → FauxKiwi → Pumpkin-Engine

FauxKiwi / Pumpkin-Engine

Licence: Apache-2.0 License
A powerful and capable 2d game engine in Kotlin

Programming Languages

kotlin
9241 projects
GLSL
2045 projects

Projects that are alternatives of or similar to Pumpkin-Engine

rpgwizard
2D RPG Game creator
Stars: ✭ 37 (+3600%)
Mutual labels:  engine, game-engine-development, game-engine-2d
GroundEngine
Ground Engine is an easy to use Game Engine for 3D Game Development written in C++
Stars: ✭ 61 (+6000%)
Mutual labels:  2d-game-engine, 2d-graphics, game-engine-development
tnt
A 2d Game Engine written in C++20.
Stars: ✭ 30 (+2900%)
Mutual labels:  engine, imgui, 2d-game-engine
OverEngine
Tiny little game engine
Stars: ✭ 175 (+17400%)
Mutual labels:  imgui, game-editor, game-engine-2d
GLGame
A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.
Stars: ✭ 49 (+4800%)
Mutual labels:  imgui, 2d-game-engine, 2d-graphics
Spartanengine
Game engine with an emphasis on architectual quality and performance
Stars: ✭ 869 (+86800%)
Mutual labels:  engine, imgui
Novelrt
A cross-platform 2D game engine accompanied by a strong toolset for visual novels.
Stars: ✭ 81 (+8000%)
Mutual labels:  engine, 2d-game-engine
Freeaoe
A free game engine capable of running Age of Empires 2 and Star Wars: Galactic Battlegrounds
Stars: ✭ 105 (+10400%)
Mutual labels:  engine, 2d-game-engine
Gamedev Resources
🎮 🎲 A wonderful list of Game Development resources.
Stars: ✭ 2,054 (+205300%)
Mutual labels:  engine, 2d-game-engine
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (+18000%)
Mutual labels:  engine, imgui
Octopuskit
2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS
Stars: ✭ 246 (+24500%)
Mutual labels:  engine, 2d-game-engine
Coffee
An opinionated 2D game engine for Rust
Stars: ✭ 771 (+77000%)
Mutual labels:  engine, 2d-game-engine
Justweengine
An easy open source Android Native Game FrameWork.
Stars: ✭ 762 (+76100%)
Mutual labels:  engine, 2d-game-engine
Enduro2d
Yet another 2d game engine of dreams (work in progress)
Stars: ✭ 82 (+8100%)
Mutual labels:  engine, 2d-game-engine
Obengine
2D Game Engine with Lua Scripting made on top of SFML !
Stars: ✭ 335 (+33400%)
Mutual labels:  engine, 2d-game-engine
Dot-World-Maker
Online web role playing game (RPG) engine let you build your own game directly from your browser.
Stars: ✭ 25 (+2400%)
Mutual labels:  engine, 2d-game-engine
meta2d
Meta2D is open source WebGL 2D game engine for making cross platform games.
Stars: ✭ 33 (+3200%)
Mutual labels:  engine, game-engine-2d
RendererEngine
2D - 3D Renderer Engine builds with OpenGL, SDL2, C++
Stars: ✭ 17 (+1600%)
Mutual labels:  engine, 2d-game-engine
Nero-Game-Engine
Advanced SFML Game Engine, Designed to be Simple and Intuitive
Stars: ✭ 50 (+4900%)
Mutual labels:  engine, 2d-game-engine
Fractal Engine
WIP 3D game engine with editor and other stuff
Stars: ✭ 152 (+15100%)
Mutual labels:  engine, imgui

Pumpkin Engine

language version website license discord

This is the Pumpkin Game Engine. A powerful and capable Kotlin 2D game engine using LWJGL and therefore your GPU. If you like the project, please consider to give it a star and support it. Also, your help with contributing is always welcome.
Current version: 1.2-dev


Screenshots

The editor with a new scene

Empty scene

Scene serialization: Saving and loading scenes

File Dialog

2D and 3D scenes with an ECS and an editor camera

Pink Cube

Transform gizmos

Gizmos

Themes for editor

Light Theme


Roadmap

Long term goals

  • Fully featured 2D and 3D game engine
  • Blazing fast 2D renderer
  • Beautiful 3D renderer with PBR
  • Audio engine
  • Level editor
  • Scripting in various languages
  • Recorded and skeletal animation
  • Multiplatform support
  • Multiplayer and networking
  • Vulkan support
  • Builds and serialization

Short term goals

  • Multiplatform library
  • Building
  • Textures
  • Asset library
  • Scripting
  • 3D

Get it!

You can use a dependency management system although at the moment it's safer to clone the project.

Use it!

Before you start writing your first game, take a look at the Sandbox.kt test.
Since this is currently only using Kotlin JVM, you can also use Java.

Creating an application and main() function

To create an application, create a class that extends com.pumpkin.core.Application.
In your main() function, simply call

Application.set(/*Your class name*/())

to start the game.

Methods of Application

  • init(): Called once on initialization
  • shutdown(): Called once on finalisation
  • run(): Called every frame. Currently, you have to clear the screen in here

Layers

This engine is using layers that are stacked on top of each other.
For your game, create a layer by extending com.pumpkin.core.layer.Layer.
A layer contains five event functions:

  • onAttach(): Called when the layer is attached
  • onDetach(): Called when the layer is detached
  • onUpdate(ts: Timestep): Called every frame. ts is the time since the last frame
  • onImGuiRender(): Called in the ImGui thread. Use it to display ImGui UIs
  • onEvent(event: Event): Called on every event

To attach a layer, simply call Application#pushLayer in your application.

Events

Events are one of the core functions of this engine. You can dispatch events in the onEvent functions of Application and layer.
To dispatch the events, call

val dispatcher = EventDispatcher(event)
dispatcher.dispatch</*Event type you want to dispatch*/> {
  //Do something
}

Of course, you can also use method references for this.

Rendering

Rendering is probably the most important thing in a game engine. So here is how it works:
Currently you have to clear the screen manually. Do this in Application#run:

RendererCommand.setClearColor(/*Clear color*/) // Technically, you only have to do this once
RendererCommand.clear()

To render something on your screen, do the following in Layer#onUpdate:

Renderer2D.beginScene(/*Camera*/)
// Render code
Renderer2D.endScene()

For a camera, you can simply create a camera in your Application using an OrthographicCamera, or you can use the OrthographicCameraController class. To actually render something now, call in your render code:

Renderer2D.drawQuad(/*...*/)

With this method, you can draw quads with a given position, scale and optionally a rotation (radians). You can use textures or colors or a tinted texture.

Full documentation

Please refer to the wiki for a full documentation of all features this engine has to offer


Contributing

Of course, you're welcome to contribute to the engine.


Credits: kotlin-graphics for ImGui; TheCherno for inspiration

Remember this work is licensed under Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].