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: 13th Jan 2019 15:49
Added an Add cube to the mesh



Left mouse click

BUt the coords to where the pointer is are just not correct and need time to work that out
puzzler2018
User Banned
Posted: 13th Jan 2019 19:07 Edited at: 13th Jan 2019 19:08
How does this look for everyone

FPS, Render Distance etc etc

Does it blow your systems up at all?



Shall work out the coordinate system within the next few days to be able o identify which blocks to add and remove.

Just moving around at the moment.

Attachments

Login to view attachments
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 14th Jan 2019 04:21 Edited at: 14th Jan 2019 04:36
Well, We kind of needed AppGameKit 3d physic calculation even if it is bloated...
But that is alot of chunk and cube... tempting to try custom physic...
Need to look at the source...
Perhaps there is a way to inject a physic engine like havok.

Then again, there is a cheap way to do physical for all object using setposition instead...
puzzler2018
User Banned
Posted: 14th Jan 2019 10:01
Hi. For meshmemblick chunks with 16x16x16 will be just 1 agk object for my version. So physics would only work on those chunks instead of cubes..

. Unless your thinking this for your tier 2 version.

Keep at it
puzzler2018
User Banned
Posted: 14th Jan 2019 18:16
Identifying World Coordinate experiments on a 64 x64 chunk



Left clilck to Add cube at the moment and selected area

Shall continue to experiment with removals and height organising


Use the texture i posted a bit back

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Jan 2019 20:26
works well
fubar
Kakise
AGK Tool Maker
7
Years of Service
User Offline
Joined: 25th May 2016
Location: Paris
Posted: 14th Jan 2019 21:18
That's a really cool program ! Works well here
PCG Lover
Using AppGameKit Tier 1&2

My creations:

[Tier 1 PLUGIN] Wave Function Collapse for Tier 1
puzzler2018
User Banned
Posted: 15th Jan 2019 12:36
Thanks both.. Will do more later today on the removals if I can find the mesh vertexes correctly

Must admit, the code is much cleaner than any of done previously and will try and keep it that way too.
puzzler2018
User Banned
Posted: 15th Jan 2019 18:08
Niiiiccceeee - Removal blocks here we come, just does 1 height level at moment - its just to get the coord vertex numbers in order




Left click to add
Right click to remove

Come back soon with more developments on better height organisation
puzzler2018
User Banned
Posted: 15th Jan 2019 18:40 Edited at: 15th Jan 2019 18:50
A little brain teaser,

ok, here is my crazy method to get the X and Z coords of where we are on the mesh to idenfity the block at hand



Doing this, the Y gives incorrectness to what we need - it gives the coord of the screen to where the mouse is on the screen

But we really need to have back is

global collisiondata as _CollisionData[size,size,size]

so it as the Y addresses for the chunk to decide if a block is Air or Empty

instead of the way its working now by

global collisiondata as _CollisionData[size,size]

But the Y in the function about wont bring in the data for the Y in the array

Time to have a think...



EDIT -- I have added the 3 Dimensions back in - for X,Y,Z coords



Still works for add and remove but only on the first layer until got the screen vector for Y worked out
puzzler2018
User Banned
Posted: 15th Jan 2019 19:39 Edited at: 15th Jan 2019 19:51
I think its staring right at me

We can get the height from the Mesh VertexList Y array data of the particular X, Z cube location



Will code something up later to make that happen but for now its time to chill with YouTube and rest my weary bones

Catch up soon

EDIT--PS.. after thinking.... Dammm this is tough to work out for a novice,, We will get there though....
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Jan 2019 00:00
The adding and removing is getting there and works well
I think this is a better method than you first tried
fubar
puzzler2018
User Banned
Posted: 16th Jan 2019 09:30 Edited at: 16th Jan 2019 09:41
So we know x and z so to find the vertex index in the array to find a cube will be

Vindex = ( (Z * 36) * chunkwidth) + ( x * 36)

Y = meshid. Vertexlist[ Vindex]. Y

Or make our own bounding boxes for each cube and use a collision technique with that bounding box data....

Interesting
puzzler2018
User Banned
Posted: 16th Jan 2019 19:51 Edited at: 16th Jan 2019 19:52
It seemed pretty straight forward to get the Y






Tidying up to do and bits and peices on the chunk. Like expanding and varying the chunk size Y to say 256 --

eg

X-32 - Y-256 - Z=32

and generation of chunks under the ground to still tidy up too, just not 100%, but getting there now
puzzler2018
User Banned
Posted: 16th Jan 2019 20:18 Edited at: 16th Jan 2019 20:19
Fixed the underground development



Enjoy - catch up soon

EDIT-Its amazing when one has a break from something...
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 16th Jan 2019 20:24
Quote: "EDIT-Its amazing when one has a break from something..."


You nearly got it !!
I'm not a grumpy grandpa
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 17th Jan 2019 07:22

Do you have a tier 1 function for calculate total vertex from meshmemblock?

It felt like agk is missing a function called GetMeshMemblockVertexCount();

I am going to look at the counting the byte.
puzzler2018
User Banned
Posted: 17th Jan 2019 07:49
You can get the vertex count by using

Getmemblockint ( meshmemblock, 0)

))
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 17th Jan 2019 10:24
I mean I need the inputting vertex value to key in that specific value before turning it into an object, lol...
Is this why you use a type to store the amount of vertex?

basically, I think what you are doing is this? https://answers.unity.com/questions/764334/how-to-combine-multiple-meshes-into-a-single-mesh.html

What I am doing is specific to that.

Mainly because I just loaded a very very high polygon object, and I am still getting over 2k fps...

we are starting to think we should just make a chunk object with 1024 * 16 * 16 cube worth of polygon and use smart mesh id system to turn it off...
But mesh id is base on material id...
puzzler2018
User Banned
Posted: 17th Jan 2019 11:05
Awesome idea there to have 1 huge polygon box the size of 16*1024*16,assume then to break into it by a greedy algorithm or octree methods to add new vextexes to resemble cubes into that massive chunk

Am I right in thinking that's what you mean your trying to do

The mesh build function I use. Use vertexlist array yes and add 3 vertex commands, to indeed add at least a triangle

I'll have a think about your idea
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 17th Jan 2019 11:53
I think pulling vertex's upward and downward for adding/removing blocks might be the go (as I believe you've demonstrated)
just need to adjust the uv's of each blocks texturing for each raise/lowering of blocks.

Think that may be the fastest most efficient
fubar
puzzler2018
User Banned
Posted: 17th Jan 2019 12:46
hmm interesting - the way im interpreting this is

So if we have a massive cube (the chunk).. at 16x1024x16 - been one 24 vertex cube primitive - FPS will be a WOW! cause only showing 1 cube but...

if we say add a cube in the centre at the top of the chunk. We really do need to add 24 new vertexes instead of pulling from vertexes underneath - cause 1 cubes 24 vertices just makes that 1 chunk cube - there is no way we can split it up.

What if we say we add 5 cubes on top of each other then yeah we could scale up the cube to make it go higher, but what if we remove the middle cube of that 5, we will need a technique to resolve that. things will start to get a little more challenging to manage.

Im sure it will be good to try the method one day and will need some think time on how that's best achieved.

and what if we start the world with like a perlin noise structure. we still going to have those cubes at different heights anyway, think this method will be quite challenging and not sure if it will be high processing


I shall keep going on the method im currently working with and see how it goes.

Tonight will make the cubes have no sharing faces attached to them - this will reduce the vertex count and increase the FPS (a little)








Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 17th Jan 2019 15:00
Like another game, player will be able to mod it by writing a txt with vertex data.
This allow unique mod or something.

Also, without bone and animation data in a cube, it speed up the program alot!

Tried 100 100k polygon object and got 60 fps.
Gonna try a 10m polygon object.
puzzler2018
User Banned
Posted: 17th Jan 2019 15:14
Great stuff. You will have to share some code as it would be interesting to see how your managing it too on tier 1 I assume...

Tier 2 for me won't happen. My knowledge is rubbish with c++... Which I'm sure around 50 % of members viewing the thread also same. But good to have tier 2 version too I'm sure.

I aim to get this app finished one day. So then can let TGC have a look to add to their collections for new tier 1 beginners that arrive in the agk scene

Keep at it....
puzzler2018
User Banned
Posted: 17th Jan 2019 17:17
puzzler2018
User Banned
Posted: 17th Jan 2019 22:20 Edited at: 17th Jan 2019 22:23
So from that above link giving you various methods - which one do we prefer

- Stupid - really dont know why thats on there

- Cull

- Greedy

- Monotone

Who is in favour of which algorythm?

Or maybe you have your own?

Once we got a little feedback - Ill work hard to work out that algorythm - my mind is going to blow up now - so catch up soon
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 17th Jan 2019 22:26
Greedy is easier to generate for voxels faster to calculate and UV's are also easier with Greedy meshing.
But a whole new story for complex models.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 18th Jan 2019 06:17 Edited at: 18th Jan 2019 06:18
admittedly my moving the block around sucks
but if you try it
press L to load an image
then E to extrude which will make a height map of single blocks
a/z arrows moves camera
move mouse to select a cube and left click it raises it lol I set that to 100 atm cos not sure why the mouse is off
but it gives you an idea of another method where one block may be any height




PS theres redundant code in there like save etc but thought ide leave it for now
fubar
puzzler2018
User Banned
Posted: 18th Jan 2019 07:13
Thanks Janbo and Fubarpk - ill take a look later today
puzzler2018
User Banned
Posted: 18th Jan 2019 17:45 Edited at: 18th Jan 2019 17:47
One week WOW!



Source code C++ https://github.com/Hopson97/MineCraft-One-Week-Challenge - no copying - just for ideas only....A major challenge wouldnt be a challenge otherwise

Game itself https://drive.google.com/file/d/0B-bhEaACRE65WF8ydkROS1hEMTg/view

Time to review this Hopsons97 C++ code and see how he does it and maybe convert the idea to Tier 1
puzzler2018
User Banned
Posted: 19th Jan 2019 14:11 Edited at: 19th Jan 2019 14:15
Been working on the camera / character controller and collision detections

I think we good for X and Z



Just need to fine tune it a bit more and work on the Y - so camera falls to the block below and a Space to jump to a block on top - this will come next

puzzler2018
User Banned
Posted: 19th Jan 2019 18:14 Edited at: 19th Jan 2019 18:34
Dannnng Puzzler - Wake Up



AGK Object Collision on a mesh

Just as simple as that


Ray Casts - Who is Ray anyway apart from identifying a distance change from a start and end point, doesnt have to be purely an AppGameKit object. the start and end points have been broken by a cast and then find out where that
point is and get the individual getobjectx,getobjecty,getobjectz of the final position - Thanks Ray ! you do me so proud. LMAO


Dam and blast!!

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 19th Jan 2019 18:49
Adding cube properly now - even if you hit a side. a new cube goes on the side


Enjoy

Catch up soon with this.
puzzler2018
User Banned
Posted: 20th Jan 2019 15:48 Edited at: 20th Jan 2019 16:00
Hi its pest again lol

Thanks Furbarpk for the Ray Casting idea and how it works.

Here is collsion on a mesh using Ray collisions also using a 6 object collision around the camera / player

Have a go, see if we can break it



Cursors to move about on the mesh

W and D to fly up and down

It will always force you back down to the floor - so a nice movement with cursors and W will give a nice jumping effect

Now... I must get back to Lemmings lol
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 20:18
Works quite fast too
fubar
puzzler2018
User Banned
Posted: 21st Jan 2019 14:57
Thanks.

Can put it onto your snippets one when I've got the rotational thing working with it to.

Like move the mouse left right and keep hold of the up key to go forward and moves where the mouse direction is pointing to. I've seen some techniques on how to do that but kcollisions then misbehaves

puzzler2018
User Banned
Posted: 23rd Jan 2019 18:48
Some hand made trees



No media
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Jan 2019 19:37
great trees
fubar
puzzler2018
User Banned
Posted: 23rd Jan 2019 19:52 Edited at: 23rd Jan 2019 19:53
Thanks

I thought it was about time we started on the back face culling



Here is a starter for the X and Z directions

I purposely made the the top not show - so can see the results better

Shall carry on with this soon as its just not 100% yet
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Jan 2019 20:19
Hey ...that looks really nice! . Some wall are invisible you won't find the end !
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 23rd Jan 2019 20:33
Thanks - I know its a mess at moment

Here is one that where it creates smaller cubes above the main mesh - so we can see what we trying to aheive



Come back to this soon to resolve it
puzzler2018
User Banned
Posted: 23rd Jan 2019 20:39
Think reverse - maybe turn off all faces and turn on ones we need where there is an active box

something like this



Just needs the tops putting on lol
puzzler2018
User Banned
Posted: 24th Jan 2019 12:23
I have quickly put together some pseudo type of code which I think will work - done it for all X , Y and Z



Shall implement it over the weekend
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 24th Jan 2019 14:31 Edited at: 24th Jan 2019 14:44
Puzzler2018,

This is all amazing stuff.

In minecraft you can destroy the environment. Have you worked out anything so like that so far? For instance destroying blocks to build an underground bunker. I am wondering how would one find the vertex data for the block? Sorry if you have already mentioned that, I may have missed it.

Found it. That is great stuff. Very neat.
puzzler2018
User Banned
Posted: 24th Jan 2019 14:59
Thanks. By all means keep coming by for latest updates. I'm always fond to keep posting any updates I do even if they don't work well. But always crack it in time. You may notice its been a yearly project
Lots of hard work and dedication

Lots more to do though.
puzzler2018
User Banned
Posted: 24th Jan 2019 18:54
Bugga it - whilst i still got it on my mind, I built a culling debugging system

Have a go, see what you think.



print ("Press Space to spin")
print ("Press C to cull on or off")
print ("Press R to minis on or off")
print ("Press T to make TOP and outside faces on or off - so can see results better")

Be good for debugging purposes, I think the Pseudo I did worked a treat, but will only know this with a few others seeing if its correct



Catch up soon - Lemmings now..
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jan 2019 04:35
Thought you may be interested
https://www.voxedit.io
fubar
puzzler2018
User Banned
Posted: 28th Jan 2019 07:52
Thanks. Had a quick look and definabately worth a deeper look to create own voxel objects hopefully export to Obj too. A bit like adding own stuff like *modding* and indeed create some for the app too.

Will take a look on Friday after lenmings
puzzler2018
User Banned
Posted: 29th Jan 2019 17:43
That is some really nice software

puzzler2018
User Banned
Posted: 29th Jan 2019 22:44 Edited at: 29th Jan 2019 22:54
Wow, 17,300+ views but only me posting snippets, I can allow people to post you know..LOL

This thread must be very enlightening to lots of you,

Peeps - stop hiding behind a screen and keyboard and come forth of any ideas on making this a good AppGameKit app

I will continue this on Weekends

Login to post a reply

Server time is: 2024-03-28 16:48:45
Your offset time is: 2024-03-28 16:48:45