Procedural block world project

User projects written in or related to FreeBASIC.
Post Reply
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Post by kiyotewolf »

@Gonzo

I've already sped up rapid 2D pixel editing, I can't wait to apply my tricks to voxel/texel/3D cube type editing.

If I get some pudding cooked, I'll share with you.



:M
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

kiyotewolf wrote:@Gonzo

I've already sped up rapid 2D pixel editing, I can't wait to apply my tricks to voxel/texel/3D cube type editing.

If I get some pudding cooked, I'll share with you.



:M
sure thing :)

im spending 8 seconds working through 15m blocks:
* culling for visible blocks
* float raycasted lighting
* float block lights (aka torchlight)
* custom objects in the world
* upload to opengl

if you want to do 3d you will have a ton of grief and pain doing opengl
its largely undocumented and any tutorials are ancient, lacking or just plain wrong
i would change to directx, but... from ashes to fire

btw, when the data gets so large, the fastest code is the smallest code
use a ton of global variables, least amount of functions and make damned sure the cpu is executing code in order as much as possible

multithreading is a whole other beast... to get the best speed you have use mutexes sparingly and instead use round-robins where possible
some of the time theres code that must be synched, and so mutexes are necessary, but imagine you have something that you don't necessarily want to execute right then and there (it can wait), then round-robin is your best friend
if you combine this with a queue, you can get synchronized threading with waiting :)
it's a pain to debug, and i dont recommend it.. its a desperate measure :)

heres some data on view ranges (in sectors):

S = sectors per axis (s^3)
M = memory needed if raytracing

Code: Select all

 S             M
128: 6,442,450,944 B <-- max. capability of engine
064: 2,147,483,648 B <-- my long view range
048:   905,969,664 B  <-- my medium view range
024:   113,246,208 B  <-- fast raytracing
016:    33,554,432 B   <-- ok for heavy raytracing
i tested with 128*48*128 sectors, and it works well, save for the giant strain on the gpu :)
divide memory usage by 4 to get amount of blocks

the engine uses a near-constant amount of memory regardless of view range as the memory footprint is increased only by render objects

raytracing will never scale even if you found the golden goose of an algorithm
raytracing also requires a near-top-down view of the world
so, hopefully you are focusing on a 60-90 degree world view
otherwise you will run into trouble later
theres also room for quite a few optimizations and cheap hacks in a top-down enviroment, and i would learn alot from minecrafts lighting system in that respect
for example its re-used for lightning strikes, snow and rain :)

minecrafts lighting is top-down and shadows are made where the skylight doesnt hit
thus rain falls where there is skylight and so on
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

after a little break from coding during summer i have resumed, and have now completely rewritten torchlight functionality making it viable in realtime (more or less), and so the functionality is now permanently on

next step is multiplayer or gui and console, or both

http://fbcraft.klk-computers.com/fasttorch.png
i have still not gotten any positive reviews of my house

edit: and i can see the other player!
one days work - internet high five o/\o
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

Image

progress, a very rare thing in this kind of project :/
darkhog
Posts: 132
Joined: Oct 05, 2011 21:19

Post by darkhog »

Could you make Linux version/make it wine-compatible? I can help with both.

And in case you want to ask what my problem is, in Easy ISO Test ver 2 which you put at mediafire, I get black screen except minimap (simply - objects don't render, but 2d map rendering is fine).
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

sorry, but thats not the link to the game, and im not really accepting testers at the moment :)
but as for linux, it works fine.. we are testing linux all the time
if it comes down to it i can even build a linux version

in any case, ive added networked sound, player nameplates.. better models i suppose, still not textured
and hopefully will fix some stuff that has been showing up in the logs :)

if you _really_ want to help out join #textella on EFnet (irc.efnet.org)
and talk to us there!
super_castle
Posts: 289
Joined: Oct 10, 2006 7:19

Post by super_castle »

Where is the Source-code for Free-Basic ?

thanks.
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Post by Richard »

TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Post by TJF »

Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

a picture speaks a thousand words was it?

Image
Image
pictures of us testing "darkness", except the background isnt very dark so it kind of sticks out.. oh well

making temporary player models, and just today implemented basic chat which i will rework hard tomorrow!
super_castle
Posts: 289
Joined: Oct 10, 2006 7:19

Post by super_castle »

These graphics are not in the FreeBasic source?

in the "C is not good.

gruss
darkhog
Posts: 132
Joined: Oct 05, 2011 21:19

Post by darkhog »

You mixed up mouse controls - in MC placing blocks is under right button and destroying is under left. You got opposite.
//edit: From IRC when you wasn't there, gonzo:

Code: Select all

<Darkhog> I have quite few suggestions
<Darkhog> One of them is for example voxel models.
<Darkhog> Since fbcraft's world is made out of voxels, it shouldn't be hard to make modeler which will made smaller voxels
<Erlend^SE> Models made of blocks?
<Darkhog> Yeah, but smaller and w/out textures (only color)
<Erlend^SE> Unless you know a way to make it fast.. it will probably slow down the game
<Erlend^SE> The game is made of cubes .. using cordinates
<Erlend^SE> And cube-elimination
<Darkhog> Something like this: http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash4/300561_256600741039984_217630671603658_839394_348373_n.jpg
<Darkhog> I've had yt movie of it somewhere, but lost it
<Erlend^SE> ok.. I would guess they use a totaly different gfx backend
<Darkhog> OK, got it: http://www.youtube.com/watch?feature=player_embedded&v=Z2LO1n2F25M
<Darkhog> Like in normal world, models would have only front layer of voxels visible - why render inner guts of model if it isn't visible?
<Darkhog> Also google game called voxelstein - it's basically wolfenstein made out of voxels
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

Image

Image

livelier player models with textures, bugfixes left and right =)
i will post more screenshots as i remember to actually take them...
or maybe its time for a video =)
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

Is this a Minecraft clone? I actually like RMB for destroying.

Minecraft has an option to switch them, however.

I think the better way is RMB for destroying and LMB for adding, with an option to switch them.

Also, the brightness contrast between closer and farther away is horrible. (or is it your shading?) It's too dark and bleh.

ALSO, your font is kinda terrible. There are tons of good free freetype fonts out there; use them!

ALSO, I don't like the rectangular shapes of the bottom-right icons. They look squished, especially the tools.
Gonzo
Posts: 722
Joined: Dec 11, 2005 22:46

Post by Gonzo »

http://www.youtube.com/watch?v=xZaoedOraDw

i could heed your advice agamemnus, but that interface isnt for keeps
focus is alot of places, but not interface
right now adding jetpack for fun =)
Post Reply