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 Classic Chat / Is there anything like a Minecraft clone out there, made with AGK?

Author
Message
puzzler2018
User Banned
Posted: 29th Jan 2019 22:58 Edited at: 29th Jan 2019 23:03
Mesh memblocks is not scary - promise people... its worth learning

I wouldnt got where I am today wish Mesh Memblocks without (in no particular order)

Tom Toad (not sure if he realises)
Rick Nasher
Fubarpk
Santman
Janbo
Bengismo

and few others

Cheers guys
puzzler2018
User Banned
Posted: 31st Jan 2019 22:01
I feel ive dismissed this a bit - so will catch up with this work at weekend amongst other things

Things to acheive this weekend is:-

- Removal / Adding blocks to the new way of collisioning we created together (by ideas from other threads).

- occluded faces implemented properly

- Multiple Texture mapping cubes on an Atlas map (done this before) but could be better

Think that will do for a weekend

puzzler2018
User Banned
Posted: 3rd Feb 2019 22:35 Edited at: 3rd Feb 2019 22:35
I must have brought an idea with lego working on Minecraft style engine but with the nobbles

https://forum.thegamecreators.com/thread/223727
puzzler2018
User Banned
Posted: 10th Feb 2019 20:40
This is a very extremly interesting video about using normals to work out to cull backfaces or not - its just about the order of how we building triangles/vertexes up - all must be in a rotation manner

Quite pleasantly surprised



puzzler2018
User Banned
Posted: 11th Feb 2019 12:49
So as long as we define the cubes vertexes (or any objects) the right way round (clockwise) or (anticlockwise) and not a mixture then, work out the Normals for each face.

Just as long as every single triangle uses the same rotation premise on building it, then the normal results can be used to decide to draw or not a face.

So, If the results

Normalise()

if sqrt( NormalX# + NormalY# + NormalZ# ) > 0

draw that face to the mesh

else

don't bother

endif

Amazing trick!! and cannot wait to give this a bash pronto!!

chafari
Valued Member
13
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Feb 2019 20:42
Nice video puzzler . This is the way freebasic works....I love it !! and is total free ...Somehow we have to fooling the eye to give the appearance of 3D .

An easy example converted to Agk.


I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 11th Feb 2019 21:20
Wow - nice snippet Chafari - works well but the projection is slightly off when go up and down on the Y but should be easily remidied with multiplication matrixes

Thanks for your time and input..

fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 11th Feb 2019 22:07
that's Clever Chafari
fubar
chafari
Valued Member
13
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Feb 2019 00:33
@puzzler / fubarpk thanks for your coments. This snippet needs some adjustments to work correctly. We have to limit the y movements and draw top & down face. I made this inspired by the video tutorial. Theres a tecnic of raycasting that looks like maze 3D using 2D programms .
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 12th Feb 2019 12:37
Well done chafari. Ya bet me to it lol.
puzzler2018
User Banned
Posted: 12th Feb 2019 22:08 Edited at: 12th Feb 2019 22:17
Here is my version of basic normalising normals



Normalising



I will convert this to a cube soon and then many OBJs

Catch up soon
Tier 1 Developer
puzzler2018
User Banned
Posted: 20th Feb 2019 23:01
thought to bump this before becomes locked

Ill get to this soon

Tier 1 Developer
nonom
AGK Developer
1
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Aden
Posted: 9th Mar 2019 16:27
Quote: "Rome wasnt built in two weeks - if this takes 2 days/2 weeks/2 months or 2 years. then im happy, as long as get this 100%"


Let me hijack your thread like you did with the mine. A few threads (months) ago you was really angry, at this point, i tho to nomitate you like valuable peson because I don't like the people crying.

Your work is much fine, but the person is so farof his work, this thread talks itself.

Stop trolling the threads and focus in your own work.
nonom
AGK Developer
1
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Aden
Posted: 9th Mar 2019 16:29
Seems the forum cannot let me post in your thread like you did in the mine.
puzzler2018
User Banned
Posted: 9th Mar 2019 16:30
But chill out - This is Xaby thread

Tier 1 Developer
nonom
AGK Developer
1
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Aden
Posted: 9th Mar 2019 16:30
Still spamming about your version of Perlin Noise?.
puzzler2018
User Banned
Posted: 9th Mar 2019 17:51
Hey folks - I might actually pick this up again later in the year after a small break with different programming styles maybe..

But there will be lots more meshmemblock and memory management building to make this world even bigger.

and yes there will still be Perlin Noise to it..


Tier 1 Developer
puzzler2018
User Banned
Posted: 11th Mar 2019 22:21
Now we moving on to Studio - I just had a thought on Studio could handle this? any thoughts?
Tier 1 Developer
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 12th Mar 2019 01:13
So at the moment studio is just an ide.......it's identical to agk.
puzzler2018
User Banned
Posted: 12th Mar 2019 22:34
lol - I was thinking more on what Vulkhan can give us for this type of app
Tier 1 Developer
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 13th Mar 2019 09:45 Edited at: 13th Mar 2019 09:46
Ah I see. Well from what I've seen on YouTube, Vulcan apparently gives a 20-30% increase on glsl, but that I think is a newer glsl than AppGameKit has, so I'm hopefully for a bit of a boost ... but I wouldn't expect miracles.

In terms of 3d performance and tier 1, the core of agk is a restricting factor.....for example Preben significantly increased the speed that transparent and hidden objects were handled through optimisation, and that's key for agk.

For this though, how is that a hold up? I already showed agk can handle tens of thousands of blocks in 4k at 50 ish fps....are you having major frame rate issues? How memblocks are handled won't be impacted as they are nothing to do with the gpu, and as we dont have threading handling background generation of landscape and ai is also always going to be tough.

Don't you recall the original Minecraft, huge holes in the world, chunks not generating, people falling into nothing etc?

The new modern Microsoft version is super slick, and highly threaded process driven.
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 19:15
I have been messing with the 3D for some time now, and found indeed that even just using single faced planes( the ones blender creates) ... the more you use simply the more AppGameKit 2 slows down, totally not a poly count issue par say when it comes to speed,but obviously decimate the hell out of high poly counts!!

I had created a 3D Editor to place many grouped objects easily,and though it is still handy to place objects visually, it is the 'many' bit that I wont be doing under AppGameKit 2 as it stands! I am hoping this VULCAN thing improves this myself! This is strictly mobile type speed I am talking though!
Hail to the king, baby!
puzzler2018
User Banned
Posted: 18th Mar 2019 19:24 Edited at: 18th Mar 2019 19:25
Thanks - the reason why it slows down is because of the amount of "draw calls" the CPU sends to the GPU

a 10x10x10 chunk say is 1,000 objects, so 1,000 draw calls to the GPU in one sync frame

- we just need to build that chunk to a meshmemblock first so that it only sends 1 draw call

Hope that makes sense
Tier 1 Developer
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 20:35 Edited at: 18th Mar 2019 20:45
of course it does! this would be handy for my editor as i would be ultimately saving out and dealing with one object,as opposed to possibly hundreds!!
Right now I am using blender to simply sculpt my landscape for instance a golf sim:




This is fast because I am only dealing with 2 objects here, the ball and the whole landscape, previously I had done about the same level using separate objects in my editor,planes/trees and so on...
However every object I added, the more it slowed down on runtime, no matter how much I decimated the models in question, like the tree, and I had a giant rock.....!

I know what you are after here is minecraft and yeh,the only way for speed is what you suggest!
Essentially you want to be doing simply what blender does when I export the scene as a .obj file!
Another good reason is that you end up saving enough speed to add realtime shadows and the shaders that some people useI they really do make a game look more polished, and because of the use of only 2 objects, will be using realtime shadows in the above golf I hope!
Hail to the king, baby!
puzzler2018
User Banned
Posted: 18th Mar 2019 20:46
Sure - that looks like a promising app too.. we all like a bit of tactical golf these days.

yes - adding more and more tree and rock like structures will make FPS come down a few bars... thats all depends on the poly counts for each.. and adding Shadows will seriously decrement it too.

If you need something to start you going with meshmemblock then i can post a template.
Tier 1 Developer
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 20:53 Edited at: 18th Mar 2019 20:58
hmmm,how easy would it be to implement it into my engine though I wonder!!!
It would be very cool if it is easy, then yes please!!
btw, isnt all this only useful for static objects of course?!
But still very needy..
In minecraft you have to deal with the non static A.I!
Another headache, but I have been coding some A.I so not so bad when I realized it is better to increment through an array than using a loop!! as you get to hit the syncs() quicker!
Hail to the king, baby!
puzzler2018
User Banned
Posted: 18th Mar 2019 21:08
We will have to rebuild the mesh each time there is a change of an object - but if make the meshmemblock small enough, would have to be on a mesh grid system

Like



Where the red sqaure is the mesh the player is located on and any objects that move about say will be objects on that red sqaure that would be rebuild. when move around - then we just change the mesh to the land area of where the player is on the grid.

The golf ball will just stay as an AppGameKit object

Difficult isnt it

Ill try and put this theory into practice for you - but not jut now, in a few days ill provide some code to see it in action

What are your trees and rocks - are they OBJ files - cause you will need our OBJ importer too



Tier 1 Developer

Attachments

Login to view attachments
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 21:15 Edited at: 18th Mar 2019 21:20
yeh they are .obj,though the engine can also import .fbx for animated objects. And immediately loop plays the first layer upon placing them
I would think your system best suited for static objects and still would be awesome!!
So essentially a good way for me would be to place the objects as i do,in the editor, but then at runtime, just before the main loop, do the magic on all static objects to create a single one
then delete all the static objects used,of course this would require reloading of level after each run
Hail to the king, baby!
puzzler2018
User Banned
Posted: 18th Mar 2019 21:18
ok cool - ill take a look and have a think about that model... Do you have an example FBX file to have a play with..

Could you also possibly create your own thread regarding this, so its not upsetting this one too much. otherwise we all will just get confused eventually and then ill pick this up on that thread


Cheers


Tier 1 Developer
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 21:21 Edited at: 18th Mar 2019 21:24
be my guest!! tis your system

But thanks very much if you can help! I just wanted to solidify the facts about speed issues regarding 3D in general and after a solution myself!!
It would be so awesome if AppGameKit 2 had something similar to BSP!
Hail to the king, baby!
puzzler2018
User Banned
Posted: 18th Mar 2019 21:24 Edited at: 18th Mar 2019 21:26
Its not for me to create a thread for you about it - unless really want me to.

If you like - can take a look at https://forum.thegamecreators.com/thread/223640

I can continue this, there

Tier 1 Developer
shadey
9
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 18th Mar 2019 21:27
ok.i will follow that! tnx.
Hail to the king, baby!
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 19th Mar 2019 16:21 Edited at: 19th Mar 2019 16:23
Speed isn't just poly count, its draw calls. Been through this before. If you send 6000 objects to be drawn, each is transferred and processed individually. If you merge them into a single mesh, it's one draw call and will be hundreds, or even thousands of times faster.

That's how I had tens of thousands of cubes running so fast, and how I do vegetation.


puzzler2018
User Banned
Posted: 19th Mar 2019 17:53
Yeah i understand perfectly these days - it was more for Shadey



Code to produce that is



This will produce 1 draw call, instead of 58,081 draw calls



Tier 1 Developer

Attachments

Login to view attachments
Santman
7
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 19th Mar 2019 18:11 Edited at: 19th Mar 2019 18:13
Looking back through the thread a little, rocks and trees can all be combined to, where the same texture is used.

For example, just like the grass, every instance of a rock that uses a specific texture can be combined into a single memblock mesh, then all rocks are one draw call. And trees, and anything else that uses the same UV cords and textures.

In my project, the final build does just that, and will scan for duplicate items then combine them into a single mesh for speed. Memblocks, though larger, also load much faster then any model format, especially groups. Loading 80,000+ grass planes in a chunk of a world as one memblock mesh is infinitely faster than loading dozens of models. Plus you only need to assign the one image to the memblock, so that's easier to.

There are lots and lots of ways to get speed up, but a lot of it comes down to trial and error. For example another.....in shaders I've found texture look ups are very expensive, and link to the texture size. By holding two versions in memory, one full size texture and one much smaller one, then swapping between them beyond a certain distance, gave me about a 40%-60% speed boost, even with mip mapping.

3d is a difficult animal to balance just right. Lol.

Login to post a reply

Server time is: 2019-05-24 11:41:21
Your offset time is: 2019-05-24 11:41:21