Giter VIP home page Giter VIP logo

hxdoom's Introduction

HxDoom readme

What is HxDoom?

Haxe Doom is a Haxe library adaption of id Software's Doom, or more specifically, "id Tech 1". This is an attempt to create a standardized Doom library that can be used by anyone to create any sort of Doom program that they may need.

https://kevansevans.github.io/HxDoom/api/

Read the wiki on how to use HxDoom: https://github.com/kevansevans/HxDoom/wiki

Principles of HxDoom

Do it the Haxe way: All Haxe targets must be supported and avoid any platform specific code. Yes, that includes Flash and PHP.

Dependency injection where possible: Developers shouldn't have to fork a library to make small changes or to add support for custom formats.

Modding at the source level: Developers should have the ability to create custom content at the source code level.

K.I.S.S.: Keep it simple, stupid.

Licensing

HxDoom is MIT. You may use it for commercial purposes without the need to open source it, but I humbly request that you do if you plan on distributing your programs for free.

HxDoom uses a blackbox approach for development. For anything that can not be easily found online through a wiki, through programs like Slade, hex editors, map editors, through general word of mouth, or however, HxDoom will borrow code from the 3D0 release of Doom found here: https://github.com/Olde-Skuul/doom3do

Doom as an IP belongs to id Software, Zenimax, and Microsoft. The use of the name here is in name only and may not be used for commercial purposes without explicit permission or are otherwise known or assumed to be free to distribute. HxDoom shall not be used to distribute commercial products that the developer does not own the right to.

Contributing

Here's some things you can do to help this project out:

  • Join DIYIDTECH and help us develop a blackbox Doom engine! https://discord.gg/a8n4Y2z
  • Test deployment on currently unverified Haxe targets. (Simply transpiling won't do, show us that the code works as intended!)
  • Further refine and test active working targets!
////////////////////////////////////////////////////////////////////////////////////////////////////
//Confirmed targets HxDoom has been compiled to and ran on (Please help with this list!)
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//Haxe code by kevansevans
////////////////////////////////////////////////////////////////////////////////////////////////////
//
//                         ...,,,,,,,,..                     
//                  ./&&%(/**,,,,,,,,,**/%&*               
//              .//,,,,,,,,,,,,,,,,,,,,,,,,/&&/            
//           ./&/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*&&,         
//         .#%*,*#/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#&,       
//        ,@#,,(*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/&(      
//      .%@*,/#,,,,,,,,,,,,,,,,*((/,,,,,,,,,,,,,,,,,,,##     
//     .&&/,*/,,,,,,,,,,,,,/#/,,,,,,,,,,,,,,,,,,,,,,,,,#&.   
//     %##,*%,,,,,,,,,,,,#(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%#   
//    ,%(/,#*,,,,,,,,,*#(,,,,,,,,,,,,,,,,,,,*/#%#%,,,,,,*&.  
//    (/#*,#,,,,,,,,,*%,,,,,,,,,,,,,,*/#%#*.    (*,,,,,,,((  
//    &*%**(,,,,,,,,/#,,,,,,,,,,*(&%(%.       /#,,,,,,,,,*%. 
//    &/%**(,,,,,,,/#,,,,,,,*/&%/%(  ,*     ,#/(#,,,,,,,,,&. 
//    ((##*%*******%*******#&&/*(@&**#,    *. (#,,,,,,,,,,&, 
//    .%/&/%/******%*****(&*.%**(@&*/&      *&/,,,,,,,,,,,&. 
//     /%/&/%******%****(#.  ,#****#(     /%**(*,,,,,,,,,*%. 
//      .%(&/%/****%/**/&(/    /%%/      .,#%*%*,,,,,,,,,#*  
//        ,%####***/%**#/   ....      /%/*****%*,,,,,,,,/&.  
//          .(%%/*/%*#*         .(#*.%/*****%,,,,,,,,*&*   
//              #%&@@%#%%#/*/%...#*    *%****(/,,,,,,,*&,    
//             /#*****/(%***#*...#,    (%***/%,,,,,,,(&.     
//          .%%*,,,,*#%&%%%,......*.,&/**/(,,,,,,/%,       
//       (&(((((##(/%%,,,,*%,....../##&/*(#*,,,,*&(.         
//         /%(/***/&/,,,,,,/(......*(#/,,,*(&(,            
//             .,(&,,,,,,,,*%    .*/(*,.                 
//              (#,,,,,**,,,/*    ..,#(#&&&/                 
//             *(,,,,*&/*,,,,%.  #*,,,,***&/                 
//           .#(,,,*%#(%******%(.%*******(&.                 
//           %/,,,/@(//##*******##*******&%#   
////////////////////////////////////////////////////////////////////////////////////////////////////

hxdoom's People

Contributors

kevansevans avatar pxshadow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hxdoom's Issues

Some feedback

Hi, I saw this repo via twitter. Very cool you managed to create Doom in Haxe ๐Ÿ’ฏ Hope you dont mind but wanted to give some random feedback. now I haven't tried to compile the project but just looking at the code I noticed these things.

  1. Instead of doing
	public static var WADDATA(get, null):WadCore;

//...

	static function get_WADDATA():WadCore 
	{
		return WADDATA;
	}

You can also do:

	public static var WADDATA(default, null):WadCore;

f you do want to use these kind of getters, I would advice to remove the public (to avoid using that getter directly) and add inline there, to avoid having the function call, so:

	public function get_xpos():Float 
	{
		return xpos;
	}

becomes:

	inline function get_xpos():Float 
	{
		return xpos;
	}

Instead of doing:

public static inline var 

you can do:

public static inline final

Instead of doing: (I saw this in Patch.hx)

	public static var CONSTRUCTOR:(Array<Any>) -> Patch = Patch.new;
	
	public var width:Int;
	public var height:Int;
	public var offset_x:Int;
	public var offset_y:Int;
	public var pixels:Vector<Vector<Int>>;
	public function new(_args:Array<Any>) 

You can just use

	public static var CONSTRUCTOR:(Array<Int>) -> Patch = Patch.new;
	
	public var width:Int;
	public var height:Int;
	public var offset_x:Int;
	public var offset_y:Int;
	public var pixels:Vector<Vector<Int>>;
	public function new(_args:Array<Int>) 
  • There is no need I guess to use Any here, I would avoid this where possible.
  • I don't really see a reason why you need CONSTRUCTOR instead of just using Patch.new directly, or why not even just use new Patch(), so you could also remove the CONSTRUCTOR altogether and maybe even drop that array and use something like this
// ...
class Patch extends LumpBase
{
	public var width:Int;
	public var height:Int;
	public var offset_x:Int;
	public var offset_y:Int;
	public var pixels:Vector<Vector<Int>>;
	public function new(width,height,offset_x, offset_y) {
		super();
		this.width =  width;
		this.height =  height;
		this.offset_x = offset_x;
		this.offset_y = offset_y;
	}
// ...

And at call side:

var patch = new Patch(16, 16, 16, 16);

Hope it helps in some way ๐Ÿš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.