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: 11th Feb 2018 02:23 Edited at: 11th Feb 2018 02:26
Does anyone know but does JS have the functionality to use Shaders?

Yes - possibility to develop them

No - then work what we got

Its minecraft, nothing more nothing less - we have to see if it is possible to create minecraft with AppGameKit as its current state - of course we could do lots more better things with shaders involved - but thats defeating the object
of this task

puzzler2018
User Banned
Posted: 11th Feb 2018 20:56 Edited at: 11th Feb 2018 20:58
ok here is what we need to try next:-

3D rolling map - start with a level height of 1 so its flat - heights can be raised later

Render distance is 16

1. Chunk cube (16x16x128) (half for underneath and half for creations above) and this always stays with the player

2. Map block - 1024 x 1024 (or the size that fits comfortable with FPS) go higher if we need to - this is where the heightmap image will store its heights

3..When generate though, only generate the rendering distance 16x16.

Rolling:-

4. Move the player - it moves inside the 1024x1024 height map grid

5. The outer edges (behind) the player) get pushed to the front of the player- looks and feels like the distance is building itself



Thats the idea anyway for this week
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 11th Feb 2018 21:03
I wish you luck....I'll keep a watch for the final product.
puzzler2018
User Banned
Posted: 12th Feb 2018 23:13 Edited at: 12th Feb 2018 23:33
in response to your very oriiginal query Xaby - can minecraft be developed in AGK

Yes it can if can put our minds it.

No point in progressing with this really - all gone quiet, is copyright material idea anyway.

But , It can be achievable.

Why waste our time and energy if im the only one speaking on the thread, its copyrighted and not going to get anywhere anyway?

There is loads of inspirational concepts on how its achieved

If you dont mind, i would like to go back to concentrate on my few apps that I have going on


Chips Challenge and Fnders Keepers
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th Feb 2018 00:01
Quote: "I for one was watching this thread to see what people came up with"


Its hard when you have so many projects at once tho I do understand

Minecraft to me was more like a Lego concept with the ability to move blocks around
and place them . Proving that the concept is do able in AppGameKit is really a great thing.
But the basic concept of moving and placing blocks around in a 3d world doesnt just stop
there. With this concept even 3d tile map editors are possible which i may look into ways
of doing this later. The Minecraft way People could move around in a terrain as they are
creating it that concept alone has much potential.

Thankyou to all the peoples who shared information on this
fubar
puzzler2018
User Banned
Posted: 13th Feb 2018 00:06 Edited at: 13th Feb 2018 00:10
Thanks

Should I continue?is it really been a good inspirational development?

im happy to keep going at it to give something back to tgc new comers

edit - im a very fast programming leaner - but not many are - people need a base line to start with
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 13th Feb 2018 15:28
I wish I had something constructive to add. I do follow this thread and appreciate all you work. It's very inspirational to me and I'm actually learning here. Thanks!
Regards Sph!nx
puzzler2018
User Banned
Posted: 13th Feb 2018 17:35 Edited at: 13th Feb 2018 17:38
Thanks to you too, thought i was on my own for the minute - and eveyone got bored.. - but if its useful to everyone in learning progression in game development - then i shall proceed in continuing it

Im still on a rolling map. Worked out that a chunk is 16x16 and minecraft block is made up of 12 x 12 chucks - so need a map at least 16x12 = 192x192 px - thats for the roll effect to happen smoothly


Ive only got an hour or two on evenings and full weekends for me, so catch up soon
puzzler2018
User Banned
Posted: 13th Feb 2018 19:39
Something to get us started with mapping



Still lots to do got to get rotations accurate (to move in the direction and scroll the land upon that direction

But youll get the gist


i got to prepare for a meeting for tomorrow for my normal work now

puzzler2018
User Banned
Posted: 13th Feb 2018 19:54 Edited at: 13th Feb 2018 19:56
It doesnt really have to be 16x16.



Tweak to chunksize# and depending on FPS - set it to comfortability of FPS

Have fun

Catch up soon
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th Feb 2018 20:28 Edited at: 13th Feb 2018 20:31
That works well but what ide like to see
Clicking on a block lets you move that block and allows placement
if you know the dimensions of each block and they are all the same
size it could also use some kind of magnetic drop that instead of placing
a block a couple of pixels offset it magnetically places the block

Then adding a save and load feature

but this is all something I am thinking for a 3d version of my tile editor
https://forum.thegamecreators.com/thread/219932

i dont expect you to add those features i am just being lazy and searching
the forums. I have used 3d in Darkbasic and GDK so im not all that new
just my experience in AppGameKit with 3d is minimal and still lots to learn with just
camera angles. And i was suggested on a different thread now all i need to do
is make a 3d version. so i have been trying your various bits of code to see how i
could do this.

The other thing i like about a minecraft thread is a i have
a friend also a programmer who gets very little time who purchased AGK
recently with a young child who is keen to learn and is minecraft mad. Sometimes
It takes a thread such as this one or one of the many tutorials that come with AGK
that can totally inspire an early programmer into that addicted nerd allot of us strive
to be lol
fubar
puzzler2018
User Banned
Posted: 13th Feb 2018 20:34 Edited at: 13th Feb 2018 20:36
There is still lots more to do which I want to try and achieve

- Perlin noise HUGE map probably 6 times the size of the chunk and guide the heights upon the location of the map

- A save and load regions.

- add and remove blocks and if heading deep underground that place a few extra surrounding the player at all angles (except in the air)
this will look like its full loaded underneath
for this, we will need a local array to store (local blockpositions) and if the player goes away from that position for more than the render distance, it will perform a save
and reload it back in when come close to it again

- Inventory system

All the above you mentioned is on my action list Plus tuns more

Just takes time..

Thanks for commenting
puzzler2018
User Banned
Posted: 13th Feb 2018 20:44
A very useful colour chart for our systems - sky etc http://www.tayloredmktg.com/rgb/
puzzler2018
User Banned
Posted: 13th Feb 2018 20:48
Then there will be occlusion - with the faces now we got something together for a more infiniate system
puzzler2018
User Banned
Posted: 13th Feb 2018 21:41
ive been watching a few documentaries on Notch and he has claimed Minecraft is not infinate as we know - +1,000,000 blocks at once. its how we want to peceive the world to be.

I think we there now in gettings this into place good and proper

I made the chunk size 80 (so its quite a nice distance to render) and FPS is still up there and quiet a good playground to play around in lol
puzzler2018
User Banned
Posted: 13th Feb 2018 22:09
Added clouds



Shadows are on these for some reason

Sleep time, catch up soon
puzzler2018
User Banned
Posted: 13th Feb 2018 23:18
its fog color btw

Now that we understand how to make X and Z infinite - we can apply the same thing in the Y directions.

All good fun
puzzler2018
User Banned
Posted: 13th Feb 2018 23:37


fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 03:27 Edited at: 14th Feb 2018 05:43
Quote: "Infinite 3d world very handy"


A quick search on the forums and some slight mod to your above code I came up with

ideas from this thread
https://forum.thegamecreators.com/thread/217721
Position the mouse over the piece you want to move hold down shift then use the arrow keys and or a and z
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 06:43 Edited at: 12th Apr 2018 21:32
a Function similar to this 2d one could be used to give it a snap to grid option for easier placement of blocks



from my 2d editor post
https://forum.thegamecreators.com/thread/219932
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 07:15
Very nice additions Fubarpk - I shall definitely be having a look at these tonight, maybe a good step would be to change that Z to something like X - cause of members who have a different keyboard layout in many countries.

But really good efforts and looking forward to seeing what these do.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 07:42 Edited at: 12th Apr 2018 21:33
I now have a magnetic drop for the x and y axis only
this makes it so when you move the blocks on either of these axis they will pop into place ie perfectly line up with another box if that's
the plan. This could be turned on or off to allow easier building at the moment its set with the magnetic variable


but for anyone more familar with the 3d controls than me this function needs modifying to include a z control


I think with magnetic controls on the planes this could help with placement allot would need one that can be switched on and off for each control
but i am thinking at the moment some overlayed text just to show all the controls that its using (instructions)

well the magnetic works perfectly on one axis but the other axis it works just slightly offset from where it should be placed and no magnetic for
z axis. Will have to look at your code as to see why its off set I might just have to add something to the magneticplace() function or study your code and
see why that axis didn't lock in like I wanted

The keys we use are great if we want it as pc project but I'm thinking later adding 2d overlays that control the movement with the touchscreen and or mouse
which would make it very useful as an AppGameKit project. With allot more documenting it could possibly be implemented as a trainer or a basic minecraft and given
as a download to encourage uses to use AppGameKit in the future For that purpose it doesn't need fancy maps just doing the very basics well documented. Like it is
pretty much doing now. Especially as it uses no copyright graphics as it is creating it on the fly. It could still have textures etc very basic ones loaded with it in
the future, even some more different blocks. I'm not sure how far you plan to go with it, but I love the work.
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 10:08
Yeah this is cool, I was thinking of creating a small debug window in top left corner - turned on by pressing F12 or something - this will show locations/block position/chunk position/FPS info and such like

Then the in game inventory system down the right side of the screen which opens up if move mouse over the right hand screen and it slides over on here have a checkbox for Snap to Grid option like you showing.

This is really getting somewhere now

D
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 16:59 Edited at: 12th Apr 2018 21:34
Setting the objects diffuse colour when you hold down the shift key and then back after you let go is simple and very helpful

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 17:32 Edited at: 12th Apr 2018 21:34
I set some constants gridx, gridy and gridz
and modified the magnetic routine which now makes it snap to a grid in all directions
and greying the selected object out instead of just trying to set the diffuse to red so
now it just greys it out instead of a different colour depending on what the colour of
the texture is

here is what we have so far
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 17:34 Edited at: 14th Feb 2018 17:38
This is some impressive bit of coding - thanks.

I shall be developing on this during the evening

EDIT - maybe a good feel would be to move the camera (players head) in the direction of where the mouse is

and have the mouse turned off and be made like a small cross hair in the middle of screen and then click block to remove/add

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 19:17 Edited at: 12th Apr 2018 21:34
I agree there should be a better selection routine

But I have started making the code more readable well I added more constants for the keys
added some text overlayed over the top so you know whats what and snap to grid may now be
turned on or off and a object rotation that for some reason works better clockwise than anticlockwise

The rotation may want a snap to grid type option later as well so perhaps setting to 15 degrees or perhaps just changing the rotation values at the
moment its just set to .5 and think I need to revisit some documentation on angles Eular etc And altho it seems to work I'm not sure if rotation of a block
needs to be stored or not I'm thinking only if its going to be changed when you move through the map.

You've done the hard yards with movement and culling objects from view I currently get about 65 frames a second on my pc which aint bad
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 19:33 Edited at: 14th Feb 2018 19:48
Here is what i have so far



Left button to attach/Delete or right mouse to add

Move camera with moouse


Still got finer tweaking to do - to make the collision it dead centre

Edit - yes when removing blocks and adding, they will need to be stored in the map, so when move, "extra" blocks will move with the map too.

It will all fall into place soon

Edit 2 - I dont know how we find this, but im using trackpad and mouse button on the laptop (i dont use a mouse) so im not sure if its my trackpad is really sensitive with the mouse/camera movements

Ill get a proper mouse tomorrow lol
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 19:53
Much better

I'm finding the left button deletes and the right button selects
confused me at first but could be my settings

but the mouse camera works great il wait to see what you end up with next
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 20:01 Edited at: 14th Feb 2018 20:02
Thanks for checking..

The left mouse is attack/deletes

Right mouse should be add a inventory selected block

Next will be refining the mouse coords with your bit of code - its just not accurate for me and building saving their positions in an map extended array to store those added block positions so they moves with the map instead of with the camera lol

Catch up a little bit later on with some refinements

Working along the lines of this premise

http://www.dummies.com/programming/programming-games/minecraft/how-to-choose-a-base-in-minecraft/
puzzler2018
User Banned
Posted: 14th Feb 2018 20:51
I think we there now with precision



Catch up when I have the extended map block array sorted, so added blocks move with the map

Also tidied the code up a bit

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 22:22 Edited at: 12th Apr 2018 21:35
I think showing the selection could be done by darkening the color or perhaps putting a darker outline like this
I'm thinking a mouse over event now that darkens and shows a selection
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 22:29 Edited at: 14th Feb 2018 22:32
Thats be a nice feature to add - minecraft does the same. although minecraft does by simple drawline commands to surround which block going to hit.

i think drawline in a 3D app would not really be appropriate/tacky - might as well go all the way 3D

Nice addition

Cheers

Edit - we need some kind of damage ratio to each of those blocks
so lets say land takes 5 hits to remove
sand takes 1 hit
water - swim
bedrock - 999999999999999 lol
puzzler2018
User Banned
Posted: 14th Feb 2018 22:41 Edited at: 14th Feb 2018 22:42
been thinking of the distance and when camera goes up into the stratesphere

this is as when start going up in the air, - to make all objects slowly flat the further distance the player (you) see. and when the map is generated , it will create a PNG image from the terrain generation.. This image is then displayed on a 5000x5000 plane that extends way into nether land. and this is rolled too- this only will look after when the player decided to go up in the sky


The PNG map is automatically generated when start the level. so be quick to use
Just an idea
puzzler2018
User Banned
Posted: 14th Feb 2018 22:44
A bit like moteef coloured block images joined together into one massive PNG

When finish that world - the PNG gets deleted so when generate a new world
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 22:59
Scaling an object, changing its object colour then drawing an object should have the same effect but the colour may be different depending on the texture
I like the idea of just changing the whole object to a darker shade of those colours its more noticeable and should be less resource intensive. Altho there is
a great shader that is available that does this. Personally I think an object placed at the exact spot slightly larger of a set colour with transparency might
give almost the same effect as the shader and be quicker. But il have a play with a mouse over event that just darkens the object as this should be the
fastest most effective way
fubar
puzzler2018
User Banned
Posted: 14th Feb 2018 23:00 Edited at: 14th Feb 2018 23:02
Jeeze 5000x5000 PNG file in memory will be 97mb - ouch - not good for mobile

maybe 500 500 and do a 5000x5000 plane full repeat of biomes (lands)

I'll work it out..

Sorry, i was just thinking of future of what happens to the land when go to heaven lol

Back to earth now.


puzzler2018
User Banned
Posted: 14th Feb 2018 23:12 Edited at: 14th Feb 2018 23:17
if can figure this out then this app will be useful for any kind of app

Farcry
GTA
Farlands
Outrun
Assassin Creed
and the list goes on.

Keep up the good work

EDIT - thankfully 99% of other 3D games dont have a 256 block up and down to think about lol, just 1 plane surface - Thanks Xaby for the challenge x
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Feb 2018 23:56 Edited at: 12th Apr 2018 21:35
The following added to the main loop does allow showing selection on and off of blocks with a mouse over event
with lockSelection set to 0 or 1 depending on whether you have clicked mouse button or not
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 00:09
Forgive me,

where abouts you putting this code in the app?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 01:02 Edited at: 12th Apr 2018 21:37


easier to just post the code

and by adding a line in the cameramove function you get scroll wheel zoom
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 08:38
nice interesting concept to do, ill take a look tonight and work on some more.

Maybe another interesting idea would be when click a block to activate about 6/8 blocks that pop up from the block we hit, but much smaller and textured the same

and they move about with Physics turned on.

and after about 3 seconds they start and disappear.

Once the damage level of a block is reached - then the whole block is deleted

This is something i like to try tonight
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 08:47 Edited at: 12th Apr 2018 21:38
Quote: "Maybe another interesting idea would be when click a block to activate about 6/8 blocks that pop up from the block we hit, but much smaller and textured the same"


3D Particles that just start at the location of the selection would be allot easier to implement and might achieve a similar effect

I haven't tried the 3d Particles but I have written a fireworks display with 2d particles

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

something like this ????


with the following functions




altho it needs some modifying I'm not sure I like it either and the particles don't seem to go in all directions as they should
probably scrap particle idea lol altho as a deletion of an object could work as you was probably trying to say

https://play.google.com/store/apps/details?id=smiley.Madness

the above I made that's full of 2d particle explosions when one vanishes it creates a particle effect using the image of the one
you want to explode
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 10:47 Edited at: 12th Apr 2018 21:38
So far



There is now an explosion of particles when you delete one and you can move around world again
but only when you are not holding down the right mouse
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 10:49
but I'm calling it a night interested to see what you come up with
fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 17:20 Edited at: 15th Feb 2018 17:23
Hi

Just got in - taken a quick look at it looks pretty good - i see what you mean about the particles flying off in the air, ill take a look in a bit to see if can make it more subtle

Ill do the extended map array for the added blocks over the weekend Sat & Sun when i have few free days free - this needs 100% full concentration to do and if can get time, ill also make a start getting into the underground
puzzler2018
User Banned
Posted: 15th Feb 2018 17:51
Your right - using particles for the block breaking is just not perfect enough for me - no matter how we set the parameters.

Although particle engine can be used for other things - such as flames / torches underground and such like

I will see how far i get tonight with creating those 6/8 blocks on a 3d Physics and then fade into nothing and also put a damage counter on each of the blocks (depending on texture)

Will share later on tonight
puzzler2018
User Banned
Posted: 15th Feb 2018 18:18 Edited at: 15th Feb 2018 18:25
Just something to pull it all together - a starting screen



and not forgetting the most important members here - TGC - Thanks Paul and everyone for giving us the capabilities of producing such things
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Feb 2018 18:47
Quote: "Just something to pull it all together - a starting screen"


GOOD IDEA

Just woke up but think the project coming along nicely.

Im not convinced particles still isnt an answer as you should be able to have them die
at a range, could have them changing size with the following command

Add3DParticlesScaleKeyFrame( ID, time, scale )

and if there isnt a range command that causes death this command could be used to set
alpha at a time intervals

Add3DParticlesColorKeyFrame( ID, time, red, green, blue, alpha )

I really was just playing around.

The project probably needs several pages of different functions and routines.
and commenting more but your the one who started the project and I have hijacked it lol


I would like to see that the up arrow actually moves forward all the time etc An algorythm
could be used here that would calculate an ammount of x,y depending on movement
and the cameras rotation then calling your shiftmap function with the x,y values would still
move the player around correctly. Im sure there is something on the forums that has solved
that and my skills lack in algoythms like that. So no use reinventing the wheel.

fubar
puzzler2018
User Banned
Posted: 15th Feb 2018 18:58 Edited at: 15th Feb 2018 19:09
No no its perfectly ok to hijack code as you say - thats perfectly ok,

I trust that for posting here - we should keep the app in one full code page and when the time comes, we should split it out better,

like new files attached with #include:-

Controller.agc
MapFunctions.agc
Playerfunctions.agc
Enemyfunctions.agc
Music/Sound.agc
WhetherSystem.agc
etc
etc

and of course we shall comment it to the extreme, cause this will help new comers build a well known game at ease

edit - and lots of optimisation

eg


can be made

Login to post a reply

Server time is: 2024-03-29 00:07:34
Your offset time is: 2024-03-29 00:07:34