All Projects → dzavalishin → jdrive

dzavalishin / jdrive

Licence: GPL-2.0 license
OpenTTD port to Java

Programming Languages

java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
objective c
16641 projects - #2 most used programming language
Makefile
30231 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to jdrive

Gamedev Resources
🎮 🎲 A wonderful list of Game Development resources.
Stars: ✭ 2,054 (+8830.43%)
Mutual labels:  2d-game, game-dev
2D-Platformer-Hunter
A 2D Platformer Controller in Unity
Stars: ✭ 153 (+565.22%)
Mutual labels:  2d-game, game-dev
learn-dlang
Learn D programming language by creating games!
Stars: ✭ 42 (+82.61%)
Mutual labels:  2d-game, game-dev
O2
2D Game Engine with visual WYSIWYG editor
Stars: ✭ 121 (+426.09%)
Mutual labels:  2d-game, game-dev
goblins-game-gd
Turn based strategy game made with Godot Engine.
Stars: ✭ 68 (+195.65%)
Mutual labels:  2d-game
CryBits
CryBits is an open-source 2D ORPG game engine written in C#
Stars: ✭ 37 (+60.87%)
Mutual labels:  game-dev
Endless Sky
Space exploration, trading, and combat game.
Stars: ✭ 3,357 (+14495.65%)
Mutual labels:  2d-game
Egregoria
Contemplative society simulation
Stars: ✭ 219 (+852.17%)
Mutual labels:  2d-game
skulls
💀 💀 💀 s k u l l s 💀 💀 💀
Stars: ✭ 35 (+52.17%)
Mutual labels:  2d-game
LOL2D-ver1
League Of Legends in 2D - Web Game
Stars: ✭ 27 (+17.39%)
Mutual labels:  2d-game
einstein
Python Tutorial with popular machine learning algorithms implementation. This tutorial helps you processing data like Einstein
Stars: ✭ 34 (+47.83%)
Mutual labels:  game-dev
PixelDot
Godot plugin for making 2D sandbox games like Terraria and Starbound.
Stars: ✭ 57 (+147.83%)
Mutual labels:  2d-game
Squid
C# Realtime GUI System
Stars: ✭ 80 (+247.83%)
Mutual labels:  game-dev
tinycoffee
tiny coffee is a framework to develop simple 2d games with opengl 3
Stars: ✭ 61 (+165.22%)
Mutual labels:  game-dev
Zilon Roguelike
Survival roguelike game with huge world generation.
Stars: ✭ 18 (-21.74%)
Mutual labels:  game-dev
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+13904.35%)
Mutual labels:  2d-game
10-TwinStick-Original
A cross-platform, twin stick control game set in 2.5D as part of The Complete Unity C# Developer 2D (http://gdev.tv/cudgithub).
Stars: ✭ 34 (+47.83%)
Mutual labels:  game-dev
game overlay sdk
Library to write messages on top of game window
Stars: ✭ 57 (+147.83%)
Mutual labels:  game-dev
Text101-Original
A basic state-machine based text adventure exercise as part of our Complete Unity C# Developer course (http://gdev.tv/cudgithub)
Stars: ✭ 43 (+86.96%)
Mutual labels:  game-dev
HelenaFramework
Modern framework on C++20 for backend/frontend development.
Stars: ✭ 53 (+130.43%)
Mutual labels:  game-dev

NextTTD (JDrive)

This is an OpenTTD port to Java.

Java CI

Current state: The game is basically playable - aircrafts, trains, ships and road vehicles are working. But Save/load is not completely tested.

You're welcome to take part in testing and/or development!

News

  • AI is operational
  • Language packs support restored
  • Sounds/MIDI music are working

Screenshots:

27 Aug 2021

23 Aug 2021

What for

OpenTTD is beautiful. But it still carries on most of the original TTD architectural solutions. Bit banging, obscure data structures and crazy assembler style encoding of tile state.

It's time to move on.

My goals:

  • Reduce code complexity and obscurity. Core functions code must be twice shorter in terms of byte count.
  • No more bit fields and C/asm style polymorphism. Make code more OO and, where possible, functional.
  • Make game save automatic. No manual enumeration of fields to save.

As a result game code must be really easy to understand and modify.

Example:

Obscure and long:

FOR_ALL_INDUSTRIES(ind) {
	if (ind->xy != 0 && (cargo_type == ind->accepts_cargo[0] || cargo_type
			 == ind->accepts_cargo[1] || cargo_type == ind->accepts_cargo[2]) &&
			 ind->produced_cargo[0] != CT_INVALID &&
			 ind->produced_cargo[0] != cargo_type &&
			 (t = DistanceManhattan(ind->xy, xy)) < 2 * u) 
	{
		...
	}
}

Easy to understand and short:

Industry.forEach( ind ->
{			
	if (ind.isValid() && ind.acceptsCargo(cargo_type) 
			&& !ind.producesCargo(cargo_type)
			&& (t = Map.DistanceManhattan(ind.xy, xy)) < 2 * u[0]) 
	{
		...
	}
});

One more example. Code:

static bool AnyTownExists(void)
{
	const Town* t;

	FOR_ALL_TOWNS(t) {
		if (t->xy != 0) return true;
	}
	return false;
}

Becomes:

public static boolean anyTownExist()
{
	return stream().anyMatch( t -> t.isValid() );
}

Why Java

  • Portability for free. It just runs everywhere. Really.
  • Cleaner code. (Not yet, but I'm on my way:)
  • It is easier to build complex data structures in a language with GC.
  • Mature graphics, sound and midi subsystems
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].