A minecraft might be possible if I managed to determine which cubes have to be drawn and which ones are hidden.I guess (I said "I guess", not "I know") it would be like raycasting. You must determine which cubes are hidden by others (not to draw) and which cubes are too far (not to draw) with imaginary rays you project everywhere, then you draw the remaining cubes, only the ones the character can see.
But I really don't know how to do that.
I guess (I said "I guess", not "I know") it would be like raycasting. You must determine which cubes are hidden by others (not to draw) and which cubes are too far (not to draw) with imaginary rays you project everywhere, then you draw the remaining cubes, only the ones the character can see.I was just about to say that :D
I think I'll give up with this project, since TI blocked ndless :(D:
It would be useless to spend time for this if nobody will use it...
Sorry.
Why can't TI understand that it won't annoy them to allow 3rd party native code ?
It seems that TI can't understand anything from the community.First of all, all of those who have Ndless 3.1 will keep the OS 3.1 (except one or two people), even years after (except if the second point becomes reality).
Two months later, new Nspires will come with OS 3.2. A few months later, nobody will have OS 3.1.
I guess that TI won.
And now, I just don't know what to do. I don't want to quit calculator programming, but I hate TI's actions.I have a stupid answer: Join the Ndless team ? :P
Unfortunately, no calculator is as good as the Nspire. So I'm really confused.
TI's strategy to give us a better lua so that most people don't want native code anymore seems to succeed.They need to work a lot to make an interpreted language run Doom and various emulators.
It seems that TI can't understand anything from the community.
Two months later, new Nspires will come with OS 3.2. A few months later, nobody will have OS 3.1.
I guess that TI won.
And now, I just don't know what to do. I don't want to quit calculator programming, but I hate TI's actions.
Unfortunately, no calculator is as good as the Nspire. So I'm really confused.
I think I'll give up with this project, since TI blocked ndless :(
It would be useless to spend time for this if nobody will use it...
Sorry.
Why can't TI understand that it won't annoy them to allow 3rd party native code ?
I have a stupid answer: Join the Ndless team ?I would like to help them, but this is totally out of my programming capacities. I'm just a little programmer who makes games with a SDK. Moreover, I don't think I have enough free time.
Anyway, I thought a lot about this last night, and it would be stupid to stop calculator programming.
I might not stop this project, but it is paused for sure (for at least one week).
I still feel discouraged, but I do want to help the community, and it seems that giving up isn't the right thing to do.
Moreover, it seems that TI secures more and more their OSes, so I think that ndless 3.2 won't be here before a while, despite your amazing work.
Anyway, I thought a lot about this last night, and it would be stupid to stop calculator programming.I like your project, and if programming isn't fun for you at the moment, just make a pause and program again when it's fun again :)
I might not stop this project, but it is paused for sure (for at least one week).
I still feel discouraged, but I do want to help the community, and it seems that giving up isn't the right thing to do.
We need a new nspire link software, a way to send files to our nspire without the fear of secretly being upgraded. Also, if your nspire's storage is full, then an os will not fit on it. Please! We need this!
Test ALL the addresses :DWhat is RTC ? If that means Real Time Clock does that mean there is a clock on the Nspires that I never noticed ?
http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports
Timer 1, Timer 2, and RTC.
The choice is up to you.
Beware on the emulator, it seems that the RTC can't be modified since it is based on the system (windows) time.
I just decided to resume this project.Glad to see you didn't quit everything because of TI :)
(BTW, I also resumed GravityGuy development and nSpaint)
I don't think that it will be really fun to use, but it's a nice challenge for me. I hope that it will be playable...
Anyway, I kinda optimized the display.
I can now draw a lot of cubes with a decent speed. (~1000 cubes in 0.2 sec)
But I really need to use the timers to slow down sometimes... When there's almost nothing to draw, the camera moves incredibly fast.
Does anyone know where I could find some documentation ?
Test ALL the addresses :DThanks !
http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports
Timer 1, Timer 2, and RTC.
The choice is up to you.
Beware on the emulator, it seems that the RTC can't be modified since it is based on the system (windows) time.
What is RTC ? If that means Real Time Clock does that mean there is a clock on the Nspires that I never noticed ?Yes...
If you get minecraft to work on the CX, you win.I hope I will :)
I thought about textures, but I'm afraid it won't be possible.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.
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.Well, I think I will first try to create something playable with a color for each cube.
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...You could use tangrs' method (http://ourl.ca/15656/293476) 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).
Because a 100*100*40 world would take 400,000 bytes to store :-\
Since I finished my lua projects (Gravity guy and nSpaint), I can focus on nCraft...I dont see pictures?
I got a simple world generator (I will improve it later) It looks like this :
(http://i45.servimg.com/u/f45/11/25/11/26/ncraft10.png)
And do you think that I should make iron/coal/gold/diamond more rare? For now it looks like this :
(http://i45.servimg.com/u/f45/11/25/11/26/screen27.png)
(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.
Seems like servimg is down right now.Since I finished my lua projects (Gravity guy and nSpaint), I can focus on nCraft...I dont see pictures?
I got a simple world generator (I will improve it later) It looks like this :
(http://i45.servimg.com/u/f45/11/25/11/26/ncraft10.png)
And do you think that I should make iron/coal/gold/diamond more rare? For now it looks like this :
(http://i45.servimg.com/u/f45/11/25/11/26/screen27.png)
(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.
this is probably just going to be me ranting, and not be of any actual use:P
This looks awesome Chockosta! how big will be maps? Glad you're still working on this. :)The total map is 100*100*40 (400,000 cubes !)
[nice ideas]Your idea seems nice, but I think it's more adapted to a raycasting 3D engine... Because with nCraft, the sectors could get way too big.
EPIC!I have to get CX support, and then, I will put a download. (Even if it would be pretty useless without the possibility to add/remove blocks)
I want download
Oh, and sorry for using servimg, I should find another image hosting website.imgur.com
still I like the generatorEPIC!I have to get CX support, and then, I will put a download. (Even if it would be pretty useless without the possibility to add/remove blocks)
I want download
.
function setPixel(void *buffer,int x,int y,int color)
{
//...
uint8_t px=*((uint8_t *)buffer[pos]) //pos is an int
//...
}
But gcc does not like that... What should I do instead?
Hello everybody !
I have problems with color support, and I would need your help...
I have to change my buffer from uint8_t* to void*.
But in a function to change a pixel, I have to cast a void* value to an uint8_t if the screen is in 4 bpp mode.
So I tried :Code: [Select]function setPixel(void *buffer,int x,int y,int color)
But gcc does not like that... What should I do instead?
{
//...
uint8_t px=*((uint8_t *)buffer[pos]) //pos is an int
//...
}
uint8_t px=(((uint8_t *)buffer)[pos]);
So, CX compatibility should be okay, but for random reasons it keep crashing when I open it with the emulator...
I really do not understand.
The CX emulator works fine, I can run other programs that I compiled.
But it doesn't seem that the error comes from the code, since it runs perfectly on non-CX emulator.
I have no clue...
(Sorry for the triple post...)WOW! I cant wait for more updates
By the way, even if I can't use the timers, the color display works great.
Here is some eye-candy...
(In the first picture, you can see iron, gold and diamond, and in the second one, there is pretty much every block I added :) )
Are you still on the step where you make all the textures or have you developed a character?Well, for now I'm trying to allow the player to add/remove blocks.
Are there any emulators that don't need a rom (or can generate one, like wabbitemu)?Well, sometimes some wikis have useful info. Have you visited this one? http://www.omnimaga.org/index.php?PHPSESSID=a4554c1b800ff1ff857e72d0dd28ab04&topic=12378.0 . Give it a go. It's worth the time spent. :P
Glad to see this revived and with CX support :)This would totally win my vote for POTY, after the gbc gba emulators from calc84! (But that was the last POTY, this could be the next winner :D)
An idea..since the map isn't drawn pretty far forward might it be possible to have a mini-map that's a slice of the current height's layer or something?Yes, that is totally possible. When I will be done with basic stuff (adding and removing blocks, inventory), I will add this
Edit: random thought- is the map drawn all the way around the player or just in front if it?The cubes behind the player aren't sorted nor drawn. I might optimize this part a bit more, though.
After that will you add the ability to be able to place +destroy blocks (maybe jumping too)Adding and removing blocks is off course the next item on my todo list :)
This would totally win my vote for POTY, after the gbc gba emulators from calc84! (But that was the last POTY, this could be the next winner :D)I don't think this will win the POTY, gpSP is really better :)
Would a scrolling background image slow the game down too much? It would be nice to have a background with clouds that moves around when you rotate the camera.Yeah, I agree that the white background feels a bit empty. If adding a background is too slow, maybe just coloring it in blue would fill the blank pretty well already ? :)
Would a scrolling background image slow the game down too much? It would be nice to have a background with clouds that moves around when you rotate the camera.I will try to add this, this yould be prettier indeed.
You should look into how raycasting is done for drawing maps in a raycaster (only the ray cast, not the drawing), then try to add the third dimension. This will be the easyest way, and it's fully possible because of the block-based world. Raycasting as used in 3D computer games often uses more complex calculations and search for polygons, which would also make it harder to use.After that will you add the ability to be able to place +destroy blocks (maybe jumping too)Adding and removing blocks is off course the next item on my todo list :)
But it requires 3D raycasting, and I don't know much about that... I'll do research this week-end...
I tried it more in depth now, fell down and noticed that there are resources underground O.OI had that in mind as well. I haven't tried it yet, but I'm not sure I'm thinking of the same thing as Hayleia. Do you mean the touchpad for the looking like a computer mouse (as in just touch the pad and it moves like a mouse like in nDoom)? That's what I would do. Implement the touchpad as a mouse to look around and maybe something like the number keys for moving. The touchpad is awkward for moving, whether you click it, or like in nDoom where you could move slightly awkwardly with it.
Also, while I was at it, I thought about something that would improve it in my opnion (and of course, it is only my opninion). I think that the controls would be a lot better if the touchpad didn't need any click, like in mViewer's browser. I mean using the touchpad like a touchpad without pressing it, not like buttons :)
Adding and removing blocks is off course the next item on my todo list :)Yay!
But it requires 3D raycasting, and I don't know much about that... I'll do research this week-end...
Yeah, I agree that the white background feels a bit empty. If adding a background is too slow, maybe just coloring it in blue would fill the blank pretty well already ? :)Later maybe you could implement a choice of color?
You should look into how raycasting is done for drawing maps in a raycaster (only the ray cast, not the drawing), then try to add the third dimension. This will be the easyest way, and it's fully possible because of the block-based world. Raycasting as used in 3D computer games often uses more complex calculations and search for polygons, which would also make it harder to use.After that will you add the ability to be able to place +destroy blocks (maybe jumping too)Adding and removing blocks is off course the next item on my todo list :)
But it requires 3D raycasting, and I don't know much about that... I'll do research this week-end...
Yes, I mean just the touchpad for looking and there would be keys to move ;)I tried it more in depth now, fell down and noticed that there are resources underground O.OI had that in mind as well. I haven't tried it yet, but I'm not sure I'm thinking of the same thing as Hayleia. Do you mean the touchpad for the looking like a computer mouse (as in just touch the pad and it moves like a mouse like in nDoom)? That's what I would do. Implement the touchpad as a mouse to look around and maybe something like the number keys for moving. The touchpad is awkward for moving, whether you click it, or like in nDoom where you could move slightly awkwardly with it.
Also, while I was at it, I thought about something that would improve it in my opnion (and of course, it is only my opninion). I think that the controls would be a lot better if the touchpad didn't need any click, like in mViewer's browser. I mean using the touchpad like a touchpad without pressing it, not like buttons :)
the problem would likely be differentiating stuff like pumpkins/orange wool or snow/black wool.snow and black wool? :P
You should look into how raycasting is done for drawing maps in a raycaster (only the ray cast, not the drawing), then try to add the third dimension. This will be the easyest way, and it's fully possible because of the block-based world. Raycasting as used in 3D computer games often uses more complex calculations and search for polygons, which would also make it harder to use.Yes, that's what I have in mind. Cube-based worlds are well adapted to raycasting.
You're right, traditionally they aren't designed for it, but using the sector system to your advantage, you may be able to get away with it. Now a standard orthagonal raycaster is very well suited for dynamic maps, if you can use the other raycasting techniques with it, and avoid the bsd tree entirely, you may be able to use a raycaster to do it all. Take a look at the raycaster that was used in the port of Doom for nSpire (not the source port, the full rebuild) and you'll see what i mean.I know that raycasting could be useul for my game, but I'm not sure that it would be faster than my current "3D engine".
The Voxel idea sounds like the best one yet. it would really be well suited for this style of game. I suspected for a while that the original used a mix of voxel rendering and polygons, but i don't know for sure, it looks suspiciously like that.
Later maybe you could implement a choice of color?Well, I'll think about that later, it is not my priority :)or texture packs:P
One thing that's worth keeping in mind is since it works on grayscale models, clickpad support should be kept. Idk how ndless goes about it, but maybe if using the touchpad breaks on the clickpad it can be an option? Personally I'm not too fond of how touchy ndoom is :P but to each their own.Maybe you're right.
Can't you do both so it runs on every calc ? Like "If touched or clicked" (in pseudo code) ?One thing that's worth keeping in mind is since it works on grayscale models, clickpad support should be kept. Idk how ndless goes about it, but maybe if using the touchpad breaks on the clickpad it can be an option? Personally I'm not too fond of how touchy ndoom is :P but to each their own.Maybe you're right.
So what should I do ? Use a detection based on touching or clicking ?
You could detect if it's a touchpad or a clickpad, and use touching if possible.One thing that's worth keeping in mind is since it works on grayscale models, clickpad support should be kept. Idk how ndless goes about it, but maybe if using the touchpad breaks on the clickpad it can be an option? Personally I'm not too fond of how touchy ndoom is :P but to each their own.Maybe you're right.
So what should I do ? Use a detection based on touching or clicking ?
Ok, thanks.No, I think Darl's problem with nDoom is that you control the whole player's movement with the touchpad. In your game, the touchpad only controls the camera so it should not become annoying :)
I asked this question, because some people seem to prefer clicking... (like Darl181)
That's what I had in mind too. Be able to run your finger across the touchpad and make the character turn. Then the numbers like 4,5,6, and 8 are to move around. This would also allow for easier strafing, unlike in nDoom where there was a separate button to do so.Ok, thanks.No, I think Darl's problem with nDoom is that you control the whole player's movement with the touchpad. In your game, the touchpad only controls the camera so it should not become annoying :)
I asked this question, because some people seem to prefer clicking... (like Darl181)
Moreover, you have to be able to look up and down, which all the raycasting engines that I know don't support.
So I think that I will keep my 3D engine for now (which isn't far from a voxel engine).
Do they have the same issues as in Duke Nukem 3D though? When you looked up/down in that game, vertical perspective didn't work, so the top of buildings looked taller than the bottom. In fact, when looking up, all that happened was that the camera moved up like if the scene was just a 2D picture.Moreover, you have to be able to look up and down, which all the raycasting engines that I know don't support.
So I think that I will keep my 3D engine for now (which isn't far from a voxel engine).
There are techniques in raycasting that allow for looking up and down and even changing the pitch/roll too. They are fairly complex but they still have major advantages over traditional 3D rendering. Especially when it comes to speed, and the ability to alter the map realtime, due to the nature of the map data. You can treat the map as a giant rectangular prizm to make things easier.
I really need to find that tutorial that covers all of these things, it might be helpful to you in the future with this project, you can use some of the techniques for other things in the game possibly.
Also nice chockosta. Any possibility to have the checkerboard work vertically as well, not just horizontally?Yeah, I will add a vertical checkboard too.
On a more general note, I made some progress !Is it okay to also add in 4 and 6 to strafe? And I'm not sure, but I think that 5 would be better for backwards movement, since it is more like a keyboard of a computer, and you dont have to reach as far for the button. It's just right underneath (just slide your thumb down :D)
You can now remove blocks (with tab). Adding blocks require a bit more work, but I should come with a new version tomorrow.
I also chose 8 and 2 to move, I added a cursor, and I filled the background in blue.
:D I NEED DOWNLOAD!woah woah woah! slow down! progress for such an epic project isn't that fast! Patience, my young padawan.
and when you destroy a block do you get it in your inventory?
and trees should be added too
:D I NEED DOWNLOAD!woah woah woah! slow down! progress for such an epic project isn't that fast! Patience, my young padawan.
and when you destroy a block do you get it in your inventory?
and trees should be added too
Is it okay to also add in 4 and 6 to strafe? And I'm not sure, but I think that 5 would be better for backwards movement, since it is more like a keyboard of a computer, and you dont have to reach as far for the button. It's just right underneath (just slide your thumb down :D)Yes, those are nice ideas. I'll add them as soon as possible.
:D I NEED DOWNLOAD!Well, since I didn't create the inventory yet, you don't get the blocks that you destroy :p
and when you destroy a block do you get it in your inventory?
and trees should be added tooIndeed, this should not be complicated. But I'll work on the world generator later. (and I'll add biomes too !)
:D I NEED DOWNLOAD!:D SAME FOR ME! :P
About 5 as down key, if you don't want to choose between people who want 2 as down key and those who want 5, just put both ;)Is it okay to also add in 4 and 6 to strafe? And I'm not sure, but I think that 5 would be better for backwards movement, since it is more like a keyboard of a computer, and you dont have to reach as far for the button. It's just right underneath (just slide your thumb down :D)Yes, those are nice ideas. I'll add them as soon as possible.
Played a bit with my raycasting function and I am now able to add cubes !
I am proud to show you the very first dirt house in the history of nCraft :P (see attached screenie)
Unfortunately, this helped me dicovering a graphical glitch : sometimes, a cube doesn't seem to be sorted properly.
Not very annoying, but I still have to repair this.
I hope I will fix it soon...
Cows? Pigs? Creepers? TNT?
Played a bit with my raycasting function and I am now able to add cubes !Any idea when you plan for the next download to come out?
I am proud to show you the very first dirt house in the history of nCraft :P
Unfortunately, this helped me dicovering a graphical glitch : sometimes, a cube doesn't seem to be sorted properly.
Not very annoying, but I still have to repair this.
I hope I will fix it soon...
Played a bit with my raycasting function and I am now able to add cubes !im tired of no download D: can you release this even with the bug?
I am proud to show you the very first dirt house in the history of nCraft :P (see attached screenie)
Unfortunately, this helped me dicovering a graphical glitch : sometimes, a cube doesn't seem to be sorted properly.
Not very annoying, but I still have to repair this.
I hope I will fix it soon...
im tired of no download D: can you release this even with the bug?
^indeed! Patience isn't what most of us have ;)I agree with them, the bug is only a displaying bug, not an irrevocable crash so a demo of this with the bug would already be awesome.
Annoyingcalc, I can see you are fairly obsessed... With your avatar and all.... LOL XDYep and so are pretty much all my friends
I have a question of my own, how exactly are you 'sorting' the cubes to draw? Are you actually putting their distances in a list and sorting them?Yes indeed. I pretty much optimized the sorting algorithm, but if you know a better way, I would like to know it
Also, I thought about something that may be a faster way to draw the cubes but I am not sure if that will work so I first need to know some things:I don't think that ndless does that, but it's quite easy to code.
-can you draw arbitrary sizes of sprites with Ndless C ?
-can those sprites support transparency ?
Ok, ok, here is the current version :) (I also can post the source code, if you want)im tired of no download D: can you release this even with the bug?^indeed! Patience isn't what most of us have ;)I agree with them, the bug is only a displaying bug, not an irrevocable crash so a demo of this with the bug would already be awesome.
Also, I thought about something that may be a faster way to draw the cubes but I am not sure if that will work so I first need to know some things:I don't think that ndless does that, but it's quite easy to code.
-can you draw arbitrary sizes of sprites with Ndless C ?
-can those sprites support transparency ?
Why ?
Ok, ok, here is the current version :) (I also can post the source code, if you want)The source code would be interesting ;)
Isometric 3D would look extremely weird and is not at all suitable for first person games.Yes, but read my post again, there is the adaptation of the method for non-isometric 3d ("real" 3d).
No, this wouldn't work (if I got it correctly)Also, I thought about something that may be a faster way to draw the cubes but I am not sure if that will work so I first need to know some things:I don't think that ndless does that, but it's quite easy to code.
-can you draw arbitrary sizes of sprites with Ndless C ?
-can those sprites support transparency ?
Why ?
Well I thought about a 3d drawing method that could speed up the game, but I am not really sure.
Basically, it is based on the isometric 3d idea.
In isometric 3d, all the cubes are the same, so you only need to draw one in 3d, then use the image of this cube as a masked sprite to draw all the other ones.
In non isometric 3d, one cube is not enough since not all the cubes are seen from the same angle, but one cube per line is enough. If you have n aligned cubes you draw one of them using your current 3d engine, then use the image of this cube as a masked sprite to draw the other ones, using some sprite scaling.
So basically, if you have n lines of m cubes each, you don't need to draw n*m cubes in 3d but only n cubes and n*m sprites.
Do you get what I mean (or is my English really bad :P) ?
The source code would be interesting ;)Here you are :)
First off, it is important to note that whenever the camera is within a voxel, the voxels that are rendered are sorted relative to the distance they are to that voxel. Consequently no matter what voxel the camera is in, the order of the rendered voxels is always the same relative to the center camera voxel. What this means is that you can presort a large number of voxel positions into an array based on how far they are from a center voxel, and simply use those positions relative to the camera to render.Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...
This works, but it can take up a large amount of memory. If that is a problem, there is another solution that I discovered when working on my Castle Storm game, which uses a similar rendering method. The way it would work is by drawing the voxels (still relative to the camera position) in shells, and it is painfully difficult to explain, so if you are interested, I can whip up some sort of gif or example and we can talk from thereMemory isn't a big problem on the TI-Nspire. i can achieve full world renders, which means that I use an array containing more than 30,000 floats...
Now, this would speed up the sorting of cubes, but it would not actually speed up the drawing, which is probably another main bottleneck. First off, since you are only rendering cubes, you can always discard the faces that are facing away from you. This is a rendering trick you can use on convex objects, that any faces that are facing away from you cannot actually be seen. Additionally, you can use a simply dot product to detect whether or not a face is facing away from you, so it is super speedy and results in half of your faces being discarded!I already do that :)
Another method would be to look at the cubes surrounding a cube to be rendered. When you go to render a cube, you can look at neighboring cubes to see if they are solid, if not, you do not have to render the connecting face! This should result in significant speedups hopefully, since using these methods would drastically cut down on the number of polygons you need to render in any given frame.This could improve my drawing function indeed, since I draw every cube that "touches" an empty block...
Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...
I can't really see how well that would work when you rotate the camera though.Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...
Mmm it's a bit hard to explain, but think of it this way. Every single frame you are sorting the blocks according to distance, and every single frame you arrive at the exact same order. Every single frame you always render the farthest blocks first, followed by closer blocks, and finally centering on the camera. Instead of re-sorting the blocks every frame, you could just generate a sorted list when the game starts, that way you never have to sort again.
I can't really see how well that would work when you rotate the camera though.Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...
Mmm it's a bit hard to explain, but think of it this way. Every single frame you are sorting the blocks according to distance, and every single frame you arrive at the exact same order. Every single frame you always render the farthest blocks first, followed by closer blocks, and finally centering on the camera. Instead of re-sorting the blocks every frame, you could just generate a sorted list when the game starts, that way you never have to sort again.
Uh no, it's not, that's my point. Just think about turning 90 degrees to the right for example, your list of sorted blocks will then go from left to right rather than from far to near.I can't really see how well that would work when you rotate the camera though.Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...
Mmm it's a bit hard to explain, but think of it this way. Every single frame you are sorting the blocks according to distance, and every single frame you arrive at the exact same order. Every single frame you always render the farthest blocks first, followed by closer blocks, and finally centering on the camera. Instead of re-sorting the blocks every frame, you could just generate a sorted list when the game starts, that way you never have to sort again.
Well I suppose you would have to be considering all blocks around you equally, and then throw them out if they are outside of the camera view. Since the sorting of blocks should be independent of camera angle anyway.
Thanks for the help !hm I get a crash when I press F sadlyFirst off, it is important to note that whenever the camera is within a voxel, the voxels that are rendered are sorted relative to the distance they are to that voxel. Consequently no matter what voxel the camera is in, the order of the rendered voxels is always the same relative to the center camera voxel. What this means is that you can presort a large number of voxel positions into an array based on how far they are from a center voxel, and simply use those positions relative to the camera to render.Seems interesting. Could you give an exemple ? Because of my poor English skills, I'm not sure that I've got it very well...This works, but it can take up a large amount of memory. If that is a problem, there is another solution that I discovered when working on my Castle Storm game, which uses a similar rendering method. The way it would work is by drawing the voxels (still relative to the camera position) in shells, and it is painfully difficult to explain, so if you are interested, I can whip up some sort of gif or example and we can talk from thereMemory isn't a big problem on the TI-Nspire. i can achieve full world renders, which means that I use an array containing more than 30,000 floats...Now, this would speed up the sorting of cubes, but it would not actually speed up the drawing, which is probably another main bottleneck. First off, since you are only rendering cubes, you can always discard the faces that are facing away from you. This is a rendering trick you can use on convex objects, that any faces that are facing away from you cannot actually be seen. Additionally, you can use a simply dot product to detect whether or not a face is facing away from you, so it is super speedy and results in half of your faces being discarded!I already do that :)Another method would be to look at the cubes surrounding a cube to be rendered. When you go to render a cube, you can look at neighboring cubes to see if they are solid, if not, you do not have to render the connecting face! This should result in significant speedups hopefully, since using these methods would drastically cut down on the number of polygons you need to render in any given frame.This could improve my drawing function indeed, since I draw every cube that "touches" an empty block...
By the way, I added a function to render full world with F.
You now can see your creations properly :)
Full renders take about 5 secs to generate...
But as I said, I use more than 30,000 floats, so I'm afraid that it might crash grayscale Nspires, which don't have so much RAM. (it doesn't crash the grayscale emulator, though)
hm I get a crash when I press F sadly
ti-nspire CX OS 3.1.0
hm I get a crash when I press F sadlyYes, if there is no much free RAM, it crashes.
ti-nspire CX OS 3.1.0
Is there a jump key?No, but that's planned. By the way, which keys should I use ? Because Augs said that the current ones are inconvenient...
This is great.Saving is indeed the next big step.
Also seconded on the saving. Even if it's just a savestate or something, it'd be worth it :D
Is there a reason you use double instead of float? If you don't really need the extra precision, you can go with float and use half the space (and probably less processing time too)Yes, I changed to floats yesterday, like 30 minutes after posting my code :P
Because Augs said that the current ones are inconvenient...
Also, is an inventory being planned?
Darn, those screenshots with landscapes and built stuff (such as in Annoyingcalc's avatar):D
Yes, maybe :)QuoteAlso, is an inventory being planned?
Like this?(I made this in 1 minute)
(http://i.imgur.com/E0vfg.png)
Sorry, but I don't have time to work on it this week-end, because of my math club
Ok for movement (if the touch pad is implemented) how about gliding over the touch pad moves the camera in that direction, and clicking in that direction moves the player. So pretty much the ndoom controls for navigation :P. But for blocks, scratchpad and doc lay blocks, tab and menu to remove blocks, ctrl and del for jump. Or just have a menu when the program starts up that has options so the user can change the controls. That's my two cents.Lol these were mentioned wayyyy ahead of ya :D Everybody's got the same general idea for movement. (Though the ndoom part would only be good for looking around, not for moving, or else strafing would be weird. So basically, gliding your finger moves the camera, but not the player)
Yes you should use 7 to break blocks and 9 to place blocks.
Lol these were mentioned wayyyy ahead of ya :D Everybody's got the same general idea for movement. (Though the ndoom part would only be good for looking around, not for moving, or else strafing would be weird. So basically, gliding your finger moves the camera, but not the player)
A good control scheme would make it so you don't have to move your hand; just your fingers. So having menu or scratch pad to place/remove blocks would mean you would need to move your hand from the touch pad and to the buttons however having my control system would not require you to move your hands.
Actually being able to go beyond the edge of the world is a bug as well. It would be nice if it was fixed lol.This is now fixed :)
Maybe it would be a good idea to include the controls with every release in a post so we don't have to search all 16 pages of the topic to find them. :PYes, I will do this, sorry :) .
Question: Will there ever be crafting, I know it is a long way away but will it ever come?Obviously ;)
You know, last night I spent hours playing that game. If you add saving to any file so people can share maps, just in its current status the game might be so addicting that it will be like a fully finished calc game hit.Oh sorry, didn't see that post.
Two bug reports, however:
-I noticed that from time to time, the touchpad stops responding. I have to release it then press it again so the camera rotates again.
-Also, unlike other Nspire games, I noticed that to actually move the camera around, the fingers have to be exactly on the touchpad arrows, not 1mm below nor above. You have to be very accurate, else no camera move happen. Would it be possible to make it like nDoom, gbc4nspire and stuff, so that even if your fingers are too low or too high, the touchpad still responds? That could also allow diagonal camera movement, which are currently impossible it seems.
Feature suggestion:
-Lower resolution mode, where the game 3D can be changed from 320x240 to 160x120 and 80x60. Would that help increasing speed? If so, then you could add the next feature too.
-Longer viewing range. Currently blocks about 8 steps away from you disappear. It would be nice if we could choose a deeper field of view. That way if you build large stuff, you can still view them all at once when farther away.
Well OK. I was also curious about mobs.A. Yes, I hope so.
A. Will they ever exist?
B. I think they should be 2d like doom mobs.
C. Sorry for asking so many questions, I am just really interested in this project.
Question: When you display cubes, do you draw each side even when they're hidden?No, I dont :)
New version !Hehe, this is why I didn't disconnect. When I saw Levak answered you, I thought "the update is for tonight" :P
You now can save your progress :)
As I said to Hayleia on TI-Planet, the main speed loss isn't caused by cube drawing.So then the main speed loss is coming from sorting them?
Off course rectangles would be faster, but I'm not sure that it worth the quality loss.
The world is saved each time you quit the game. The save file is quite heavy (800 KB) but its size could be reduced by more than half with a good compression.The problem I see with compression is that loading and saving will take more time. Anyway, 800 KB is not heavy at all by the way. I see you don't play The Urbz (more than 20 MB) ;)
To avoid saving wrong stuff on your world, I guess you could maybe duplicate it before running the game and rename your backup copy in case.+1, a number of computer programs implement that good safety measure, though it temporarily requires a bit more storage space.
A few suggestions:-Yes, a red block could be useful for creations... (Redstone ? TNT ? Red wool ?)
-A red block
-Make diamond rarer
/me hugs Chockosta BEST NSPIRE PROJECT EVER!Thanks for the support :D
you should make it like minecraft alpha, with the backgrounds having dirt blocks and have an option for 10 worlds
That's pretty hard to say.As I said to Hayleia on TI-Planet, the main speed loss isn't caused by cube drawing.So then the main speed loss is coming from sorting them?
Off course rectangles would be faster, but I'm not sure that it worth the quality loss.
Also, I had some suggestions:-The first one is a good idea indeed
-change the order of the menu options: put "load" first and "new" in second, because we only need to choose "new" once and then, we always choose "load" ;)
-for now, quitting always save, but a way to quit without saving would be great too :) (other than a reboot)
To avoid saving wrong stuff on your world, I guess you could maybe duplicate it before running the game and rename your backup copy in case.You mean like Axe Parser backups ?
Check out this castle I just built!Wow, awesome castle !
What is a "dirt background" ? ???/me hugs Chockosta BEST NSPIRE PROJECT EVER!Thanks for the support :D
you should make it like minecraft alpha, with the backgrounds having dirt blocks and have an option for 10 worlds
A "dirt" background would indeed look nice.
Yes, shift+esc for example.Also, I had some suggestions:-The first one is a good idea indeed
-change the order of the menu options: put "load" first and "new" in second, because we only need to choose "new" once and then, we always choose "load" ;)
-for now, quitting always save, but a way to quit without saving would be great too :) (other than a reboot)
-Would a shortcut like shift+esc to quit without saving be okay ?
Well, if you add my idea and the support for several savegames, the backup idea would not be very useful ;)To avoid saving wrong stuff on your world, I guess you could maybe duplicate it before running the game and rename your backup copy in case.You mean like Axe Parser backups ?
It would take twice as much memory, and it would add a loading time before starting to play...
This could be a good idea too, but isn't Hayleia idea sufficient ? (An option to quit without saving)
He means the background of the minecraft menu in the days of alpha/beta:What is a "dirt background" ? ???/me hugs Chockosta BEST NSPIRE PROJECT EVER!Thanks for the support :D
you should make it like minecraft alpha, with the backgrounds having dirt blocks and have an option for 10 worlds
A "dirt" background would indeed look nice.
The graphics of this game remind me of thisLol, CubeField :P
http://i.imgur.com/yQ4U1.jpg
Any chance you can lower the FOV? It's a little hard to look around underground. Other than that, i'd say it's awesome ^_^Doesn't you mean increasing the fovy ? A lower fovy reduces the field of view...
Chockosta do you plan to post a sav file of those maps?Well, it contains developpement features and couldn't be opened with the public release.
Also it would be nice if we couldn't get that far inside walls, so view doesn't get strange when too close from walls.Yes, I hate this too. But the problem is not whith going far inside walls, it is abount displaying faces whith vertices which are behind the player.
Well, try to reach 9000 points in the Lua version, and you'll change your mind about which one is faster :PThe graphics of this game remind me of thisLol, CubeField :P
http://i.imgur.com/yQ4U1.jpg
This was ported to Nspire in Lua and to z80 in Axe.
And it is faster on the z80 O.O (and it could be even faster with Full mode *.*)
Try to reach 20 points in the z80 version with Full mode and you'll change your mind too :PLol, CubeField :PWell, try to reach 9000 points in the Lua version, and you'll change your mind about which one is faster :P
This was ported to Nspire in Lua and to z80 in Axe.
And it is faster on the z80 O.O (and it could be even faster with Full mode *.*)
As you may have noticed, developpement has slowed down a bit. During a week or two, I was coding around three hours a day, and it was really tiring. Currently, I play minecraft (the real one) and spend less hours on the computer, so updates will be less frequent.Don't worry, there is already a lot to do with this version we already have, so no need for frequent updates ;)
In USA. In Canada for $150 you most likely won't even get a dual core processor. :P
$150 gets you a quad-core (1.4 GHz) ARM dev board with 1 GB of RAM, and goodies (keyboard, mouse).
I changed some of the code to add more textures and items, and added a further view distanceXD you could fool someone (like I did ,I love tricking friends)
However, this made the program lag more
http://youtu.be/H858JBR6SJc
[OT]nClock is great, but I think if it shows the seconds it'll take much battery.[/OT]The interruption of the syscall (call it refresh) is always the same and was there before nClock. The only thing that can waste battery are divisions (that are optimized here) and pixel manipulations.
In my case I was running an older version of Nover at first and when I set my calc to 242 MHz or something it ran OK except when I launched nCraft I had to re-install the OS. With the new version of Nover I can run the game at 246 MHz fine, though. Of course the MHz depends of the calc, because some people can't go above 220 and others can go up to 270.
yea i only had the cpu set for 220 mhz and the ahb at 74That's your problem: don't increase the AHB frequency. The warning at anything above 66 MHz is there for a reason - memory easily gets corrupted at higher frequencies :)
Wouldn't that take a long while to update the water, though? If, for example you dig a big hole in the roof of a cavern and there's water above it, but every frame the game checks one map block for possible falling water, out of 3000 blocks, then the water would fall down one block every 10 minutes or so ???.Every time a block is changed in Minecraft (for example placing or breaking one), it causes what's called a block update in blocks that are next to it (the closest 6 blocks, I think. Or is it 26?) These nearby blocks are then checked for updates, like water moving or a redstone device receiving a signal. If that block changes, it also causes a block update, which can lead to a chain of them in some cases. For example, removing the block under a pile of sand would cause a block update in the bottommost sand block, making it fall. That block would then cause a block update in the block above it, causing another block update, and so on.
By the way do you plan to add trees (perhaps with a darker green block) to map generation?Yes :)
I assume that falling sand blocks and water would be impossible, though, since that requires a ridiculous amount of physics and you would have to update thousands of blocks location/multiplications (128x128x32 I think, right?) every few frame...I think it would be possible, like BuilderBoy and Leafy said, I don't have to check every block, just "active" blocks.
Today I was running nCraft and it froze up, rebooted my calc, and I had to reinstall the OS. Just thought you ought to know.Oh, sorry :/
So I was playing nCraft, and since the start I felt there was something wrong but I could not put my finger on it. But now I can put my finger on it! The blocks are to big and the game seems to "zoomed in". Maybe it is just me but do any of you guys feel the same way?I guess that's mostly since the screen is small and if there were more blocks, like mentioned before, it would take longer to render and would cause speed issues.
Hey, would this be possible to put this on the nspire?Possible or not, this should be posted in the nDoom topic, not here ;)
http://www.moddb.com/mods/minecraft-doom
Its minecraft doom, and while it isn’t minecraft (you can’t mine, build, ect.), it sure beats the other maps and skins in doom.
I downloaded it, and it has no wad file, so I couldn’t send it to nDoom
I ddon't know how to display triangles when some vertices are behing the player.
I ddon't know how to display triangles when some vertices are behing the player.
There are triangles in nCraft? O.O
So I was playing nCraft, and since the start I felt there was something wrong but I could not put my finger on it. But now I can put my finger on it! The blocks are to big and the game seems to "zoomed in". Maybe it is just me but do any of you guys feel the same way?Yeah I noticed that the view seemed quite overly zoomed in ???. Is it due to speed issues or something? In first persoon view games, normally with a 2 blocks high wall, you still see above and below the blocks even when standing right in front of them.
But I will probably get back to this within a few weeks (I hope so).
Moreover, it seems that I can't develop the same program during a long period... I don't feel courageous enough when I go on my computer, and I end up spending my time watching random things on the internet :P
I don't feel courageous enough when I go on my computer, and I end up spending my time watching random things on the internet :PSame for me. :D
We haven't had an update for weeks. I am not complaining, I am just wondering. Are you working on something else? Or is there some huge update coming up?Same here D:
This is an outrage!I do!
nCraft is very fun to play, if you have the time keep on pushing who else agrees with me?
If we didn't, why would we be asking for more? :DThis is an outrage!I do!
nCraft is very fun to play, if you have the time keep on pushing who else agrees with me?
Just saying : Do you guys know that school work (at least in France) can be really time consumming ?Well it depends of people, since Hayleia seems quite active working on stuff. I think stuff like Chockosta or sometimes even people dropping out of calc stuff can have some influence too.
If Chockosta hasn't updated its game for months it's likeky because he has a lot of stuff at school.
Currently, I'm working on a Touhou-like shooter in lua, but I will finish it quite soon and I'll most likely go back to nCraft.http://ourl.ca/17836
From what I remember he lost interest because he couldn't find any way to make the game run faster and was very disappointed at the speed so far. Working with 3D is very challenging so that can be understood. I don't remember if the source is published but if it's the case then someone could maybe help, though.
If he does, I hope he told it Chockosta la vistaThat is one epic line :P
Yeah, awesome :DIf he does, I hope he told it Chockosta la vistaThat is one epic line :P
Erm, what ? I just read that sentence and don't very agree with the fact I am active working on stuff :PJust saying : Do you guys know that school work (at least in France) can be really time consumming ?Well it depends of people, since Hayleia seems quite active working on stuff. I think stuff like Chockosta or sometimes even people dropping out of calc stuff can have some influence too.
If Chockosta hasn't updated its game for months it's likeky because he has a lot of stuff at school.
2) Leave optimization, it runs fine with Nover. Start on something fun, like crafting or generating the world. Fun things are motivating because you like what you are making.
This isn't the Holy Grail of Calculators. If you add more stuff, then it will run even more slowly. By the way, optimization is a good programming exercise.
): Is this project officially dead now?No. Guys calm down.
Currently, I'm working on a Touhou-like shooter in lua, but I will finish it quite soon and I'll most likely go back to nCraft.
Maybe not only this is dead, but Chockosta might have actually ditched calc programming entirely as well, since he hasn't been around much lately. I think a 3D minecraft might be too much for the Nspire anyway, because of the individual 3D blocks. A 3D game with standard, non-modifiable landscapes would probably work.Well, he did compete in the ti-concours...
EDIT: Nvm he's into danmaku now, which is why he doesn't code.