vogtinator / crafti Goto Github PK
View Code? Open in Web Editor NEW3D Minecraft for TI Nspire calcs
License: Other
3D Minecraft for TI Nspire calcs
License: Other
I'm wondering how special block data is handled?
I can see that they use some sort of bit-shift system to store block side and whatnot, but how exactly does this work?
And other than block-side is any other data sent to blocks?
I basically just want to know how blocks are represented in terms of binary and how that works? Like what bits are used for what data.
Thanks.
Crafti will start up fine the first time you open it, but if you exit the app and try to open it later, the calculator will crash. I have a Ti nspire cx ii cas T with the 5.2 os
When I try to use Open Document on crafti.prg.tns, I am getting :
This document format is not supported
This happens with either the latest "Redstone Update" release or from
http://www.ticalc.org/archives/files/fileinfo/460/46054.html
I'm trying to turn my head, but I can't. I can move, but not my head. How am I supposed to move it? I tried the arrow pad, but it does not work. I have the ndless 5.2.0, and my calculator is a TI Nspire cx ii cas t.
"TI-Nspire CX II, TI- Nspire CX CAS II" has "64 MB of RAM, 100 MB of Flash ROM" and "ARM9 @ 396 MHz CPU" Please make an upgraded version that makes use of this extra power!
As in title; also it doesn't seem to carry a redstone signal. This is running on Ndless for OS 5.2.0.771 on a TI-Nspire CX II-T.
I'm trying to add some new blocks to crafti and a few other QOL improvements, I was wondering how the special block textures are managed, especially with special_block_texture_idx
?
Additionally, I was wondering if it would be possible to use fixed point numbers as they would give benefits of floating point numbers, but without the requirement of a FPU and would also give similar performance to current fixed-width integers (in theory?
Also, what exactly does enabling #define BETTER_PERSPECTIVE
do?
Everytime I try opening the file, it just says, "This document format is not supported".
Hello @Vogtinator,
can you tell me how to you convert your png files into byte arrays ? I'm trying to change the textures, but I'm blocked here.
Please, can you help me (or give me a clue ?)
I really enjoy this game but was wondering how to open a door, flick a switch, etc.
EDIT: If you need it, I am using the file from the last page of the omnimaga thread
My calculator:
TI Nspire 136mhz HW-B overclocked to 236mhz.
While I was building a restone lamp letters, I built a letter T (3 bocks high, 1 block on each side on top, and on the back is Redstone. There is a delay on the letter, The top will go on, then the bottom if you are in 8 blocks of distance, If you are out of the distance, Everything will look normal, Sometimes. I am running on craft 1.2 (Latest).
Is this normal?
I have been playing Crafti seriously on and off for about a month, and I have noticed that it has not been compiled for the new Processor in the TI Nspire CX II. It would run much faster if it were compiled to so do. If that is possible, it would also be possible to add working tools, pistons, observers, dispensers, a bow and arrow, and a peaceful survival mode, right?
there could be new blocks like repeaters, pistons and observers and ability to fly
I'm working on adding additional blocks and in order to do this I had to modify the terrain.png, in the long term it will no longer be 16x16 and follow something more like TU69's terrain.png, but with a modified layout to be more consistent with the existing terrain.png
But anyway, while working on that, I realised that the switchrenderer.cpp
references the texture at terrain_atlas[10][15]
I was basically just wondering what this texture is and why it is used, thanks.
Also, just wondering, other than modifying the terrain.cpp
file, would anything else need to be changed to support terrain.pngs with a larger size (in terms of rows and columns)?
and also, does Crafti natively support terrain.pngs with textures which aren't 32x32 resolution?
Thank you in advance
When I flip a lever, I very weird glitch happens. It looks like a curved rail when flipped and Redstone does not work.
Hi,
Thank you once again for the help last time! I am forever grateful.
Anyway, I realize that it seems all the inventory slots have been taken up, prevent any new blocks.
Whether this is a good thing or not, I've forked the repo and added a new branch scrolling-inventory. It adds a new feature, if the player keeps pressing down, the inventory scrolls down, and vice versa.
Do you think this is a good idea? Should there be more slots or are the ones currently available good enough? Is there anything else I should add or is it due for a redesign.
It's not complete yet. For one, there is no indication of more slots yet so users have no idea there is more.
But before I continue further, I must ask for your opinion.
If you think this is a good idea, I will be happy to open a pull request.
Thanks, M.
When I try to open the game on my handheld TI-Nspire CX CAS II it doesn't open and tells me that the document format is not supported
It would be interesting if we could maybe try to up the graphics in a setting because of the new technology. The new calcs could probably handle using floats instead of integers (in a reduced render distance)
I don't know if you ever tried using floats, but it could be interesting.
Hello, I'm trying to add pistons to Crafti, and when creating a simple block renderer with the following code, half the faces are incorrectly culled and are not visible without the TEXTURE_DRAW_BACKFACE
flag, is there any reason as to why this is happening?
void PistonRenderer::renderSpecialBlock(const BLOCK_WDATA block, GLFix x, GLFix y, GLFix z, Chunk &c)
{
TextureAtlasEntry piston_side = terrain_atlas[12][6].current;
TextureAtlasEntry piston_back = terrain_atlas[13][6].current;
TextureAtlasEntry piston_front = terrain_atlas[11][6].current;
/////
// Get the piston data
/////
const uint8_t piston_type = static_cast<uint8_t>((getBLOCKDATA(block) & piston_data_bits) >> piston_bit_shift);
//////
// GL CODE
//////
glPushMatrix();
glLoadIdentity();
glTranslatef(x + BLOCK_SIZE/2, y + BLOCK_SIZE/2, z + BLOCK_SIZE/2);
std::vector<VERTEX> piston_vertices;
piston_vertices.reserve(24);
// Piston Front
piston_vertices.push_back({0, 0, 0, piston_front.left, piston_front.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, BLOCK_SIZE, 0, piston_front.left, piston_front.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, 0, piston_front.right, piston_front.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, 0, piston_front.right, piston_front.bottom, TEXTURE_DRAW_BACKFACE});
// Piston Bottom
piston_vertices.push_back({0, 0, BLOCK_SIZE, piston_side.left, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, 0, 0, piston_side.left, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, 0, piston_side.right, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, BLOCK_SIZE, piston_side.right, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
// Piston Top
piston_vertices.push_back({0, BLOCK_SIZE, BLOCK_SIZE, piston_side.left, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, BLOCK_SIZE, 0, piston_side.left, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, 0, piston_side.right, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, piston_side.right, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
// Piston Left
piston_vertices.push_back({0, BLOCK_SIZE, BLOCK_SIZE, piston_side.left, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, BLOCK_SIZE, 0, piston_side.left, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, 0, 0, piston_side.right, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, 0, BLOCK_SIZE, piston_side.right, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
// Piston Right
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, piston_side.left, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, 0, piston_side.left, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, 0, piston_side.right, piston_side.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, BLOCK_SIZE, piston_side.right, piston_side.bottom, TEXTURE_DRAW_BACKFACE});
// Piston Back
piston_vertices.push_back({0, 0, BLOCK_SIZE, piston_back.left, piston_back.bottom, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({0, BLOCK_SIZE, BLOCK_SIZE, piston_back.left, piston_back.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, piston_back.right, piston_back.top, TEXTURE_DRAW_BACKFACE});
piston_vertices.push_back({BLOCK_SIZE, 0, BLOCK_SIZE, piston_back.right, piston_back.bottom, TEXTURE_DRAW_BACKFACE});
// Rotate Piston According To Face
BLOCK_SIDE side = static_cast<BLOCK_SIDE>(getBLOCKDATA(block) & BLOCK_SIDE_BITS);
// Rotate GL stuff
switch(side)
{
default:
break;
case BLOCK_BACK:
nglRotateY(180);
break;
case BLOCK_FRONT:
nglRotateY(0);
break;
case BLOCK_LEFT:
nglRotateY(90);
break;
case BLOCK_RIGHT:
nglRotateY(270);
break;
}
glTranslatef(-BLOCK_SIZE / 2, -BLOCK_SIZE / 2, -BLOCK_SIZE / 2);
for(auto&& v : piston_vertices)
{
VERTEX v1;
nglMultMatVectRes(transformation, &v, &v1);
c.addUnalignedVertex(v1.x, v1.y, v1.z, v.u, v.v, v.c);
}
glPopMatrix();
}
Examples of the inpropper display are:
But using TEXTURE_DRAW_BACKFACE
fixes this, do you know why this happens?
Thanks in advance
Apparently, you cannot transfer non Nspire supported files to a Nspire. Soooo I just spent +1 hr adding".tns"" to the end of all the files. Just letting you know. :) I've also included all the changed files.
crafti.zip
Could you provide a binary file for crafti?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.