Driftwood 2D Tile Engine / Gamedev Suite

Have a project in the works but not much media? How about an idea you are turning into a project? Maybe a game design document you want to start with. This is the place.
Post Reply
Seisatsu
Posts: 34
Joined: Mon Aug 17, 2009 3:40 pm

Driftwood 2D Tile Engine / Gamedev Suite

Post by Seisatsu »

Hello, and wow it's been a while. I almost forgot about this place.

Back in July of 2011 I made a thread about my C++ tile engine project, Tsunagari. That project ultimately ran into several fundemental design flaws and became an intertangled spaghetti mess. It was effectively abandoned in December of 2014.

From what I learned during my time coding Tsunagari, I began building Driftwood 2D, a new engine written in Python 3 and PySDL2 with the goal of doing what Tsunagari was meant to do. This new engine design has proven cleaner and more robust, and although my many breaks have delayed its development by several years, in terms of man-hours it has come further in much less time than Tsunagari.

Driftwood 2D is an engine which loads a world package made of images, sounds, maps, descriptive files, and scripts, and then passes itself to the scripts as an interface to its internal API. From there, the scripts in the world package interact with and contol the engine to perform its functions, resulting in a playable game. All public functions in the engine are accessible through the scripts. Maps are designed in Tiled and saved in JSON format, and the engine config file and entity descriptor files are also written in JSON.

The engine provides features for building 2D games, including infinite graphical and walkable layers, resource caching, a virtual filesystem for game data supporting patch files, animations, audio, scriptable entities and scriptable events, configurable input handling, timed callbacks, and all sorts of other goodies. Currently still missing in the latest version are UI/menu and text support, by-pixel rather than by-tile movement and collision for entities (though the movement between tiles is animated), graphical effects, combat, and inventory. Also, not all features have been extensively tested yet.

Currently the latest release is Alpha-0.0.2b, and there is no manual, though the code is extensively documented and the source includes a simple testing world. Driftwood 2D has been tested and confirmed working on Linux, Windows 7, and Windows 10.

GitHub: https://github.com/seisatsu/Driftwood

Requirements:
  • SDL2
  • SDL2_Image
  • SDL2_Mixer
  • Python >= 3.5.0 (previously 3.3.3)
  • Python jsonschema
  • Python PySDL2
Image

Image

Image

Image
Last edited by Seisatsu on Mon Sep 18, 2017 12:12 am, edited 2 times in total.
Image
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by hallsofvallhalla »

WOW congrats on the progress this looks awesome.
Seisatsu
Posts: 34
Joined: Mon Aug 17, 2009 3:40 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Seisatsu »

Newest pre-release Alpha-0.0.3 with patched version Alpha-0.0.3a adds JSON validations with jsonschema, virtual layer support, graphics improvements/tweaks, better path handling that works on Windows and in previously untested cases, other bugfixes, additional error reporting, and most importantly, lighting.

Next on the table is widgets, including UI elements and character dialogue boxes, which will also mean text support with SDL_TTF. At that point it'll be possible to cobble together a pretty good game with a lot of effort using scripts. Additions to the included standard library of useful script functions will make everything easier over the next few releases.

Image
Image
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Jackolantern »

Very nice! I remember Tsunagari! Very cool to see you have stuck with the idea of making an engine and it definitely appears you are succeeding!

Is getting it working on Kivy anywhere on your roadmap? I have no idea how the SDL wrapper plays into that as I am not too familiar with Python game development. But a simple-to-use 2D engine that can support mobile devices will always find a good audience!
The indelible lord of tl;dr
Seisatsu
Posts: 34
Joined: Mon Aug 17, 2009 3:40 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Seisatsu »

I'm back on it!

Image

Released yesterday, Alpha-0.0.4a adds the following features:
  • Replace ScaffyDB with a JSON/zlib based flatfile database.
  • Compile bytecode before packing pyz executable.
  • Manually unwind SDL resources on shutdown instead of using the unreliable __del__ method in most cases.
  • Timestamps count engine ticks instead of SDL ticks.
  • Move most rendering operations into the new FrameManager.
  • Text and container widgets.
  • Command line database editor utility.
  • Code cleanup.
  • Bugfixes and tweaks.
There's also a new game world for testing. I'm going to be working on finally writing the User's Manual for the next release.

You can get it here:
https://github.com/seisatsu/Driftwood/r ... pha-0.0.4a
Jackolantern wrote:Is getting it working on Kivy anywhere on your roadmap? I have no idea how the SDL wrapper plays into that as I am not too familiar with Python game development. But a simple-to-use 2D engine that can support mobile devices will always find a good audience!
Python on phones is a little tricky, but it should be theoretically possible to get this working without something like Kivy, just using SDL natives. I'm not looking at phone support until Beta though. We do however work out of the box on Raspberry Pi, though you might have to compile SDL yourself with the correct options depending on your distro.
Image
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by hallsofvallhalla »

Wow very awesome again! Thanks for sharing.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Jackolantern »

Sorry I missed this until now! Sounds like great progress is being made. Keep it up!
The indelible lord of tl;dr
Seisatsu
Posts: 34
Joined: Mon Aug 17, 2009 3:40 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Seisatsu »

Wow, it looks like I forgot to post the last few releases! Here's a summary of everything that came out since my last post.

Image

Alpha-0.0.5
The biggest change in this release is the addition of pixel mode entities. Rather than walking a tile at a time, this new class of entities can move pixel by pixel. Tile based and pixel based entities can collide and interact.

Previously, tile/spritesheet graphic IDs started at 0, and the animation member IDs started at 1. This was confusing, so now they both start at 1, with 0 meaning no graphic.

You can now hold shift (or your configured key) and use the movement keys to face a direction without walking.

You can now change the database root or disable halting on the command line.

This release also refactored and rewrote some of the entity code not related to pixel entities. Bugs were fixed in entity and input handling.

We have also included a binary package for Windows which should not require you to install any dependencies. It has been tested on Windows 10 and may not run on earlier versions.

Windows Binary Release: https://github.com/seisatsu/Driftwood/r ... .5-bin.zip

-----

Alpha-0.0.6
This is a feature packed release. Here are some of the bigger changes we made in this version.

The player can move diagonally in pixel movement mode.

You can open another database during runtime, allowing for things like save files.

The cache has more responsibilities now and cannot be disabled. We also cannot find a situation in which setting ttl to a low value would not solve any problem.

Add define() and undefine() functions to ScriptManager for defining custom triggers that give you some syntactical sugar in the map editor.

Pressing tilde (or your configured key) in-game while input.debug is true in the config file will interrupt the game with a pdb prompt in the console. You can execute event scripting code live here. When done, type "continue".

Fixed some code issues in the testing world.

Improved and fixed bugs in resource handling.

Finished first chapter of documentation.

Other bugfixes.

-----

Alpha-0.0.7
This is mostly a bugfix release, but also adds a few new features.

Cleaner/prettier way of calling scripts from each other.
New method for looking up tiles.
Entity graphics can now have multiple layers.
Remove selfpath configuration option.
Bugfixes

-----

Alpha-0.0.8

Features in this release:

Check all public method arguments for validity.
Add Python 3.5 type annotations. (Also increase minimum Python to 3.5.)
Remove ability to control ticks per second, preferring automatic calculation. Set Max FPS instead to limit TPS.
Custom global event handlers. You can define a function such that it can be referenced by a shortcut name within the map editor.
Support loading external Tiled tileset files.
Lots of refactoring and bugfixes.

-----

The last release was made at the end of May. I'm currently in hiatus again. All of the releases can be downloaded from the GitHub release page. At some point there will be a Windows binary made for the newest release; currently the most recent binary available is Alpha-0.0.5.

Releases: https://github.com/seisatsu/Driftwood/releases

A partial user's manual is also available. Currently only the first chapter is completed.

User's Manual: http://tileengine.org/User's_Manual.html
Image
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by hallsofvallhalla »

Very awesome stuff!
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Driftwood 2D Tile Engine / Gamedev Suite

Post by Jackolantern »

Very nice again!

And one question: Are you building this with a planned game in mind you are wanting to make with it? Or is the end goal of your project the engine itself?
The indelible lord of tl;dr
Post Reply

Return to “Project Showoff Tier I”