301
TI-Nspire / Re: nspire Linux Questions
« on: September 04, 2014, 12:18:18 pm »
Well, how do you load the module? Did you compile it?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 301
TI-Nspire / Re: nspire Linux Questions« on: September 04, 2014, 12:18:18 pm »
Well, how do you load the module? Did you compile it?
302
TI-Nspire / Re: nspire Linux Questions« on: September 03, 2014, 03:28:46 pm »
Yes, it should be. Just be sure it's for ARMv5 (ARM926ej-s) and not above.
303
TI-Nspire / Re: nspire Linux Questions« on: September 03, 2014, 12:29:47 pm »
IIRC somebody did that already.
304
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 28, 2014, 04:08:36 pm »
I had a quick look at the redstone code in minecraft, most of it is handles by BlockRedstoneLogic.java and it doesn't seem that there is any double-buffering happening at all. That doesn't explain the patterns, though.
305
TI-Nspire / Re: nGL - a fast (enough) 3D engine for the nspire« on: August 26, 2014, 10:50:34 am »Quote I saw the textures in crafti were a little wonky (maybe for speed reasons), are there any texture routine more accurate?Depends on what you mean by "wonky". Some inaccuracies are due to the fixed point math. For obvious reasons it's doing Affine texture mapping, but you don't notice that much while playing. The problem is, that for every scanline, the X distance is the total length of the line. If you want to do it the "correct" way, the length is sqrt(dx*dx+dz*dz), but doing it every line (or like quake, every 5th or so) is still a whole lot too slow. And I can't use the invsqrt trick, as that only works for floats. 306
TI-Nspire / Re: nGL - a fast (enough) 3D engine for the nspire« on: August 26, 2014, 10:16:41 am »
There's not a seperate repository for it, but you can copy the nGL files from https://github.com/Vogtinator/crafti.
The core files are: gl.cpp gl.h triangle.inc.h glconfig.h fix.h fastmath.cpp fastmath.h For some 2D functionality: font.cpp font.h texturetools.cpp texturetools.h And basic 3D stuff: aabb.cpp aabb.h glbox.cpp glbox.h gldrawable.h 307
TI-Nspire / Re: The simulator of the most powerful scientific calculator - now on NSpire!« on: August 25, 2014, 09:35:03 am »
The source code can be found on GitHub and the latest commit says "TouchPad & CX Supported.".
308
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 09:13:14 pm »
I just tried the same thing as above in 1.6.2, the screenshot was made using 1.5.2, and it seems to work, although still "buggy".
I'd expect that: 1. Redstone gets powered 2. Repeaters realize they get powered -> Repeaters turn on 3. Repeaters realize they're powered by another repeater -> Lock on state 4. This state is stable But it's more like: 1. Redstone gets powered 2. One repeater realizes it's getting power -> Turns on 3. Repeater next to 2. realizes it's being powered by another repeater -> Lock current (still off) state 4. Repeat for next two -> Pattern 5. Also stable state Bug? Or two, actually (2. + 3.) There may also be a relationship with repeater orientation, the locked repeaters face the same/opposite direction. If the ticks were in a specific order, the pattern wouldn't be diagonal, would it? Screenshot: 309
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 07:00:41 pm »
I'm tired, so I'll get MCP tomorrow and have a look at the source, but I could get something even weirder. Which version of MC do you have?
310
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 06:22:23 pm »
Oh, the repeater is necessary? I didn't know that, I haven't played minecraft in years (only before beta 1.7).
A repeater is itself a block, so it adds a delay of 1 tick minimum. 311
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 05:24:12 pm »Oh, I thought it was your implementation... The reason could be that minecraft does it the way I mentioned: Random ticks per chunk, but it has to tick every block in a chunk first before it ticks a block the second time (I'm not sure how to explain it better). What happens if you connect two not gates to the repeater inputs (input & lock) instead of a repeater? Does the behaviour change if you change orientation, location etc.?Could you draw the circuit? I found out that sometimes it's visible that the right torch turns on slightly faster than the left one, sometimes the opposite. Quote With statefulness my old Minecraft clone (years ago, lwjgl) achieved a 2-calls-per-chunk renderer (IIRC. It was an experiment how to get most performance out of LWJGL with a lot of cubes and big worlds)Well how? glBindVertexArray, glDrawElements .. nothing left to change state. I'd have 2 calls if it wasn't for the uniform buffer. [/quote] It was GL 2.0 back then, fixed function pipeline etc. I'd get the source but it's on my old hard drive I put somewhere in my room 312
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 05:09:40 pm »Oh, I thought it was your implementation... The reason could be that minecraft does it the way I mentioned: Random ticks per chunk, but it has to tick every block in a chunk first before it ticks a block the second time (I'm not sure how to explain it better). What happens if you connect two not gates to the repeater inputs (input & lock) instead of a repeater? Does the behaviour change if you change orientation, location etc.?Debugging this should be easy. Do a breakpoint at the repeater's tick function, in the block to lock it and look at the redstone state of the inputs.How do I debug minecraft? To clarify, those pictures are of how it should be, not of how it currently is in my clone. Quote With statefulness my old Minecraft clone (years ago, lwjgl) achieved a 2-calls-per-chunk renderer (IIRC. It was an experiment how to get most performance out of LWJGL with a lot of cubes and big worlds) 313
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 04:43:55 pm »Debugging this should be easy. Do a breakpoint at the repeater's tick function, in the block to lock it and look at the redstone state of the inputs.The weird thing with those is, that if you "tick" every block in a chunk in the same order (0/0/0),(0/0/1),...,(0/1/0),...(15/15/15). you can see "invalid" states.I'm using the "fill a new buffer, then make it the current one" approach now. I'm not sure how the repeater locking enigma interacts with this. I still don't see how this makes sense though: I don't see any differences of the two pictures though. (Uh, this sentence sounds and looks weird. Where's my mistake?) Quote A BIT wasteful? That's a massive understatement.. The normal is unnecessary (the GPU calculates it faster in a shader every frame), as is the redstone dust stuff. I would also replace the texture array index by something stateful. I don't know whether glBindTexture(id, GL_TEXTURE_2D) still exists. 314
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 03:06:21 pm »The weird thing with those is, that if you "tick" every block in a chunk in the same order (0/0/0),(0/0/1),...,(0/1/0),...(15/15/15). you can see "invalid" states. As calculation doesn't happen parallel to rendering (that'd be horrible, both usability- and code-wise), (15/15/15) can react to a change of (15/15/14) in the same tick. Minecraft does it a bit differently: Only a few blocks of each chunk are "tick"ed each frame. They're chosen randomly, so you get such states very seldom. It can cause horrible bugs, though.. I also thought about a game-of-life like implementation, like double-buffering. Copy the redstone state of the chunk before doing ticks and only after every block recalculated itself, make the new state the current one. Quote That could be the same situation as above. Quote Yeah, the easiest implementation. A small hint, which would have prevented some wasting of time while implementing it in crafti: You have to recalculate each part of a circuit upon removing a part of wire. Quote Minecraft does it like (wow, I didn't know I read so much about MC internals..) this: It assignes chunks virtual coordinates. The chunk you're standing on has ALWAYS (0/0/0) as virtual coordinate and the geometry is calculated based on this. Quote I get 1000000 (cubes) * 6 (faces) * 4 (vertices) * 5 (x/y/z/u/v) * 4 (bytes in a float) ~= 500 MiB and that's EVERYTHING. In the ultimate WORST case. 315
Computer Projects and Ideas / Re: Redstone-oriented Minecraft clone« on: August 23, 2014, 12:33:32 pm »You may have seen a couple of screenshots of this appear on IRC, at the time of writing it looks like this:It looks good, and that's exactly the problem I got with crafti's redstone implementation as well.. If you find a solution, let me know! Quote Anyway, the goal as I set it for this project is to be able to build/test/run redstone circuits without various minecraft annoyances, most of which can be fixed with mods I suppose..Redstone (and repeaters) on walls, ceilings, torches on ceilings as well? That'd be very useful Quote Basically it's creative mode on steroids. Nothing that distracts from just building circuits. World-edit-like godmode editing. And I have some plans for putting in things like displaying delays and critical paths and some automated circuit testing stuff (such as cycling through a bunch of different inputs without having to build a circuit to do it). None of that exists just yet, I'm just doing the basics now. Also, the ability to pauze, step, fast-forward redstone simulation.A nice feature would be to save "patterns" like gatters or special configurations and the ability to place them down wherever you like and in every orientation. Quote Some redstone logic already works to some degree, for example:Why is this wrong? Quote - repeaters. You may have hear me complain about them. A normal 1-tick repeater that isn't locked works fine. Other delays may or may not do what they're supposed to do, the screenshot above is testing how they respond to 1 tick pulses and they respond correctly. I'm not sure about other inputs though. Also, locks make no sense and are currently incorrect (correct behaviour requires time travel)."time travel"? Weird data dependancies? Or have I forgotten how they work? AFAIK it's only that the repeater doesn't change state if it's powered from the side. Quote - redstone dust, I think, works correctly in terms of which blocks it powers, what it looks like (apart from the particle effect), how far signals travel, and signals don't go down transparent diodes.How did you implement this? Minecraft does it exactly how I do it in crafti: Connected redstone dust is treated like a single thing and updated at once (for timing and loop-avoiding purposes) Quote Some things are not there but will be there soon:What kind of trouble? Should be fairly easy if you restrict it to pushing only a single block. Quote - shadows / lightlevels would be pretty, but not useful and would slow down rendering, particularly of complex+big maps.If you have chunks (exactly like minecraft) anyway, why not make the map infinite? Quote However, naively, if a redstone signal changes, that means a change in a chunk because you'd have to update some texture coordinates and that means reuploading the geometry, this time with different texture coordinates. That would make far too many chunks be reuploaded, so to counter that, I've decoupled powerlevels from geometryPowerlevels don't have to be sent to the GPU. If you mean the color of the redstone wire/dust, that's IMHO unnecessary complexity. GPUs and DMA are fast enough, so if you use VBOs, everything should be fine without these optimizations. Did you do any performance tests? Quote , so I can update them separately with only a tiny upload of only 2kb (16x16x16/2 because power levels can be packed in nibbles) versus about 1kb per solid block (minus faces that touch other solid blocks) in the chunk. It's a bad deal only if there are 1 or 2 blocks in a chunk, which is not the common case.It's really easy to implement and there's not much to mess up, if it works for the simplest case, it works everytime. Quote Polycount hasn't really been a problem so far though, a million randomly placed (but not multiple at the same location) solid blocks still render at 30FPS (on a HD6950, +vsync), I doubt any real build would even come close to that.Oh, look at youtube: "Redstone computer" Quote Tech used/platformNo, that you're using OpenGL 4, not supported by any open source graphics drivers |
|