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: 8th Feb 2018 17:55
Hows this?



puzzler2018
User Banned
Posted: 9th Feb 2018 20:32 Edited at: 9th Feb 2018 20:35
The only way this is acheivable is by using perlin noise to make a map infinite

can start with a 25x25 (sky viewable) grid - perlin noise it to raise the 625 3D cubes

no need to just have a 30x30x256 blocks below, thats just wasteful rendering.

when move forward - then just make the invisible blocks at the back of you and render in the front distance.

if move backward - then just make the front distance blocks invisible then move them to the back of the camera

have a huge 1000x1000 2D map and perlin noise that to start with.

if the player gets near the 1000x1000 edege - then roll map it on the larger map

Just a matter of getting perfect perlin noise

https://gpfault.net/posts/perlin-noise.txt.html

Tell me if any of you are getting bored of this lol
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 20:47 Edited at: 9th Feb 2018 20:48
Yeah......if you're still talking about Minecraft I think you may have gone a little off track now? You have to remember that Minecraft is a multi dimensional game......there are caves generated too....i cant see the applicstion of perlin noise there. Its world's are fixed algorithms built around a seed factor used to randomize certain elements. It's world is also rendered in chunks (early Notch versions showed that as you could literally see chunks generating...it really had to take off before it got better).

I think the solution is already presented - my example is the basis of a working Minecraft game, but single cubes want too many draw calls. I think the key is to merge groups of cubes into a single object of multiple meshes, as was alluded too. I looked at that quickly.....but I literally can't get memblocks meshes to work.
puzzler2018
User Banned
Posted: 9th Feb 2018 20:57
you mean like:-

plane(1,1) =6 sides ( making the cube)
plane(1,1) =6 sides ( making the cube)
plane(1,1) =6 sides ( making the cube)
plane(1,1) =6 sides ( making the cube)
plane(1,1) =6 sides ( making the cube)
plane(1,1) =6 sides ( making the cube)

join two cubes - scale it twice
join three cubes - scale it three times
etc

this is really getting complicated but i love the challenege


puzzler2018
User Banned
Posted: 9th Feb 2018 20:59
We can do something like that - the texturing for like the grass block willalways be the same, so can put a repeat

Minecraft has bioms - so will be areas with tuns of sand, grass, water, so what ever area the player is in - then the texture will 99% be the same to be able to do a repeat for the scaling
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 21:13
That's exactly it. The cubes don't have to be touching......they can be completely separate. From what I see, Minecraft makes a single object of all blocks of type A, then another of type B etc.....but actual I think using normals in a shader could work as well.

The biomes didn't actual overlap, there was a fairly distinct "line" between them.
puzzler2018
User Banned
Posted: 9th Feb 2018 21:16 Edited at: 9th Feb 2018 21:35
the only way for my experience in AppGameKit is to check every cube and any adjacent cubes are next to each other will have their intersecting faces invisible

and use fixobjecttoibject for the whole

Will this send the whole object (once fixedobjecttoobject) straight to the GPU in one go or will they still get sent individually?

Please enlighten me folks - am i on the right path thinking this - or do i really have to go into the memblocking stuff of which i might as well say Defeated!! next...

edit:

just tested with 2 cubes fixedobjecttoobject - still sends 24 polys- but just wondering if sends straight at once

Fantastic



184 K cubes here
GarBenjamin
AGK Developer
4
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 9th Feb 2018 21:35 Edited at: 9th Feb 2018 21:40
Don't stop yet. For some reason I have the impression you are on the edge of a breakthrough that will be very impressive.

If this is still going on when I finish my old school fps tutorial I will be happy to do some experimenting on things to help out.

EDIT: Also doing this kind of optimization (your FixObjectToObject, etc) to join geometry and textures seems like it would make more sense for TGC to implement behind the scenes or at least offer via a method. Just a thought there. May be worth asking them for their thoughts on what they could provide in the lower level (and much faster codebase) to help you.
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 Banned
Posted: 9th Feb 2018 21:39
Thank you

FixObjecttoObejct all the way

Awesome.... Thanks Paul for providing this command
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 22:04
Fixobjecttoobject won't send them all as a single object I don't think - I tried that and it didn;t make a difference. I think you need to physically build the object using memblocks. I am looking at that now (it would be pretty quick in thoery) but I literallly can't follow the instructions. Images are easy enough but even creating a single cube and trying to read it as an object to add more vertex's is getting nowhere.

Anyone get anywhere with reading a mesh as alterable data from a memblock?
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 22:08
Nope, zero difference to frame rate fixing the objects together. Pretty sure fixobjecttoobject just makes them relative....so for example you could load an empty house object, then lots of individual furniture objects and fix them to the house object. After that rotating the house would move and maintain the relative positions of all the internal objects. But AppGameKit is just doing that internally and then drawing them normally....so it may actually be slightly slower depending on the number of objects.
puzzler2018
User Banned
Posted: 9th Feb 2018 22:13
Thanks for checking..

Where is my drawing pad and pen!! lol

Keep going....

If Notch is worth billions then im sure we can be once mastered the objective - cause will be very useful all this learning experience
GarBenjamin
AGK Developer
4
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 9th Feb 2018 22:26 Edited at: 9th Feb 2018 22:27
Yeah I figured FixObjectToObject is just doing parenting not actual mesh combining.

If they added a CombineFixedObjects(parentObjectID) that would likely be much faster than anything written in AppGameKit BASIC using MemBlocks.
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 Banned
Posted: 9th Feb 2018 22:34
Whats this mesh combing i keep hearing going to do for us

is it like having a 6 planes at 1 x 1 and adding to make 2 x 1 and using imageu / imagev wrapping

does this meshing allows to add and change vertexes or image manipulations?

Cause can do it all using columns?
puzzler2018
User Banned
Posted: 9th Feb 2018 22:46
I think a little research on really how its done

https://tomcc.github.io/2014/08/31/visibility-1.html
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 22:59
This video shows the objects being added only as they are needed:


There is a command in AppGameKit to add a mesh to an object, and it seems to work....but then I'm not sure if you can offset one mesh from another. It's also INCREDIBLY slow (not saying that's AGKs fault, but the process as we have it is very slow).
puzzler2018
User Banned
Posted: 9th Feb 2018 23:03
I think we need a culling frustum technique in front and below us as well

say in a radius of say 10 blocks in front and 3 blocks below and all behind the camera - this will excite the FPS no end

Shall do some programming over weekend and see what i come up with

Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 23:03
Had a look at your link......threaded calculation. That's this dead in the water then. Lol.
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 23:04
It's not Frustrum culling - that's built in and doesn't draw what isn;t on the screen. I think what you are thinking of is occlusion culling - where nothing behind a solid object is drawn as it can;t be seen. Running that on thousands of blocks would be system heavy too.
puzzler2018
User Banned
Posted: 9th Feb 2018 23:05 Edited at: 9th Feb 2018 23:06
threaded comes with the joys of C - this is AppGameKit but wont be exactly the same but near as dam it

ive killed my GPU a few times wth this project - happy dayslol
puzzler2018
User Banned
Posted: 9th Feb 2018 23:13
Think i might try an image builder of perlin noise and set the heights on the level of detail in the image this weekend

Doing this, will have a 2d map to be able to display in the top corner of screen.


I feel its all about image perlin map
puzzler2018
User Banned
Posted: 9th Feb 2018 23:27
Will be based on a seed number that generates with that seed number

so giving seed number 1029 eg. will produce the same image

Time to work harder than before

after this, things will fall into place
puzzler2018
User Banned
Posted: 9th Feb 2018 23:38 Edited at: 9th Feb 2018 23:39
As it occured to anyone why minecraft is 256 blocks in height...

255+that 0 colours in any possible RGB

Way to go
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Feb 2018 23:39
Ok, so I got it to merge all the meshes together into one massive, single block (it's crazy how long it takes....138 seconds!!!) and it went from 55 fps to......75 fps (untextured - you need to be patient, I was showing how long it took to add the meshes together). So it's not draw calls in terms of the number of objects as in this final demo there is literally only 1 object!!!

I think it's time to settle and say that AppGameKit just doesn;t have the oomf to actually deliver mainstream 3D performance in the realms of Minecraft (or certainly, not without T2 levels of control)....which by the way I get 100fps at 4K on max settings which is a view range substantially greater than this.

Unless the experts can see another, better way?



P.S. not sure if it's AppGameKit or not, but everytime I start playing with object memblocks my PC starts staggering and freezing even when not using AGK. This has literally only started since I did this. Has anyone else noticed this?
puzzler2018
User Banned
Posted: 9th Feb 2018 23:42
Still time my good fellow... Keep going on different techniques
puzzler2018
User Banned
Posted: 9th Feb 2018 23:59
it all starts like this


puzzler2018
User Banned
Posted: 10th Feb 2018 00:21
ive got a flabbergasted gut that this will do the trick

Catch up soon

puzzler2018
User Banned
Posted: 10th Feb 2018 00:33
try and convert these then blessings are within us



be back soon
blink0k
Moderator
8
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Feb 2018 00:57
I know that @Phaelax has a vector math library for teir 1 around somewhere. Just can't find it atm. Maybe you could message him
puzzler2018
User Banned
Posted: 10th Feb 2018 17:07
Ok - this is not perlin, its just a nice gradient using a draw box function - but it still gives me the terrain building structured from an image
so that when perlin is established cause need to be a mathematician for that--cant get my head round perlin at the moment




More to come,cause the terrain is only seeing 40x40 but the image is 128x128,so can roll.

That be next


Enjoy
puzzler2018
User Banned
Posted: 10th Feb 2018 17:32
Image loading and building optimsed



Catch up in a few days
puzzler2018
User Banned
Posted: 10th Feb 2018 19:18
Added a map in top corner with a player location



Enjoy for now!
GarBenjamin
AGK Developer
4
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Feb 2018 00:35
Maybe a great test would be to just build a model (I mean using Blender, etc) representing the same scale of world load it in and move around that with arrow keys.... that would show us the likely max we can achieve. If for some reason a single object model can represent the same number of cubes and run at 200 fps then we know something else is going on. Maybe?
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 Banned
Posted: 11th Feb 2018 00:54 Edited at: 11th Feb 2018 00:56
Agreed - but minecraft is procedurally generated,and I hate blender..im not into modelling - if can perform the same with procedural/no media then im good with that



Notch had about 5 techniques of his own culling algorithms and im trying to find them

ive found 2 already

remember the 3 sided visible
puzzler2018
User Banned
Posted: 11th Feb 2018 01:08
if we have to get into modelling - just for a basic cube which agk provides with planes then it defeats the purpose

how about generating a map with a seed number... we cannot make a model for every single possible seed

its procedural
puzzler2018
User Banned
Posted: 11th Feb 2018 01:17 Edited at: 11th Feb 2018 01:20
others talk about meshing objects together but hear this but dont see how as if its FBI kind of coding.

Is this meshing malarky top secret or something

If not advising, then I will figure all this out my own way and im on the right track with what i got so far

i feel meshing objects together in every sync.... thinking of add and removing. will be lots of processor / gpu time

ps... thats why Notch is now worth billions

and we are here to find out how it works

keep going..

puzzler2018
User Banned
Posted: 11th Feb 2018 01:24
If you lot wanna adapt to that code with meshing and external objects then fill your boots - good luck with it
puzzler2018
User Banned
Posted: 11th Feb 2018 01:34
I have seen already how to procedually generate a OBJ file - and quite a big 2D map - but that obj file is 30mb

now, why waste processing time procedurally generating the object file to load it back in as a proper object and using up valuable space too - just doesnt make sense

if we create a cube in blender or whatever - we still going to have 10+K obj cubes to work with as each object is its own instance.

Now, if that wasnt the case - 1 cube = 1000000 cubes then we be all be happy - but thats not the case, so we got to work with what we have.


GarBenjamin
AGK Developer
4
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Feb 2018 01:39
Yeah I was just thinking from the perspective of if one built a model representing the same world outside of AGK2 then just loaded it in and displayed it that would probably represent the max running speed.

But it would also be a ton of work to make the model. lol

I suppose all that is needed is to simple find a model that has approximately the same number of vertices and faces. Again i was only thinking of it from the perspective of finding the max / the limit in AGK2.

I will say there is a large thread on the Unity forums on this same thing. Where they started out with array of cubes and found it very slow and through iterations and discussion they kept improving it. I suppose that thread may have some good stuff in it that would be useful perhaps. Mainly I just wanted to share they had the same issue... tried the cube array and was way too slow.
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 Banned
Posted: 11th Feb 2018 01:43
instead of culling on the back of the camera - they need to make dissapear everything else in view. fronts/backs/lefts/rights of a cube and for every cube

think of it like a lighthouse sine and cosine light torch - anything thats in that torch light is viewed - everything is invisible.

complicated but will get there
puzzler2018
User Banned
Posted: 11th Feb 2018 01:45
we tried many weeks ago and fps was down to 0 nearly.. we are aiming high all the time here
puzzler2018
User Banned
Posted: 11th Feb 2018 01:47 Edited at: 11th Feb 2018 01:48
Just takes time and different ways of developing

notch didnt build it within a few week

edit

and i wont stop till i feel happy that it resembles minecraft as the request as been given by Xaby
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 02:00
I did that. You can use the command to add an object mesh to am object to merge the cubes.....you just have to offset the vertex positions. It went from 55 to 75 fps, and that was still only 4500 cubes or there abouts.

There is a flood fill culling system that is done threaded these days.....that's why Minecraft looks great now, but once upon a time you could see chunks render. But using the mesh method is silly slow. You could do it really fast using a memblock, if you knew enough to write it.
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 02:06
Oh btw.....in my example that's a cube model, which has shared vertices per side So according to the milkshape object information it has 12 vertices. When loaded I to agk, if I'm using the memblock command properly, it seems to break this and increase that number to 24. Maybe just one or other is mis reporting or I'm reading it wrong, but the internal cube for agk is the same as the model.

I'd look into making a mesh using memblocks if possible.

BUT......Once you merge cubes, texturing them is almost impossible - using uv doesn't work, I tried. Object collision also won't work, as it's essential one massive object and we don't have per mesh collision detection (or do we??)

You're really biting off a huge chunk here! Lol
puzzler2018
User Banned
Posted: 11th Feb 2018 02:06
what commands are these please
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 02:07
It's in the help file. Look up mem blocks.
puzzler2018
User Banned
Posted: 11th Feb 2018 02:09
this is what i mean - repeat image wrapping is fine for one directional objects - but once we start fixing objects to the left or right. like an L shape cube then it starts to get messy

I dont think notch did it this way

He did it by invibualising faces that are not in direct view to the player/camera
puzzler2018
User Banned
Posted: 11th Feb 2018 02:12
i think with meshing objects together is work that doesnt need to be done and that poor CPU/GPU must be going crazy shouting please stop giving me all these instructuctions lol
Santman
9
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 02:15
You could texture them with a shader. Just draw the texture from an atlas based on the mesh normals.

Probably.
puzzler2018
User Banned
Posted: 11th Feb 2018 02:17
Very much so - shaders way to go and let the GPU fry - ill have to reserch and learn those PS and VS scripts but not at moment

Login to post a reply

Server time is: 2021-03-05 10:42:40
Your offset time is: 2021-03-05 10:42:40