Jump to content


Photo

Minecraft 2D Engine


  • Please log in to reply
21 replies to this topic

#1 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 30 March 2011 - 02:53 PM

This is a little thing I made so far. It's just a 2D Minecraft clone, with possibilities to create a totally random any size terrain in less than one second!, including trees, ores, etc. It also has the possibility to allow you to destroy and create certain materials.

Please notice that this isn't a finished engine, I am still working on it. Any improvements you suggest will be taken into account. You may post codes, examples, sprites... If anyone wants to use this a credit would be nice, but it is not needed for now, while it is still in a very limited stage.

Download here! (V 1.0.03) - editable
Download EXE (V 1.0.03)

So this is the list of things that need to be worked on:
  • Block creation (gravity affected blocks appear with ground sprite (Check: material_create() - SCRIPT))
  • Water
  • Mapping all of the blocks in a priority grid.
  • Player sprite (DONE)
  • Distance destroy/create (DONE)
  • Caves/Cliffs/Mountains...
What I'm basically trying to achieve is the free minecraft version (Minecraft Classic) but in 2D.

File information: minecraft.gmk (38kB) created using Posted Image (Compatible with GM7)
Posted Image

Video soon

Edited by Shadowrend, 15 May 2011 - 03:26 PM.

  • 1

#2 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 30 March 2011 - 04:33 PM

it's not bad. you've got a good start, I just hope to see the terrain generator working more like minecraft.
good luck!

Edited by Newly Discovered, 30 March 2011 - 04:37 PM.

  • 0

#3 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 30 March 2011 - 06:26 PM

Thanks!
As in, I quote, "working more like minecraft", you mean caves, mountains etc? The problem with sudden cliffs and mountains in 2D, is that it would be impossible to scale them in one direction. There for the maximum jump is set to 2, but you can easily change that. Caves can be done, but now I'm trying to create a fully working terrain first, that hopefully will run 80%+ FPS even in a 10 000 x 1000 room (current is 4000x1000). The mountains in 3D are not a problem as you can reach them from 360 angles instead of 2 :)
  • 0

#4 Candlejack

Candlejack

    GMC Member

  • New Member
  • 96 posts

Posted 30 March 2011 - 10:58 PM

Not bad, check my BlockCraft engine, you could probably pull some stuff from there for yours :)
  • 0

#5 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 31 March 2011 - 06:51 AM

nah I just meant the chunks of material that spawn randomly throughout the terrain.
you have just random 1 or 2 pieces of scattered around when really it's like 30+ gravel, no sand unless you're near a shore, and stone a few beneath the grass layer.

I understand this can be complicated and I was in no way expecting caves or mountains at this point.
what do you mean by using 3D mountains? how did this turn into a 3D game?
  • 0

#6 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 31 March 2011 - 02:36 PM

@Candlejack Okay I'll see it.

@Newly Discovered
Ah that. That could be a bit complicated, but I can make for example, all of them rarer, and then create another self nearby. For 3D I didn't mean 3D, I was just displaying the problem of having cliffs in 2D, as it would be hard to jump 100 pixels with a 32 pix jump :)
  • 0

#7 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 01 April 2011 - 02:24 AM

so you'd mine through the mountain bottom and climb the other side?
seems simple enough to me =)

as for the chunks of different tiles and what not, I was just thinking that you could render your terrain, dirt and stone, then add nodes randomly scattered around the entire world.
if a node is in air, delete it. if a node is in dirt, make it either stone or gravel.
if a node is in stone, make it either dirt, gravel, or an ore type.

once you have your node types selected, choose(3,4,5,6,10,etc) an amount to generate of that type, then generate them in a circular pattern and snap them to grid. delete any overlapping.

seems logical and quite simple...it should work nicely.
don't forget to delete all of the used nodes.

Edited by Newly Discovered, 01 April 2011 - 02:25 AM.

  • 0

#8 King Chubbles

King Chubbles

    GMC Member

  • New Member
  • 1052 posts

Posted 05 April 2011 - 09:00 PM

Ah i seem to be the only on the GMC that dosnt have GM8 :lol:

Can you post a screenshot or video or something? Im quite curious.
  • 0

#9 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 06 April 2011 - 01:23 PM

Yeah sure. Check out the first post now :D

Woah 2 more posts to 1k :D

Edited by Shadowrend, 06 April 2011 - 01:25 PM.

  • 0

#10 King Chubbles

King Chubbles

    GMC Member

  • New Member
  • 1052 posts

Posted 07 April 2011 - 01:51 PM

Yeah sure. Check out the first post now :D

Woah 2 more posts to 1k :D


Ok so judging by the screenshots i have a few sugestions.
There should be more stone as you go farther down. In minecraft, there are more stone than dirt.
You shouldnt be able to deleat a brick that is two bricks below what your standing on (deleating a brick thats under and surrounded by bricks)
Good luck
  • 0

#11 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 07 April 2011 - 03:59 PM

I'll make more stone appear as you go down. And as for the destroy/create, it will be only possible at positions nearer than 65 pixels from the player.
  • 0

#12 MudbudGoldfish

MudbudGoldfish

    Indie Game Dev Team

  • New Member
  • 494 posts
  • Version:GM8

Posted 09 April 2011 - 12:21 AM

Iv'e seen alot of stuff about this 'minecraft game'.... whats all the hype? could someone explain to me what its about? It looks kinda cool..
  • 0

#13 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 09 April 2011 - 06:48 AM

Why don't you try the free version. That will explain it all.

http://www.minecraft.net/play.jsp
  • 0

#14 fluoriioni

fluoriioni

    GMC Member

  • GMC Member
  • 95 posts

Posted 09 April 2011 - 07:03 AM

I have tried making imecraft 2D strategy version :P

I can say that you cannot make all blocks objects, because memory limits will so fastly come and rape you.
  • 0

#15 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 09 April 2011 - 07:32 AM

That's why I'll map them in a grid, thus, instead of having 10k objects, I'll only have one, and a very, very, large list.

Update (V 1.0.03)
-Animated player sprite
-Cannot interact with blocks more distant than 65 pixels (4 blocks range)

Edited by Shadowrend, 09 April 2011 - 07:33 AM.

  • 0

#16 yeah12345

yeah12345

    GMC Member

  • New Member
  • 10 posts
  • Version:Mac

Posted 16 July 2012 - 12:45 AM

I've made a clone with a generator as fast as yours but mine lags a bit.
  • 0

#17 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 29 September 2012 - 06:10 PM

I've made a clone with a generator as fast as yours but mine lags a bit.


Good for you. Try using instance deactivation, or drawing it all to a surface to reduce the lag. I'd go with the latter, tho much more complex,
  • 0

#18 Primoz128

Primoz128

    GMC Member

  • GMC Member
  • 308 posts
  • Version:GM:Studio

Posted 15 December 2012 - 05:30 PM

You should rename it to Terraria example since the 2D minecraft is terraria...
  • 0

#19 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 03 January 2013 - 01:09 PM

I don't care. And I didn't know for Terraria when I made this. Also Terraria isn't about building so much, as it is for fighting etc...
  • 0

#20 RookieDev

RookieDev

    GMC Member

  • GMC Member
  • 115 posts
  • Version:GM:Studio

Posted 23 March 2013 - 01:06 AM

I love this! i really need your help to define how some of these functions are incorporated.Also Is there a File that works?


  • 0

#21 JacRom

JacRom

    GMC Member

  • GMC Member
  • 12 posts
  • Version:GM:Studio

Posted 02 April 2013 - 05:44 AM

Not bad, could be improved thanks :)


  • 0

#22 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 2895 posts
  • Version:GM8

Posted 26 April 2013 - 09:35 PM

What kind of file that works?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users