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
Derek Darkly
9
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 15th Feb 2018 19:19

Here's one coded in DBP, not AppGameKit, but could be of some help:

https://forum.thegamecreators.com/thread/187219
Send your parents to noisy sprite demo hell... enter the D-Zone
puzzler2018
User Banned
Posted: 15th Feb 2018 19:23
Thanks for that - i remember perusing a long while ago and couldnt play it cause it was trying to find some dark basic dll's - so that tells me that i need to have dark basic pro installed to run

but i will check the code out anyway

Thanks
puzzler2018
User Banned
Posted: 15th Feb 2018 19:53
The starting of going underground - making sure that we get the chunk array sorted, i think it works - got 7 levels in place, but got to reduce the x and y down a bit to make levels otherwise memory problems occur

so starting with 16x16x7 chunk to start with



This is just to see if it works at the moment, I will work harder on it this bit over the weekend to bounce it back up to a decent distance on ground level
puzzler2018
User Banned
Posted: 15th Feb 2018 20:16 Edited at: 15th Feb 2018 20:17
Maaagggiiiiccccc!!

A 20x20x20 cubeoid but it randomises so it doesnt effective create the full 20x20x20 only do half ish - go on have a go and delete a block and explore



Ultimately its there but got lots of work on it to do, so for now

Enjoy! and Keep going.

Catch up tomorrow
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 20:18 Edited at: 12th Apr 2018 21:39
I agree with the optimizations I often just copy paste edit code like that and refine later

I have had a play with the improving player movement



and the following added function


but it didnt work as I expected
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 20:21
Cool - cheers - yeah that camera movement is not heading with the mouse - i think its all in the shiftmap area., cause the map is either going

if GetRawKeyState(40) then shiftmap(0,-camerastep#) //key down
if GetRawKeyState(38) then shiftmap(0,camerastep#) //key up
if GetRawKeyState(39) then shiftmap(camerastep#,0) //key right
if GetRawKeyState(37) then shiftmap(-camerastep#,0) //key left


If we can work out the angle the camera is facing and change the x/y in the shift map coords then we will have it

Ill have a think
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 20:22
The underground works well
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 20:36 Edited at: 15th Feb 2018 20:37
Cheers - managed to get it up to 50x50x50 but FPS is wildly slow as we can imagine

Change



So now we have to implement occlusion and a bit more frustum to help the GPU and convert the cubes to individual 6 planes and only view 3 planes with setobjectcullmode on

and set every single cube out of cameras view to invisible.

Thats the challenge for weekend

puzzler2018
User Banned
Posted: 15th Feb 2018 20:49
16x16x256 easily with 160-180 fps on mine

reduce that 9 to have more in the cave
puzzler2018
User Banned
Posted: 15th Feb 2018 21:03
For loading and saving - i would go by saving the chunk in binary bits

x and y if 16 x 16 - 16 bits = 2 characters = 11111111 11111111 - where there is a 1 will be a block

so the above will write 255, 255

then we * is by Y - 16

and then depth - 256

so equals 8192kb data and then work how to save the texture id for each too.

But this is something to think about in a week or 2



fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 21:07 Edited at: 12th Apr 2018 21:39
That's great

I added the mouse Over back to checkkeypresses() function
as I find it hard to know which piece its over as the mouse is not
accurate enough. but the oldObj need to be global or passed



Not sure if you liked the effect or if it just wasn't put back yet
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 21:09 Edited at: 15th Feb 2018 21:17
This effect would be really great - yeah cause without it - it can be tormentive to the player - cause might hit the wrong block cause just ever slightly out of line

so yeah cheers

with how we developed it an call getkeypresses fnction just soley calling just for that, it will need to be global iinstead of passed

but then we got mySelectedObj in there.. so could we use that instead within the getkeypresses function

EDIT - I been thinking more along the lines of adjusting the Alpha of each block when hit it - 0-255 reduced down to 0 = delete block

and the steps to reduce it down depends on a damage percentage, just an idea - its a subtle difference to real minecraft but think would work well
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 21:19 Edited at: 15th Feb 2018 21:23
Like you said before so many things that could be done with the code

Even a primitive 3d sculpter, i have read something about joining objects in here
just so many posibilities that i am very gald that theres a forum alive with the topic of minecraft

yes saving and loading would be a great addition but all in time

Yes I agree reducing to alpha on a timer to nothing then deleting the object is much better
should also be less resource hungry. I'm getting about 160 FPS it starts off lower then increases
back up where it sits somewhere between 120 and 160
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 21:23
I have a thread of object joining and primitives creations if you care to have a look

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

This is always updated - but minecraft came along lol
Sph!nx
12
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 15th Feb 2018 21:23
Man, you guys are machines.. Relentless coding machines. Keep it up!
Regards Sph!nx
puzzler2018
User Banned
Posted: 15th Feb 2018 21:25
Thanks - hope you like what you see so far
puzzler2018
User Banned
Posted: 15th Feb 2018 21:38
The FPS is horrible when in caveland - this will be fixed by end weekend hopefully with various techniques of culling and invisibilising things
puzzler2018
User Banned
Posted: 15th Feb 2018 22:12
last update for tonight - getting tired



fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 22:18 Edited at: 12th Apr 2018 21:40
puzzler I beleive the object delete can be done like



where the object is clicked for deletion add

DeleteObj=mySelection
LevelTime#=timer()

add this to the main loop to be constantly called so you dont have to wait to clik or move the camera
fadeOutObjectAndDelete(DeleteObj)

and also needed
global LevelTime#:LevelTime#=timer()
global Alpha=150 //set to alpha as it has to start at the same as what the mouseover selection is

Not sure what you think and the problem at the moment while it is marked for deletion you can
select another object which is fine but it upsets the object color sets the mouse over does. Perhaps
just making it faster or some other method il let you decide if you like it or not
fubar
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 22:23
WOW the map has gotten huge and still keeping good frame rate PUZZLER
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 22:26
It looks like you have set Alpha as a global and not attached it into the Type of the chunk object


But this reaches another wall - how we grab the ObjID memory reference to a chunk[x,y,z] to be able to reduce its alpha

chunk[1,2,3].alpha

This will make the individual object different to the rest

Errrrmmmm memory relapse


puzzler2018
User Banned
Posted: 15th Feb 2018 22:29
Maybe identifying the ObjID getobjectx, getobjecty, getobjectz and seeing what chunk lives there with a quick 3 for loop session

puzzler2018
User Banned
Posted: 15th Feb 2018 22:52 Edited at: 15th Feb 2018 23:04
eg



only run in the left clicking or hitting otherwise it will be a FPS crawler

This could be used for a debug window session too to identify where in the world we are lol
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 23:04 Edited at: 12th Apr 2018 21:40
Quote: "how we grab the ObjID memory reference to a chunk[x,y,z] to be able to reduce its alpha
"

this has already been achieved with mySelection=Click3dObject()

I went back to the previous code i posted to play with it. The problems with so many versions but i
just wanted to have a play and see what it worked like didnt really think posting all the code again was
a good ide so just explained the differences

but its working and its as if it was marked for deletion

Quote: "It looks like you have set Alpha as a global and not attached it into the Type of the chunk object"

yes it is global and easier in development to set it this way. Global variables also work well in AppGameKit i saw a speed
test done where passing lots of variables was infact slower with the example code given than using Global variables



The above is the full code I used to test the fade object with
Copy and paste is my friend LOL but problem is commenting out versions that have
blocks of code commented out already.

But i think you have done a wonderful job and this forum really is a great place as more minds
can make a difficult problem easiier and reachable
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 23:05
you get the mySelection memory address only for the object, but not the chunk array positions
puzzler2018
User Banned
Posted: 15th Feb 2018 23:10 Edited at: 15th Feb 2018 23:13
Globals - all functions sees the address.

Local addresses - only functions sees the addresses

#constants are variables that never need to be changed - seen all over

and your most welcome - i love to share knowledge.. more knowledge makes us better programmers.

even the simplest of things cause there are member on here are way into shaders and such like - wayyyy to advanced for me at the moment

but thanks for everyone that has made a comment
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 23:17
Quote: "you get the mySelection memory address only for the object, but not the chunk array positions"

Correct

not really sure if its better to store all of the array positions again but that's an idea another variable selection of type _chunk could
be used that would be better than using getObjectX,getobjectY,texture etc and would probably work allot better even being global

fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 23:22
we dont really have to be inundated with loads of arrays all over the place - memory consuption

unless we have an objID on the chunk type array which is the memory address and work out how to do a fast lookup for the chunk[x,y,z].objid = objid

There is lots of different flavours of doing things - but this needs to be eventually optimised to the works.

Minecraft is full of bugs, glitches, optimisation is dreadful

So lets make it the best
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 23:23
Quote: "Globals - all functions sees the address.

Local addresses - only functions sees the addresses"


Yep but AppGameKit isn't as efficient at parameter passing as C I was just as surprised to see speed comparisons
that showed global variables in the example given considerably faster I will have to find that post. I was always taught
that globals were something to be refrained from.
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 23:25
We got taught wrong from school/college/uni - we only learn by practice, best practices come from time, knowledge and experience,
puzzler2018
User Banned
Posted: 15th Feb 2018 23:34
Back to minecraft

the next idea is having 4 planes (16x16x128) which lives on the outside of the chunk surrounding the underground outskirts textured on repeat uv mapping - this will take away the white open spaces and look also like its infinite.

Will do this tomorrow

Sleep...


fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 15th Feb 2018 23:40 Edited at: 15th Feb 2018 23:41
Quote: "unless we have an objID on the chunk type array which is the memory address and work out how to do a fast lookup for the chunk[x,y,z].objid = objid"


I Personally Feel one selection variable of type _chunk this would have x#,y#,z#, id,texture etc This should work well, Although we cant pass a pointer to the variable
only the individual we would only need one look up method. That would work for deletion an object and moving it maybe another to store the old values, This would
keep code readable for beginers and would stop allot of checks that get done looking up if the objectExists multiple times etc. There probably is a much faster way
i just dont know it. Still very much learning as I think most of us are when we stop learning i think we die lol

SLEEP WELL
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 23:43
bless you = thanks for been apart of this
puzzler2018
User Banned
Posted: 15th Feb 2018 23:45 Edited at: 15th Feb 2018 23:50
To me, if we can make a minecraft (a multi million pound investment) then we are more than capable of making anything with the right keys to things

More we learn - more we earn

Look after our mentors - giving them plenty of coffee

Have a goal to finish something

Have a passion too helps

Learn well and things will fall into place and we will all be reeling off programming like 2nd nature language

Its big bucks out there in this field, so learn well and dont stop
puzzler2018
User Banned
Posted: 16th Feb 2018 07:26
A new day and weekend starts (well at 1230).

Todays goals:-

- Create 5 outskirting uv image wrapping planes that will fit around the chunk image of grass land (cause we start in land biome)

- Create 1 2000x2000 plane that will sit on ground level also with image uv wrapping of grass land (cause we start in land biome)

These can be changed dynamically to where we head in the world

Water, Sand, Forest, underground biomes

Will get something together today and post around tea time uk time.

have a good day..


puzzler2018
User Banned
Posted: 16th Feb 2018 14:29
added planes surround the chunk -texture scaling is a bit off - but this part of it is done.



Toggle L to flip between chunk view and play view

Use A and D, E and C to move camera about in this mode

puzzler2018
User Banned
Posted: 16th Feb 2018 16:05 Edited at: 16th Feb 2018 16:13
Here is an example of what i suggested for the infinate ground level when head to the sky



Use WASD and E and C to go up or down

Edit - if memory serves greatly then perhaps duplicate these and join them up together

P P P P P

P P P P P

P P X P P

P P P P P

P P P P P

where P is the plane

where X is the players chunk
puzzler2018
User Banned
Posted: 16th Feb 2018 16:30
Like this



WASD - E and C

Catch up later
puzzler2018
User Banned
Posted: 16th Feb 2018 16:48 Edited at: 16th Feb 2018 17:20
Or a sphere would be super



Yep, ill go with that!

Sorry for overloading the messages lol

Enjoy

EDIT - been messing with the sky colors in the stratesphere



Give it a try with the E and C

Leave you with these for now
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 16th Feb 2018 18:08 Edited at: 16th Feb 2018 18:09
Quote: "Here is an example of what i suggested for the infinate ground level when head to the sky"

I like the idea of the infinite sky level and looks great

The different texture ideas are great not sure which I prefer
I was thinking just simple blue or green or brown block

but the game could have an edit mode where the player could pull up a color bar
and apply that colour to the block so you may only need a few grey textures but the player
could apply any rgb to it just a thought. this would give a large variety of block variations
from a few textures allowing green sea etc and instead of create block right clicking one would
clone it and place above as you have done previously
fubar
puzzler2018
User Banned
Posted: 16th Feb 2018 18:33 Edited at: 16th Feb 2018 18:43
Yeah - thats an interesting concept.

The gray was suppose to look like clouds and when head down to earth - the clouds will emerge above you

and that cloning idea is spot on too.

I really would like a damaging profile for each of those chunks, so ill work on this, this eve with your adaptation you posed yesterday

EDIT - also to move any added blocks with the map, will try and develop this into it too tonight

So then members can start making some strutural things with this if they fancy
puzzler2018
User Banned
Posted: 16th Feb 2018 18:58
Thinking - how we feel about objects in the distance been scaled down and up

scale down - further away objects are

scaled up to 1 when very close the player/camera

Would this be effective?
?
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 16th Feb 2018 20:28 Edited at: 12th Apr 2018 21:41
Using a color wheel could be done similar to this.



it comes from modifying backslashes free color chart picker https://forum.thegamecreators.com/thread/207744
altho his creating the color wheel image from code didn't work for me but there is plenty color wheels that google images will
reveal to test aslong as they are positioned top left. For my quick test I just used the image his created available from the link.

Don't have to use it. Just thought ide play with the concept after having great success with coloring 2d objects by setting there color
Like making a character green shades when starting and red when dieing. But 2d is quite different than 3D and the way it colors
the object is a little different. Particularly the way it uses Alpha.

not sure about the scaling down of objects it may improve things it may not
fubar
puzzler2018
User Banned
Posted: 16th Feb 2018 21:02
Thats really fancy feature

I had to change the code a little cause dont have color.png

from

loadimage("color.png")

to



But its just for testing but works really well and can be implemented in "Creative Mode"

Im trying to get a block to stick to the players position by attaching to the camera to the right and down a bit (so it looks like the player (you) is holding a block- but no success, bear with me


fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 16th Feb 2018 21:19
Quote: "Im trying to get a block to stick to the players position by attaching to the camera to the right and down a bit (so it looks like the player (you) is holding a block- but no success, bear with me "


I had a play with that already with no success lol but its early morning here and im new to AGKs 3d not 3d in general just AGKs

Im sure you will have better success but GOODLUCK
fubar
puzzler2018
User Banned
Posted: 16th Feb 2018 22:08
Wow - that was a journey



fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 16th Feb 2018 22:16
The block attaches and moves with the camera location Well done

fubar
GarBenjamin
AGK Developer
4
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 16th Feb 2018 22:22
LOL! Wow you guys are posting up a storm. Every time I visit the forums there are several new posts. Do you have a timer set hourly to remind you to post or what? Lol

Just joking about the timer. It is good to see so much activity.
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: 16th Feb 2018 22:22 Edited at: 16th Feb 2018 22:32
Just found that only on the X axis, Shall do up in air tomorrow

Its attached to a player object (just underneath the camera), when we move the camera - the player object moves.

I havent accounted for going up in the air or go underground yet.

Or looking up and down is a bit off

Shall do these tomorrow

EDIIT - Im going to have to make sure i dont get burnt out (with computing at work too) - still going strong at the moment though
puzzler2018
User Banned
Posted: 16th Feb 2018 23:38 Edited at: 16th Feb 2018 23:38
A little bit better but not 100%



Press 1-9 for different blocks
and press 0 will go to be able to create your own blocks textures

ive only done 5 txts at moment

Catch up soon

Login to post a reply

Server time is: 2021-04-10 16:14:56
Your offset time is: 2021-04-10 16:14:56