Author Topic: nCraft (3D minecraft-like game for the nspire)  (Read 113855 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some 3D with Ndless...
« Reply #45 on: March 27, 2012, 03:21:14 am »
Looks nice Chockosta. I wonder if with minimal textures (such as Minecraft but with a twice smaller resolution) it would run fast enough? Seeing Doom running fast I'm thinking of yes, but this might be very hard to optimize that hard.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Some 3D with Ndless...
« Reply #46 on: March 27, 2012, 04:13:26 am »
he probably could, although drawing textures on a bunch of small boxes is more difficult than on a few, larger walls, i think. if not, though, then they can always just be different colours.
oh, and this DOES look fantastic =D
« Last Edit: March 27, 2012, 04:13:42 am by shmibs »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some 3D with Ndless...
« Reply #47 on: March 27, 2012, 04:21:29 am »
An idea I have is to draw every 3 or 4 vertical line too, if that can help processing. Don't do it horizontally, though, as this seems more noticeable.

Also even though I'm talking about textures right now, don't try implementing them now, focus on your 3D engine as it is now. :)

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: Some 3D with Ndless...
« Reply #48 on: March 27, 2012, 09:33:47 am »
I thought about textures, but I'm afraid it won't be possible.
I'll try, anyway.

Oh, and here is a nice screenie that show I can draw lots of cubes without speed loss

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Some 3D with Ndless...
« Reply #49 on: March 27, 2012, 01:07:52 pm »
By the way, if not any cube is transparent, why not, instead of drawing cubes, just draw the faces the player see ?
Maybe this method would make you rewrite all from the beginning (so don't do it if you don't need to) but maybe the game would become faster, I don't know.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: Some 3D with Ndless...
« Reply #50 on: March 27, 2012, 02:08:29 pm »
I already do it.
The Nspire is fast, but 3D drawing without hardware acceleration takes a lot of resources.
Since there is a lot of cubes to draw, it wouldn't be playable without optimization.

I use several ways to speed up the drawing :
- Only draw cubes if there is an "air" block near them
- Don't draw them if they're not on the screen
- Draw only 3 faces per cube (there are always less than 4 faces that can be seen)

Then I just sort the cubes that will be drawn with their distance from the player (optimized heap sort), no need to use a depth buffer.
So I can manage to have a decent framerate.
« Last Edit: March 27, 2012, 02:14:49 pm by Chockosta »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some 3D with Ndless...
« Reply #51 on: March 27, 2012, 02:28:26 pm »
I thought about textures, but I'm afraid it won't be possible.
I'll try, anyway.

Oh, and here is a nice screenie that show I can draw lots of cubes without speed loss

Actually that kind of floor could possibily be used as textures in some maps, right? But yeah for other walls I don't think textures are really that necessary anyway. Just have different color or gray tones for each, so they're easily distinguishable. Also another idea if there's a large map would be to not draw stuff that is too far from player view, like Nintendo 64 games, for example.

Does the engine supports 2D sprites like items in Doom?
« Last Edit: March 27, 2012, 02:30:17 pm by DJ_O »

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: Some 3D with Ndless...
« Reply #52 on: March 27, 2012, 02:40:06 pm »
Actually that kind of floor could possibily be used as textures in some maps, right? But yeah for other walls I don't think textures are really that necessary anyway. Just have different color or gray tones for each, so they're easily distinguishable.
Well, I think I will first try to create something playable with a color for each cube.
Then, I will consider rewriting it to use textures.

Also another idea if there's a large map would be to not draw stuff that is too far from player view, like Nintendo 64 games, for example.
Obviously, I have to do this. I think I will display a chunk of 20*20*20 cubes. (That may seem not so much, but it's 8,000 cubes...)

Does the engine supports 2D sprites like items in Doom?
Not for now, but I plan to add this.

I am thinking about the world size... I never tried to store huge pieces of data in the RAM, I hope it will be possible...
Because a 100*100*40 world would take 400,000 bytes to store  :-\

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Some 3D with Ndless...
« Reply #53 on: March 27, 2012, 03:39:22 pm »
I am thinking about the world size... I never tried to store huge pieces of data in the RAM, I hope it will be possible...
Because a 100*100*40 world would take 400,000 bytes to store  :-\
You could use tangrs' method to decompress compressed data at the same time the game is running so you don't need to have all the world at the same place (however, I don't know how to compress a 3D world).
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: Some 3D with Ndless...
« Reply #54 on: April 17, 2012, 03:33:53 pm »
Since I finished my lua projects (Gravity guy and nSpaint), I can focus on nCraft...
I got a simple world generator (I will improve it later) It looks like this :


And do you think that I should make iron/coal/gold/diamond more rare? For now it looks like this :

(I did not display the stone)
Iron is grey, gold is lighter, diamond is the lightest shade of grey and the black floor is bedrock.

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Some 3D with Ndless...
« Reply #55 on: April 17, 2012, 04:16:55 pm »
nCraft= 3D Minecraft? 8O
I do think the diamond and gold should be fewer though.
Looks great!


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some 3D with Ndless...
« Reply #56 on: April 17, 2012, 04:33:13 pm »
This looks awesome Chockosta! how big will be maps? Glad you're still working on this. :)

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: Some 3D with Ndless...
« Reply #57 on: April 17, 2012, 05:38:27 pm »
Very nice!  :o Good luck!

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Some 3D with Ndless...
« Reply #58 on: April 17, 2012, 06:35:12 pm »
Nice pics and great work! :)


Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Some 3D with Ndless...
« Reply #59 on: April 17, 2012, 06:58:10 pm »
Since I finished my lua projects (Gravity guy and nSpaint), I can focus on nCraft...
I got a simple world generator (I will improve it later) It looks like this :


And do you think that I should make iron/coal/gold/diamond more rare? For now it looks like this :

(I did not display the stone)
Iron is grey, gold is lighter, diamond is the lightest shade of grey and the black floor is bedrock.
I dont see pictures?
This used to contain a signature.