Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - d3x0r

Pages: 1 [2] 3 4 5
16
General Discussion / Re: Voxelarium.js
« on: May 27, 2016, 10:43:11 am »
Updated....

Dug a little and found TI-99/4a Font; nice 8x8 bitmap font from my first computer :)

Have meshing working; no culling; and can output strings in voxel clusters :)

17
General Discussion / Voxelarium.js
« on: May 24, 2016, 05:09:12 am »
I got tired of the C# port already :)  (never did finish actually implementing the game portion of it... just water)

Started a new javascript/three.js version...

https://d3x0r.org:444/javascript/Voxelarium.2

click and drag; 's' enables moving scaling, it's not very good... faster than scroll wheel though

it's actually broken into separate files on the source side; fed through 'browserify' to make it simple to load on the web page.... but you can save the page and have all the sources; soon to make a github branch for it

(the mode buttons don't do anything any more; I also did a test ... https://d3x0r.org:444/javascript/test3d )

(although it's more inspired by, and plajurizing a couple algorithms like sectorSphere :)

18
General Discussion / Re: Congratulations?
« on: April 22, 2016, 12:21:47 am »
http://keeperrl.com/

Also on Steam, also GPL.... (well v2; did v3 add something about not charging money? )

19
General Discussion / Re: Dynamic fonts
« on: December 16, 2015, 02:35:12 am »
Dynamic fonts....
   well only a certain subset of characters is required for most games; if a translation to something like russian or an asian language happens, then none of the latin characters are required... and rather than saying 'for every possible character' it's not that much more 'work' to 'for each character Ii'm outputting, get the character information; and create if it doesn't exist'  You already have to do a 'for each character' loop to ooutput the texture uv's/coords of each character cell... so rather than a computation c%16, c / 16 + character sizes... I get back a struct that has the UV array already created for that source texture... (current character map is only like 23 characters... lots don't get rendered like 'q' 'Q' 'z' 'Z' ... but like 'O' and 'o' exist in 'Options' )

Physics...
  Basically the update to the physics info happens during culling (if some face is drawn, needs a physical representation).   decided for now to not update transparent voxels (water) to physics... though maybe someday; would almost like to do a displacement model (if thing is in water, shove water out of the way) which depending on distances required to cause a 'shove' would provide a bouyancy... but I think that will have to be a wish... I'm only at 500k water voxels update in twice the time I had 2 million updates in blackvoxel engine itself.  (C# sucks :) the always-check-array-bounds is the overhead )

After a few fixes to sector recycling code I had ended up bypassing, did get it to run on my Android tablet :)

stepped away a bit to implement networking... but I need to implement a listbox control...

But it's progressing slowly.  Still basically non-functional though; Inventory doesn't display - complicated that by using a procedural shader for first 10 block types; was looking to making more procedural texture shaders for like metals (ingots) etc; but I don't see how they are done... Implemented a BitStream class to compress sectors (basically RLE; but also scan the sector for all voxel types used, and build a dictionary, then use that count to get the number of bits required; and store counts/voxel types with that number of bits... (like most sectors by default use 8 or fewer block types... even at 16 types the voxel storage is then 1/4 the default type)

Still missing sound support... list goes oh :)

20
General Discussion / Re: Dynamic fonts
« on: November 22, 2015, 08:30:14 pm »
Hi d3x0r,

That's a great job you are doing here. And we are really proud to see you are using Blackvoxel as a base for your game. :)

Maybe the start of a great adventure for you.

The choice of C# is slightly surprising to me  :o. But why not if you like it... so I'm just curious to know why you choose this language.

Why not a C# robot. I'm not a C# expert at all, but that could be interesting to add one in Blackvoxel. Our long term goal is to add many languages. (The problem will be how to make it in a "clean" way).
The choice was primarily that C# comes with the compiler itself so it can build itself.  If you install C# you install the compiler.  It's certainly not without penalties though... like without resorting to 'unsafe' code you can't use pointers to walk arrays, and every access to an array is bounds checked against the instanced array boundaries.  In C# 'struct' is actually a different behavior from 'class' in that struct is a value type like int or float, where classes are always reference types.  So primitives like vectors are good as struct types, but you can't keep a reference to a struct; you can pass a reference to a struct to a function, but can't say 'use that struct over there for this'.  *shrug*

Adding an interop module could have been done; but not without huge expense.  It's not so easy for MS C# and would have to be done with Mono, which is quite a download; but seems to work pretty well for Unity.


I see you have mentionned that your work is derived from blackvoxel, that is right.
I know your code is at a preliminary state, but there is something very important you must add in your code ;). As a derived work of a GNU GPL v3 software, you must mention the GPLv3 licence AND original copyrights, both on a Copyright/License files and in the headers of the source code. (GPL V3 Licence).
That's not only for legal reason about the Blackvoxel license, but also for the guys crawling on your github : Even if your game is only in source form at this time, someone could go into your github and take code or assets without knowing licencing conditions. Imagine someone make proprietary software with it or simply use this code without mentionning copyright, they can and end up with troubles with us (Blackvoxel code was legaly registered in order to protect the licence).
Third party libraries should also be listed with their copyrights, authors and licencing conditions. Cross compatibility legal issues should be avoided.
Above legal reason, that's important for authors and contributors to be listed : that could help some to find a job.
I understand (as I remember that by the past, you said) you are not aware of all theses picky legal stuff . But we have worked a lot (and unfortunately spent a lot of time) about these legal details in order to avoid problems.
But, don't worry, we can help you and explain what must be done and even help you to write some of these "legal stuff" files for you.

That could also be interesting for you to know why we made the choice of free software. And why we choose the particular GPL V3+ licence that is a free licence, but somewhat restrictive in some way compared to MIT or BSD like licences : In few words, a software derived from a GPL v3+ free software must be a GPL v3+ free software without exception. That's a way to protect the work for free software programmers : Everybody can use the code freely and make their stuff with it, but in return, they must do the same. Of course, licencing terms have heavy consequences depending on your goals.
I'll spend some time today updating sources; in the process of the porting I created original files and copied header/source file contents as appropriate.  (Actually make that past-tense.)  I have no issue propagating GNU GPLv3 to this :)

About the font class, that's an interesting developpment. As you know, in Blackvoxel, we made a particular design choice with "8 bit computer style fixed font" kind of text. But as you know the font rendering system is made only for this particular case. The static rendering way of vector font is a good choice. No need for dynamic one that would be... slower.  :)
Yes I know all about the 'style choices' :)  I just figured I'd mention it as it was a small source addition (some 3000 lines) and not a lot of work to implement; though does remove stylized look; and ends up making rather fuzzy characters when blown up large.  Looks nice in small cases.... will have to provide a couple different renderings in the future for things like the large text on the main menu.... a slowdown of only a tiny fraction of a percent in the grand scheme; except the one-time hit to render to the texture when a character doesn't exist.  *shrug*  It still fits within the idle time of a frame at 60fps... 

Even if ores aren't un-minable by hand in Blackvoxel, the required quantities to make an airplane are very important for simple hand mining. But I'm not completely sure that every players understand that. In the future, there will be more in-game tutorial and missions to help player to understand what are the best ways. Blackvoxel is a long term project and there is a lot of things remaining to do.
Actually; ores don't last 'forever' but instead are consumed over time, apparently removing the furthest block of ore attached to a seam until it's all gone.  I hadn't played long enough to exhaust an ore until yesterday... then I had to move my coal and tin drills to another vein.

Yea; I didn't actually make it to genuinely making a plane, and instead ended up enabling creative mode and just created one :)

About physics engines, I can't say what is the best depending on what you want to do. Including vector entities or making multi-grids interactions might mean different approachs. In Blackvoxel, the choice of an unique grid and "pure voxel" interactions is a strong choice. But we understand that someone wanting to make a different game could want some different choices. The two library you mentioned are free and have compatible licence.

The ability to well sandbox code in C# is interesting. C# is a fast and efficient language compared to little scripting ones. Of course, not as fast as C/C++, but C/C++ is unsuitable for doing sandboxed parts(unless wanting to play with heavy hardware processor sandboxing stuff...).

The Blackvoxel Team
Actually javascript is all the craze now; the Chome V8 javascript engine actually emits native instructions and is very fast; amazingly so given the generic-ness of javascript.

Medieval/Space Engineers is C# entirely; they use Havok as a physics engine.  https://github.com/KeenSoftwareHouse/SpaceEngineers

I've seen quite a few C# games coming out so I guess it is a viable platform for rather large spaces.  I'm still iffy on this whole garbage collection thing and would much rather release/delete things in a controlled manner.
I'm using OpenTK as the graphics interface layer (which provides OpenGL and sound in theory)  But I have yet to have any sounds ported.

BEPU has a voxel physics demo - it is the engine for Lemma http://lemmagame.com/ https://github.com/etodd/Lemma  which is another voxel based game.  The demo source includes creating a custom voxel collision shape handler; basically it's a large array of bools instead of building actual box shapes and stuffing them into a compound object.  Will be interesting :) 

21
General Discussion / Dynamic fonts
« on: November 19, 2015, 06:37:54 am »
I've been tinkering with making a C# port, and was looking for a way to render fonts dynamically instead of having a fixed bitmap font of limited characters.   I stumbled on a C header-only font rendering library https://github.com/nothings/stb/blob/master/stb_truetype.h which is part of  https://github.com/nothings/stb

so I have this class

which uses the c# port of that library and renders characters dynamically into a texture.  (as each character is needed, if it doesn't exist on the bitmap already, render it, copy it to the bitmap, mark the bitmap dirty, then when drawing, if dirty, re-download the image to OpenGL.  Works pretty good...  the GetCharacter routine would have to be changed to support utf-8 decoding instead of utf-16; GetCharacter takes a string and an index and returns  a 32 bit 'rune' named after the character type in Go.

----
Instead of porting squirrel and the assembly language I was planning on using C# scripts.  I have basic functionality to load .cs files, compile them and use them.  I don't have the reactor done.  so for now it's just a static rendering.  I made a GLSL shader that generates output that look like the general texture with lines on edges... can even control the thickness of the lines dynamically and face/edge color.

Implemented a texture atlas for everything else; but had to scale the images down and extract single faces to fit in an atlas correctly; but was planning on using the texture more as a decal image and the face-edge shader as the background.  So then moved the face/edge colors into the description file.

But; I'm working on interfacing with a physics engine... I was going to use Bullet, even spent some time to make a new C# port of that since the other is obsolete by 3-4 years.... but in the process ended up stumbling on BEPUPhysics which is already C# and has 4-5x the speed of bullet and already supports multi-threaded dispatch of work.   

I also played with the game 'fortresscraft' which is also voxel based and has conveyors/smelters/etc.  Their version makes ore types un-minable by the player, and you attach a drill to a block and get unlimited ore generated from the drill on the ore; kind of unrealistic... but then you can spend time on the automation instead of strip-mining the world...

----
For now I do very little checking of the C# scripts; but will eventually limit their functionality to just classes the game engine provides and not all of C# library; would be bad to get a script that reads your file system, opens a network connection and dumps all your stuff :)  Or worse... I do limit them now from using 'System.IO' but will eventually need more checks.  Will be nice once MS has compiler-as-a-service support released; can already do it in Mono.

22
Troubleshooting & Bug Reports / Code Bugs
« on: October 23, 2015, 12:03:33 pm »
ZWorld.cpp
void ZVoxelWorld::SectorUpdateFaceCulling(Long x, Long y, Long z, bool Isolated)

  UByte * BlocMatrix[3];

This is only a byte, but it's using Sector::Data which is UShort now.

This is OK because there's only 238 types right now.... but will be a problem with voxel type 256 ... or type&0xFF == 0


23
General Discussion / Similar game?
« on: October 08, 2015, 12:56:43 pm »
don't mean to promote it; maybe it will be some inspiration?

Stumbled on this other game...
https://www.factorio.com
short, quick start... guess this game is pretty deep....
https://www.youtube.com/watch?v=sMgtUxpGlPc
there's lots of other in-play videos

Kinda reminds me of what blackvoxel is kinda attempting to be with automation; different but similar?

24
General Discussion / General Voxel Performance... no; no it's not
« on: October 07, 2015, 10:28:11 am »
Was going to mention this....
http://www.volumesoffun.com/implementing-morton-ordering-for-chunked-voxel-data/#more-1755
(references https://en.wikipedia.org/wiki/Z-order_curve http://www.forceflow.be/2013/10/07/morton-encodingdecoding-through-bit-interleaving-implementations/ )

Basically I was playing with unity, and found there's a free voxel engine plugin.  Developed by the same people that did Polyvox.  And saw that article, and after reading the articles thought 'wow maybe that would be nice'

My first test case it turned out the the max distance from (-1,-1,-1) to (1,1,1) was 53.  (even smaller than the 256 that is the distance from (0,-1,0) to (0,0,0) in black voxel)  Which would mean that it would be even better for locality of voxels in cache.

However; that was just 1 case, and the real worst case is a distance of 3080(!). 
7,7,7 center
min 504   00000000000000000000000111111000
max 3584 00000000000000000000111000000000

.....No
The worse case gets worse and worse.... iterating over 0-100,0-100,0-100 the average max distance is 41296(!)

Each point at 7, 15, 31, 63, is increasingly large offset...

-----------------
So ya; ignore this.

this is more of a what-not-to-do.... it looks clever to start... but having reasonably sized sectors is more advantageous... and does nothing but complicate the offsets to wrap between sectors.

25
General Discussion / OpenGL Performance
« on: October 02, 2015, 09:03:57 am »
OpenGL performance improvements... requires a pretty advanced OpenGL Level?  But some of it is interesting in pointing out that there might be more.
http://blogs.nvidia.com/blog/2014/03/20/opengl-gdc2014/

Did notice a few articles that OpenGL is faster tha D3D ...
http://www.extremetech.com/gaming/133824-valve-opengl-is-faster-than-directx-even-on-windows

26
General Discussion / Re: OSX port
« on: August 02, 2015, 11:21:28 am »
Re Deprecated register keyword...

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340.html
http://stackoverflow.com/questions/10675072/is-the-register-keyword-still-used

I personally disagree that this should be deprecated... but apparently has, and will be removed in C++17.
There are certainly more ideally things the compiler can't figure out, and doesn't. I've seen worse and worse code generation by more modern compilers than things in the mid 90's. 

The argument goes like 'it was only a hint, and the compiler has register coloring anyway so it's meaningless.' but I've seen little effort by the compiler to preserve values in registers, mostly because by nature it assumes things are 'volatile' so it reloads them (I guess, can't otherwise figure why just bad code would be generated).

I certainly don't want people to go to inline assembly for something so simple since that's far from portable between compilers... this really all makes me sad.


27
General Discussion / Re: Contrib & Assembler & legacy projects
« on: January 09, 2015, 12:33:11 am »
FPLA programming with high level languages.
there are lots of registers available.  A register is a single bit, it can be used just like any input or output bit.

Every node fires at a clock and can process...


 Reg1 = Input1
 
all logical operators .... & | + - * / > < = .... get supported... with carry and overflow able to be redirected to other registers/outputs..

---------
When used on a BUS controller to communicate data between a PC and Modcomp computer, the chips had states.. basically a set of bits that are known internal registers get set to a known state on reset,

I would think though that a input/output/register (sh/c)ould be an analog value instead... which allows more operators like sin/cos/square wave pulse generator functions... which can be done at a digitial level also... a single register in a FPLA could be toggled and provide a /2 clock for some other function... shifting a value through several registers can provide delay-line short of character... by single clocks (not really recommended... since all states process at once, ended up isolating logics but... )

-----------------
This is a more modern thing, and I can see benefit in learning this instead... it's a decade ahead of altera chips
there's examples....
http://en.wikipedia.org/wiki/VHDL
http://en.wikipedia.org/wiki/Dataflow_programming

28
General Discussion / Re: Contrib & Assembler & legacy projects
« on: January 08, 2015, 08:46:36 pm »
I don't remember if I mentioned Alice...
http://www.alice.org/index.php?page=what_is_alice/what_is_alice

And microsoft has another model...
http://msdn.microsoft.com/en-us/library/bb483088.aspx  but that's dead long time... but it's .NET and sorta works... so it's got some longevity maybe

29
General Discussion / Contrib & Assembler & legacy projects
« on: January 08, 2015, 07:55:40 pm »
it's a 0 not a O ... :)  0:)  :O

anyhow...

Looking forward to assembly...

Omega -
http://www.abandonia.com/en/games/29295/Omega.html (dos box)
http://en.wikipedia.org/wiki/Omega_(video_game)

c-robots
http://corewar.co.uk/crobots/
http://corewar.co.uk/crobots/crobots.txt (programming guide)

basically a C syntax... with a limited internal library of 'clib' functions... like
turn(), scan(), ...

My automaton game (bugbrain) 
http://www.biologic.com.au/bugbrain/  (in zip is 16 bit installer, won't work in 64bit systems)
would add input nodes that are graphic images (chips... actually a chip would be a modular thing, with multiple pinouts on it... an input/output node is more like a pin on a chip/module.... )
Needs a way to register inputs and outputs...
(repackaged as a single zip)
https://drive.google.com/file/d/0B812EYiKwtkkai00aTlRYkZRU28/view?usp=sharing

--------
 crobots, omega etc, do active scan... so you have to have a run-loop

bugbrain would be more like a event input... which is more suitable for a ladder-logic sort of language... or PAL language .. http://en.wikipedia.org/wiki/Programmable_Array_Logic

or... FPGA programming (Field-programmable_gate_array) ... but I forget the syntax... and cannot find a good example... It's more like parallel state machines... so a machine has a state, and in a state, when it receives inputs it can generate output and/or change states...

inputs are generally logic signals (read/write BUS line for instance) ... but could be multiple in parallel so (this set of pins is 8 bits) is a address... that can be used to reference lookup tables for outputs...



30
Programming with Blackvoxel / Re: How hard could smoothing be?
« on: November 22, 2014, 03:53:07 pm »
Did some research on implementing glCallLists in my stuff; and learned they have been depricated... in favor of vertex buffer objects... which kind of makes sense, since you can create vertex buffers in threads asynchronous to the display... where glCallLists have to be built on the GL thread context...

so shaders and display buffer building as another pluggable renderer :)

I find that the resonable relation would be building buffers per shader per image source... or per block type; with shaders would think the 'default' blocks could be computation shaders based on a distance from poly edge and a color scalar...

and those built per voxel sector ....

there's also no multi-indexed buffers... like normals in this world I'd only need a buffer of 6 points, if I could have a index buffer for texture, index vertex and index normal independantly... but indirect uses the same index map for vertex/texture and normal so they all have to be the same length...

http://stackoverflow.com/questions/11148567/rendering-meshes-with-multiple-indices for instance indicates it can be done, but it's more work than benefit.


Pages: 1 [2] 3 4 5