Author Topic: Minecraft 2D for TI-Nspire  (Read 200006 times)

0 Members and 2 Guests are viewing this topic.

Offline zeldaking

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 197
  • Rating: +15/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #90 on: October 09, 2013, 06:28:51 pm »
This looks great! I will try it out tonight. Have you considered making a Terraria clone? Since that is in 2D, while minecraft is 3D.
Great work!
What programming language did you use to make this? I want to program for the nspire.

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #91 on: October 09, 2013, 06:35:53 pm »
@zeldaking: Thanks! :) It's written in Lua (better don't look at my code, I think it's horribly written) And yeah, maybe Terraria would've been better to port to nspire, but I don't own a copy of it :P
« Last Edit: October 11, 2013, 07:22:06 am by Jens_K »
Sorry for nonsense.

Projects:



Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Minecraft 2D for TI-Nspire
« Reply #92 on: October 10, 2013, 06:06:50 pm »
Hmm I tried growing a sapling, but no luck after probably about 10 day/night cycles. Perhaps it is a minor glitch?
Anyways I had some fun with the code today. The zombies are cute when theyre pink  :D



Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #93 on: October 10, 2013, 09:00:37 pm »
@LDStudio: Lol, I wish I could see what you did there ^^ But I just tested the saplings and they work as they sould do. There are some things you should mind:
- saplings must be placed on dirt or grass
- there must be a 4 block high space above them
- they only grow if they are on screen (global update would take too much performance :/)
- every 0.3 seconds they have a 1/2000 chance to grow
« Last Edit: October 10, 2013, 09:07:25 pm by Jens_K »
Sorry for nonsense.

Projects:



Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Minecraft 2D for TI-Nspire
« Reply #94 on: October 10, 2013, 09:09:29 pm »
Ahh I wasnt keeping them on the screen very long. Thanks for that information  :D



Offline Vijfhoek

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 120
  • Rating: +13/-1
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #95 on: October 11, 2013, 10:00:32 am »
Could someone make/link a YouTube video of it? I don't own a CX, but I am curious :P

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #96 on: October 11, 2013, 10:04:08 am »
@Vijfhoek: I'll make a video when it's finished, maybe someone else makes a video by then.
Sorry for nonsense.

Projects:



Offline AnToX98

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +10/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #97 on: October 12, 2013, 08:24:50 am »
Lol you have to work on the mob spawning :p
I built an beautiful house and a creeper spawned in.
And then... BOOOOOMM



My Lua projects :

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #98 on: October 12, 2013, 08:29:17 am »
Well don't forget the Torches ;) They will still spawn in small shadows, but the propability is now lower, but you just gave me an idea here... Expect another update on the spawning algorithm!
Sorry for nonsense.

Projects:



Offline Vijfhoek

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 120
  • Rating: +13/-1
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #99 on: October 12, 2013, 08:32:13 am »
In real Minecraft, mobs only spawn more than 24 blocks away from you - I guess you can implement something similar?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #100 on: October 12, 2013, 09:14:32 am »
Aggressive mobs also won't spawn at all in a light level that's > half of the maximum.

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #101 on: October 12, 2013, 09:56:43 am »
@Vijfhoek & Streetwalker: You're right, I've just read the "spawn" section in the minecraftwiki and it seems to be a bit different than I thought. The group-spawning seems to be a bit too much for only 2 dimensions but I'll implement that maximum constant for monsters/animals. Expect major changes in the spawning and mob management mechanics! That means more time for calculations and that means lag spike but I think I can avoid that by splitting block and mob updates to different ticks

Edit: I have a question:
Should you be able to walk through trees (as you'd be walking in front of them)?

Btw I've finished fire! I think it's very similar to the real minecraft but it would be very easy to adjust combustibility of different materials, speed, spreaing and self-extinguishing!
« Last Edit: October 12, 2013, 10:12:52 am by Jens_K »
Sorry for nonsense.

Projects:



Offline AnToX98

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +10/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #102 on: October 12, 2013, 02:18:53 pm »
Yes i think would be a great idea.
It's annoying to be forced to break a tree :p



My Lua projects :

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Minecraft 2D for TI-Nspire
« Reply #103 on: October 12, 2013, 02:51:10 pm »
Ok, here is the new mob logic:
- while generating the world, each grassblock has a 1/10 chance to spawn an animal on top of it
- animals won't despawn
- every second the game checks how much animals and monsters there are
  - if there are less than 15 monsters around, the game trys to spawn a monster with the propability of (amount of monsters/20)
  - elseif there are less then worldwidth*0.1 of animals, there is a 50% chance to try to spawn an animal
  - then the game searches for good spawning spots for the selected mob type
  - the selected mob will spawn with a chance of (amount of good spots/20)
  - aggressive mobs won't spawn in a 5x5 block square around the player (monsters don't see and follow the player if he's more than 5 blocks away from them)
- aggressive mobs will despawn if they are more than 20 blocks away from him
- mobs will only update (move, take damage etc.) if they are on screen

Any suggestions are welcome!
« Last Edit: October 12, 2013, 02:51:54 pm by Jens_K »
Sorry for nonsense.

Projects:



Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Minecraft 2D for TI-Nspire
« Reply #104 on: October 13, 2013, 04:48:23 pm »
Sounds good, I cant wait for this update  :D