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.

Driftwood 2D Tile Engine / Gamedev Suite

Postby Seisatsu » Sat Oct 15, 2016 8:42 pm

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 Sun Sep 17, 2017 7:12 pm, edited 2 times in total.
Image
Seisatsu
 
Posts: 30
Joined: Mon Aug 17, 2009 10:40 am
Location: United States
Has thanked: 0 time
Been thanked: 0 time

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby hallsofvallhalla » Mon Oct 17, 2016 9:43 am

WOW congrats on the progress this looks awesome.
User avatar
hallsofvallhalla
Site Admin
 
Posts: 11940
Images: 13
Joined: Wed Apr 22, 2009 6:29 pm
Location: mobile, al
Has thanked: 11 times
Been thanked: 158 times
Blog: View Blog (3)

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Seisatsu » Tue Oct 18, 2016 2:35 pm

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
Seisatsu
 
Posts: 30
Joined: Mon Aug 17, 2009 10:40 am
Location: United States
Has thanked: 0 time
Been thanked: 0 time

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Jackolantern » Wed Oct 19, 2016 7:32 pm

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
User avatar
Jackolantern
 
Posts: 10889
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 22 times
Been thanked: 92 times
Blog: View Blog (1)

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Seisatsu » Wed Apr 12, 2017 2:55 am

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
Seisatsu
 
Posts: 30
Joined: Mon Aug 17, 2009 10:40 am
Location: United States
Has thanked: 0 time
Been thanked: 0 time

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby hallsofvallhalla » Wed Apr 12, 2017 9:43 am

Wow very awesome again! Thanks for sharing.
User avatar
hallsofvallhalla
Site Admin
 
Posts: 11940
Images: 13
Joined: Wed Apr 22, 2009 6:29 pm
Location: mobile, al
Has thanked: 11 times
Been thanked: 158 times
Blog: View Blog (3)

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Jackolantern » Mon Jun 19, 2017 7:56 pm

Sorry I missed this until now! Sounds like great progress is being made. Keep it up!
The indelible lord of tl;dr
User avatar
Jackolantern
 
Posts: 10889
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 22 times
Been thanked: 92 times
Blog: View Blog (1)

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Seisatsu » Sun Sep 17, 2017 7:06 pm

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
Seisatsu
 
Posts: 30
Joined: Mon Aug 17, 2009 10:40 am
Location: United States
Has thanked: 0 time
Been thanked: 0 time

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby hallsofvallhalla » Mon Sep 18, 2017 12:47 pm

Very awesome stuff!
User avatar
hallsofvallhalla
Site Admin
 
Posts: 11940
Images: 13
Joined: Wed Apr 22, 2009 6:29 pm
Location: mobile, al
Has thanked: 11 times
Been thanked: 158 times
Blog: View Blog (3)

Re: Driftwood 2D Tile Engine / Gamedev Suite

Postby Jackolantern » Mon Sep 18, 2017 7:34 pm

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
User avatar
Jackolantern
 
Posts: 10889
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 22 times
Been thanked: 92 times
Blog: View Blog (1)

Next

Return to Project Showoff Tier I

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x