Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Chat / Is there anything like a Minecraft clone out there, made with AGK?

Author
Message
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 19th Jan 2018 00:08 Edited at: 19th Jan 2018 00:30
Hello dear AGK-fans.

I am wondering arround, if there are some game projects, which are using AppGameKit to creating a minecraft like environment. With building and digging or with blocks, but with other intentions.

I saw these things:







And since AppGameKit Tier 2 is C++, it could be possible, to convert or assimilate

But, maybe there is something arround in AppGameKit Tier 1 Basic as well. Would be nice to see.


Maybe we could do a community project, and create a simple beginning minecraft and we can evolve from this point into other ideas or gameplay mechanics. Using a basic "Minecraft"-Clone for things like:

- Logical Stones


- Shaders


- a easy modifable shooter or 3D sokoban, a Portal Clone or something

Like "Small Game Templates"-Second Wave or so. (or second edition, or "Small Game Templates" gone wild or bigger or "Not so Small Game Templates"




CumQuaT
AGK Master
7
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Brisbane, Australia
Posted: 19th Jan 2018 03:02
I haven't seen one, no, but that sort of thing would be quite possible with little effort for the original prototype.
Help out a fellow dev! Download and rate my games! They're free!

Wizzed Off! - (Android) (iOS)
God of Thunder - (Android) (iOS)
Extreme Lawn Mowing - (Android) (iOS)
Drunken Heroes - (Android) (iOS)

And you can get Fluffy Knuckleduster merchandise at our new store!
LillyByte
User Offline
Joined: 30th Oct 2017
Location:
Posted: 19th Jan 2018 04:07
I'm building a MMORPG and the client uses AppGameKIt... and it's a voxel world. But, instead of first person, it's going to be 3rd person strategy/survival.
There development server sits here: http://www.dymoria.com
So, yeah, it's possible to build Minecraft-like worlds with AppGameKit.

https://imgur.com/a/NWBAB
~~ LillyByte ~~
http://www.dymoria.com
CumQuaT
AGK Master
7
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Brisbane, Australia
Posted: 19th Jan 2018 05:34
Not to hijack the thread, but LillyByte what communication protocol are you using between the AppGameKit app client and your MMO servers?
Help out a fellow dev! Download and rate my games! They're free!

Wizzed Off! - (Android) (iOS)
God of Thunder - (Android) (iOS)
Extreme Lawn Mowing - (Android) (iOS)
Drunken Heroes - (Android) (iOS)

And you can get Fluffy Knuckleduster merchandise at our new store!
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 19th Jan 2018 09:05
@LilllyByte

Your game looks fantastic.

CumQuat wrote: "... but that sort of thing would be quite possible with little effort for the original prototype."


Maybe we need realy something like "Advanced Simple Game Templates", also for showcasing the potential of AppGameKit itself. Or we do something like "Ludum Dare" or "A Game in a Week"
basicFanatic
User Offline
Joined: 7th Jun 2017
Location:
Posted: 19th Jan 2018 12:12
Xaby wrote: "Or we do something like "Ludum Dare" or "A Game in a Week""


Actually, that's a really good idea!
LillyByte
User Offline
Joined: 30th Oct 2017
Location:
Posted: 19th Jan 2018 22:12
Quote: "Not to hijack the thread, but LillyByte what communication protocol are you using between the AppGameKit app client and your MMO servers?"


Since I'm using WebSockets, I have to use TCP/IP-- but because the game will be tile-based and doesn't rely on accurate physical movement by just tile position, it's fast enough for the job.
~~ LillyByte ~~
http://www.dymoria.com
LillyByte
User Offline
Joined: 30th Oct 2017
Location:
Posted: 19th Jan 2018 22:14
Quote: "Your game looks fantastic."


Thanks! <3 Though, right now, that's just placehold art-- I need to get all the mechanics done before creating the actual art/textures/animations.

No doubt I'll be pushing the limits of AppGameKit.
~~ LillyByte ~~
http://www.dymoria.com
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 20th Jan 2018 02:21
This might just be an interesting project to work on. The idea of do something like "Ludum Dare" or "A Game in a Week" is interesting as well. I like short projects. lol

If we could get people interested in taking small steps... and not trying to make the greatest thing ever right off the bat... it might even be possible to do community projects where we design a full albeit simple game like a micro minecraft or Crossy Road or whatever. And we figure out out what is needed... put some thought up front... break the work down into modules and multiple people here tackle it. Like one person takes player control, one enemy control, one world control, one HUD control and so forth. And just plug it all together when done. Such a thing could be very interesting to see what comes out of it, would be highly modular out of necessity and fairly clean code as well since each module would need documented "exposed" entry points for other people's modules to call and so forth.

Just an idea to think about.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 13:18
I just created a plane with a map of x/y blocks - say

x=0 to 300 - leftright
y=0 to 300 - forwrdback
z=0 to 300 - height

and it just when boooooom - not enough GPU power to do such thing

So I would probably suggest in having the map with say 3 layers, so when player hits the top layer, that block gets cloned and moved to the botttom.

So if repeat the hit then it will always rebuild itself underneath the player instead of building the whole map

God know how ones do it in that C++ version - unless AppGameKit doesnt fit for purpose for such a minecraft style game

puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 13:33
Something to start from
+ Code Snippet
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 14:47
+ Code Snippet

Move around with ya cursors
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 20th Jan 2018 18:13
cool
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 20th Jan 2018 18:54 Edited at: 20th Jan 2018 19:42
It is a very nice colorful demo!

It seems strange that rendering about 5k cubes would be about the limit for 60 fps. Of course big part of it is the crazy high camera far distance you set. I think maybe 150 would be good for that in this context.

Still there should only be like 6 quad faces per cube x 5,000 cubes = 30,000 faces or 60,000 triangles. 60k x 3 vertexes = 180,000 vertexes. I'd think even mobile could handle that.

Must be something going on... maybe different materials are being internally generated for each cube? Or some fx on by default?

I mean I get ultimately of course there is a real limit just don't see why about 5k cubes not being updated animated or anything but simply existing in 3D space and being rendered would be the limit on Windows. I'll play around with the code later and try different things see if they make any difference.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 20th Jan 2018 20:27
I tried to build something with Cubes in 2005, I think, and there we figured out, that a cube behind a cube, that couldn't be seen by the camera, could be rendered and will cost performance.

So we created combined objects. e.g. 3 x 3 x 3 cubes only have 6 sides (three are not drawn, because of backclipping, so only three), and wie tiled the texture and scaled it. It works, if combined cubes are have the same texture. If we place or distruct one cube, we had keep in mind, to reverse this process, so a 3 x 3 x 3 cube, has generate 27 cubes and clears the one, which is destroyd.

There is much optimization potential.

An easier example would be, to have two cubes next to eachother. They only need two walls fewer. [_][_] would be [_.._] . I think, there is also a lot potential, to do Imposters, and or Instances.

The way minecraft ist build, I think, it's possible, to have only "real" cubes on the surface. Maybe it would be more complicated, if you dig deeper and have caves. I think, there have to be some "zones" in a way. So you don't have to render the complete world with all cubes every frame. But figureing out, which cubes you can see and or which cubes connected and can be one combined-object ... could also cost performance.
But this Optimazition could be done at start or "compiled" into the level before. And don't have to be done every frame.

Late in 2005 on notebooks, it was time consuming, but the optimaziation we have tested with some combined cubes paid off in better frames/sec.

puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 20:57 Edited at: 20th Jan 2018 21:01
mmmm very interesting concept.

+ Code Snippet

This runs nicely on Android too - getting 30fps on android where as my first attempt was dragging all way down to 5fps


Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 20th Jan 2018 21:35
@puzzler2018

could there be an difference in performance between:

blocks[blockcount].id = InstanceObject(block)
blocks[blockcount].id = CloneObject(block)

in line 44?

I set the Sync-Framerate to 6000, in hope, to see, if I got a difference. With Copy, I had about 300 Frames, with Instances, I had about 500 Frame. But I can't say it for sure, because everytime I "walk" arround and start the prototype again, I got different frame-rates. between 250 and 600. Don't matter, if I use "Clone" or "Instance".
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 21:55
Wow i didnt realise instanceobject - rather than the loading speed is astronomically quicker to build.

i set to 600 and get around 150-180fps walking around the centre of the layer and as move out to the edges - it increases

puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 22:06
So, keeping it at 600fps setup and using a 200 x 200 grid to work on, it gives a more playing area and resulting at around 30fps (on PC at least)

+ Code Snippet
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 23:05
We have to think now of possible skybox incorporated for nicer graphics, the coordinates from the previous examples was all wrong in the aspect of the skybox

here is skybox added

+ Code Snippet

Hope you dont mind me upsetting your thread with all these snippets

Its been a great challenge and love to help more

Thanks Xaby and GarBenjimin for your inputs this evening
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 20th Jan 2018 23:09
I change a part. And the interesting thing I found out, even if all Blocks are invisible, the Framerate get not much better. The diffrence is from 40 (visible) to 65 (invisible)
So set Cubes to invisible, which are hidden by others, would only have a little impact. I thing, it is the sheer amount of objects, AppGameKit "strubbles" with.
I also tested, if setting the texture before instancing would have a significant impact on loading time, but I can't verify that.


+ Code Snippet
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 23:17
Yes, if set invisible, my fps is 60 (as if theinternal agk engine just ignores processing them objects altoether

if visible - its fps is back to 30

if use 600 as a starting fps
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 23:25
Also, just found that the hieght of the blocks was right, so if you change

line 44 - 47 with

blocks[blockcount].id = InstanceObject(block)
blocks[blockcount].x#=100- GetObjectSizeMaxX(blocks[blockcount].id) * x
blocks[blockcount].y# = 43 + (random(1,2)*3)
blocks[blockcount].z# =100- GetObjectSizeMaxZ(blocks[blockcount].id) * z


puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 20th Jan 2018 23:50
Then there is a map procedural engine to create.

Idea - cause this map is 200x200 and height as 1,2,3,4,5 - 5 is highest point and then texture code 1-grass,2 -water,3-sand, 4-etc, 5-etc and 00(playerstartblock)

then starting ground could be like this

51,51,51,51,51,51,51,51,51,51,51,51
51,41,41,41,41,41,41,41,41,41,41,51
51,41,33,33,33,33,33,33,33,33,41,51
51,41,33,22,22,22,22,22,22,33,41,51
51,41,33,22,11,11,00,11,22,33,41,51
51,41,33,22,11,11,11,11,22,33,41,51
51,41,33,22,22,22,22,22,22,33,41,51
51,41,33,33,33,33,33,33,33,33,41,51
51,41,41,41,41,41,41,41,41,41,41,51
51,51,51,51,51,51,51,51,51,51,51,51

This will look like hills always around the player

Something like that! but larger as this is just an example structure
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 21st Jan 2018 11:00
@puzzle2018

puzzler2018 wrote: "Yes, if set invisible, my fps is 60 (as if theinternal agk engine just ignores processing them objects altoether

if visible - its fps is back to 30

if use 600 as a starting fps"


So "deleting" the object completly would be more effective for the performance at all, instead of only make the cube invisible ... ? Right?

9 cubes

___X___
__XXX__
_XXXXX_

to 5 cubes

___X___
__X_X__
_X___X_

Would be more in every direction. But! We have only test 6 sidesfor every cube. And 5 Sides for the cube next to that cube _ABBBBC_

With the random cube position, its the worst case at this moment.

But its nearly the same, what you wrote, I think.




puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 11:11
Thats correct - you have the idea


I dont think it would be good to delete - cause if you hit a block - then we would need to reposition it somewhere in the world - like underneath the block your hitting - so it doesnt look like there is space underneath

ya know my meaning
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 21st Jan 2018 11:49 Edited at: 21st Jan 2018 12:05
If we hit a block, we could put the blocks missing back, and delete the beaten block. We only have to look at its surroundings, not the complete world. Mostly we only can hit one block after the other. So the calculation can't be so complicated, to Re-Create-the-Object/Objects arround.

Imagine, a cube out of cubes, 100 x 100 x 100, that would be 1.000.000, 1 Mio. Blocks.
But we could only see barly the outside with 100 x 100 by 2 and 98 x 100 by 2 + 98 x 98 by 2 ~ 58.808 so we would save a lot of blocks inside. And breaking one block on the outside, would be to create only one block more. So the same amount of blocks would be there. And if we dig deeper, we need maybe evry dig + 4 blocks.

Imagine, how often you can dig, before havaing a Million Blocks. I think, the number of blocks, could be nearly constant.

Maybe we could generate a 100 x 100 x 100 Cube-Array and "meltdown" it with "hot" lava to a landscape (simulated) and get a nice terrain, and only a few cubes needed. (about 50 k Objects maybe, without further optimisation. After that, maybe some Cubes could have charing Sides we don't need ... and so on)
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 11:58 Edited at: 21st Jan 2018 11:59
Cool ill go with that.

Im currently looking into what best (for performance) for procedural map generation (with height)

Either my own shobby way or use a generally known algorithm thats out there, like Perlin Noise and such like

Once we get this in place, then we will be able to see the outcome and work more from that

Thoughts?
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 12:04
Good read - https://www.redblobgames.com/maps/terrain-from-noise/

and there are also a few in the forums


Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 21st Jan 2018 12:12 Edited at: 21st Jan 2018 12:14
@puzzler

without caves, you would only need the high of a hight map for the cubes positioning. Maybe 100 x 100 Cubes, if the are at the same hight, that would be it, if they change there high, there is a little calculation needed for the cubes next to it, or under, if the angle is very steep



___/\____/\_____

. . . . ___ . . . . . . . ./\
. . . /. . . .\__ . . . . / |
__/ . . . . . . . .\___/ .\_______
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 12:29 Edited at: 21st Jan 2018 12:30
Very interesting ideas- will bear in mind

+ Code Snippet

Keep going....
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 12:47 Edited at: 21st Jan 2018 12:49
Here is what i have so far with a little map generation

+ Code Snippet

Have an awesome programming afternoon - catch up in a little while
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 16:44
Here is a procedural map generator

+ Code Snippet

Still lots of funky things to do and will keep having a dabble each night after work
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 17:52 Edited at: 21st Jan 2018 17:55
We could add a bit of fog - so anything further than the fog field of view - can be invisible blocks - or blocks that are not generated what so ever - they "could be" potentially created as an when they come into view with InstanceObject

And then as the player moves, it procedurally builds new blocks as they come into view in the distance depending on where they are from the map generated

So this would mean that we could have potentially a lot bigger map to, say 1000,1000 (not all generated at same time) just as and when come into view


Just an idea

+ Code Snippet
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 21st Jan 2018 19:06
Looks great, so far. I will add some controller-input for testing on the OUYA, and will tell you the performance. ...

... Can't get any APK from AppGameKit to run on the OUYA. I think, I do something wrong
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 21:51 Edited at: 21st Jan 2018 21:53
Looking at a rolling map now

Say we have a 50x50 grid

Need to move the outer edge objects to the opposite side. and be able to do this each time player moves,so its constantly wrapping around in a 50x50 2D array - viewing area of a 5000x5000 map

If anyone has any thoughts, then most welcome to add some thoughts
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 21st Jan 2018 22:09
Hey, I think you want to store the blocks in a 3 dimensional array so you can run algorithms over it, which need to know the neighbor blocks.
You can then use Flood Fill, Breadth First Search and other nice algorithm.
For example you can save much faces between neighboring cubes, so you end up only rendering the hull, but therefore you need to split the cubes into 6 faces.
After that you can split the map into 16x16 chunks and use BFS to deem the chunks to render which can be seen from your viewing direction.
Sounds a bit like view frustum culling, but it is not, it can stop rendering chunks in the frustum but behind obstacles (i.e. another chunk blocking the view)
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 22:17
Wow - cheers for that - im a beginner at moment on 3D - but i will take your idea intoconsideration and give it a good go

Thanks Janbo
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 22:21 Edited at: 21st Jan 2018 22:23
Sorry, but does this do rolling / wrapping around an array. so can move object properties ? ill apply the ID and texture when it enters into the view port

I just need it to remember the coords, damage, height etc and when gets into the view area - then apply the texture and object itself

Method in my madness if this is wrong way to move a map

puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 21st Jan 2018 22:40
fubarpk's scroller will help - didnt think of that doh

https://forum.thegamecreators.com/thread/216193

thanks fubarpk for the thread - will come in handy
Xaby
FPSC Reloaded TGC Backer
10
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 22nd Jan 2018 00:09 Edited at: 22nd Jan 2018 00:13
I tested the following on the OUYA with AGK:

- about 100 Boxes with each 44 Polygones, and I got ~ 50 Frames / s -> 4400 Polygones
but I also could put 13 Soldiers in the Scene, each more than 8.000 Polygones (the Physics-Demonstration-Soldier)
and that are about more than 100.000 Polygones and I got about 56 Frames / second.

So with this in mind ... I think, we have to pre-bake the Objects or something.




FPS are from GTX 770. Have to test that on a Intel 4000 maybe. It would show more, what I mean in performance.

Attachments

Login to view attachments
MikeMax
AGK Academic Backer
6
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Jan 2018 01:45
Afyter copy/paste the last code from puzzler2018 , the poor performance of 200x200 blocks (66618 vertices processed at 27 fps) is surprising me ... The performance are the near the same when moving the camera out of the map with only 2700 vertices processed ..

For example, With my WIP 3D Editor, i can process 7 000 000 vertices at 50fps on an Intel HD Graphics...

Very Strange

janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Jan 2018 03:09 Edited at: 22nd Jan 2018 03:18
It's the amount of objects that affect the frame rate so bad not the polygons ...well the polygons too but you have to find a good balance.
You don't want to switch between states for all the different Objects so much.
I wonder if the only way to combine objects is via memblocks ?
You want as few Objects as possible, so I suggest, if you go with the 16*16*16 chunks to combine all faces in this chunk to one object so agk can still run view frustum culling and draw call batching on the chunks/objects.
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 22nd Jan 2018 04:34 Edited at: 22nd Jan 2018 04:42
40,000 separate objects I can see where that would be a huge amount to process. I remember a huge thread over on the Unity forums where they wrestled with the same thing and yes need to create almost like a terrain map holding many blocks. Using individual blocks the world will have to be very small to keep up performance.

Like @Janbo mentioned combining many blocks say a 2x2, 3x3, 4x4 etc into a single object should help too. Actually I think that video above and articles on Minecraft would show these are things he wrestled with and solved as well. And people on Unity forums have too. So makes sense to look at all of that stuff.

https://sites.google.com/site/letsmakeavoxelengine/
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
LillyByte
User Offline
Joined: 30th Oct 2017
Location:
Posted: 22nd Jan 2018 05:38
I'll interject a little about how I am doing the blocks for my MMORPG while 'attempting' to conserve memory.

I wanted the ability to build upward, but if I had a full array of cubes like 100x100x100 (for instance) that wouldn't be very dynamic for various region sizes... and that'd be a heck of a lot of memory wasted, since I assumed most of that space would be empty and we only want to use memory when there are structures to fill it.

So, what I did is create a single 1 dimensional array to represent my X,Y ground plane... and then each element of that array has a Z array of elements to count for upward blocks. So, here I could adjust my 2D array to whatever X*Y length I needed, and then each individual element at every X,Y position had its own dynamic Z array up. So, the only time memory is used is if there's an actual block there. Setting any element to 0 meant there was empty space. I store as much data about that block type I can inside the array for quick access and information about any particular block.

By not using 3 dimensional arrays and using dynamic allocation of memory of single arrays... I can create larger voxel spaces while minimizing memory usage. the only problem would be, over long term usage memory would get fragmented and you'd need to restart the game every few hours if you were doing a lot of builing... but, it hasn't been an issue in my voxel world yet.


~~ LillyByte ~~
http://www.dymoria.com
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 22nd Jan 2018 06:38
Some really interesting a good stuff from all here.

I shall progress more after my daily shift which starts in a bit

Catch up soon
MikeMax
AGK Academic Backer
6
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 22nd Jan 2018 07:33 Edited at: 22nd Jan 2018 07:39
Quote: "It's the amount of objects that affect the frame rate so bad not the polygons ...well the polygons too but you have to find a good balance."


Ho yes, you're right, sorry.

If i understand the problem, the solution resides in having visible cubes only in the pipeline (so creating visible and destroying invisible ones). So the visible frustrum need to be manually and mathematically deducted before each swap depending of camera position/angle.
maybe it's possible to manage virtual "sectors" (big cubes) which are the "bounding boxes" to deduct which inherited cubes are visible or not ... if the big cubes returning GetObjectInScreen(sectorCube) = 1, so we create the cubes which are in ( if they are visually invisible or destroyed by the player, we pass them in the process and determine this on a second pass). Or a kind of binary space partitioning (BSP).

In all cases, the solution lies in mathematics and grouping to determine which cubes are to be created or destroyed. That the only way indeed. (combined with an hash table to have each cube's properties quickly)
CJB
Valued Member
14
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 22nd Jan 2018 07:49
JohnStabler built an octree voxel culling thing a while back: https://forum.thegamecreators.com/thread/216697
puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 22nd Jan 2018 12:49
I have received lots of insprirational things here - thanks

I will certainly be taking a look into JohnStabler's version and see if it can be adaptable to what we achieving here and also the others (dynamic culling) etc

Maybe also decrease those blocks from size 1 down to .25 to make smaller .

Shall keep trying different things and methods until we get this 100% correct for performance and of course as soon as I get to my PC.

This looks impressive with Frustum Culling as some mentioned, so will be taking a look at https://sites.google.com/site/letsmakeavoxelengine/home/frustum-culling - Thanks GarBenjiman for that link







puzzler2018
User Offline
Joined: 8th Oct 2017
Location:
Posted: 22nd Jan 2018 18:48
Checked JohnStablers example and this will be a FPS burner too - started at 60fps, but then dropped suddenly to 25-28fps once got a 20K+ nodes/objects in there

Im not stopping just yet, this will not be defeated lol

So will have a think

Login to post a reply

Server time is: 2018-02-22 08:50:02
Your offset time is: 2018-02-22 08:50:02