[General Algorithme] 3D engines
Moderator: MaxCoderz Staff
It doesn't seem to make much of a difference. I gave my crappy old code to some people back then, and they didn't do anything with it. Which doesn't surprise me, because it would've been more work to try to understand that piece of crap than to rewrite the thing from scratch, which those people weren't capable of at the time That's usually how things go with assembly, it's easier to rewrite the entire thing than to work with old code that isn't structured the way you want/need it. I've even had that with my own projects several times.
Besides, I usually intend to get back to my projects and I don't want to give it all away while I'm working on it... Of course in the long run I usually don't get back to it, but you get my point.
Besides, I usually intend to get back to my projects and I don't want to give it all away while I'm working on it... Of course in the long run I usually don't get back to it, but you get my point.
I don't think I understand what you're saying, could you please repeat that for a foreigner with no clue about image manipulation and 3D rendering?how well would building a flat buffer to represent a ~120 degree FOV, and use a lookup table to distort it all at the same time? Not exactly sure how one would program that, or if it would even be more efficient than what you are doing, though.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- Jim e
- Calc King
- Posts: 2457
- Joined: Sun 26 Dec, 2004 5:27 am
- Location: SXIOPO = Infinite lives for both players
- Contact:
I believe he refering to a method to make it look like you can rotate you direction smoothly, to have it appear this is true 3d. Something like a reverse fishbowl... I don't think it'd be hard to implement, though I have no idea what it would look like.Timendus wrote:I don't think I understand what you're saying, could you please repeat that for a foreigner with no clue about image manipulation and 3D rendering?how well would building a flat buffer to represent a ~120 degree FOV, and use a lookup table to distort it all at the same time? Not exactly sure how one would program that, or if it would even be more efficient than what you are doing, though.
How many buffers need to be merged? if it were just three I'd say do it in the wasted clocks cycles of the lcd code. being grayscale that could make things tougher.
Now if you buy a real calculator like 84+SE, you raycast grayscale no problem.
- Fr0stbyte124
- Regular Member
- Posts: 75
- Joined: Thu 16 Feb, 2006 9:59 pm
I fail to see how your fancy USB and external clock put you above the rest of us.
But reverse fishbowling is basically what I meant. It might be too slow, though, because of all the bit shifting that would be involved. On the other hand, since it would be exactly the same effect throughout the simulation, it is theoretically somewhat plausable that one could make a massive lookup table and super efficient routine that could map it within an interrupt cycle.
I've just started on graphics, so I don't know what would work best on an 8 bit platform. The lack of multiplication would certainly make things unpleasant. Maybe raycasting is best.
But reverse fishbowling is basically what I meant. It might be too slow, though, because of all the bit shifting that would be involved. On the other hand, since it would be exactly the same effect throughout the simulation, it is theoretically somewhat plausable that one could make a massive lookup table and super efficient routine that could map it within an interrupt cycle.
I've just started on graphics, so I don't know what would work best on an 8 bit platform. The lack of multiplication would certainly make things unpleasant. Maybe raycasting is best.
Ah, I understand now. I was thinking about something like that, but only to make rotations look more smooth. In some demo Ben wrote he slides the front image from the screen to the side to replace it with the image of the new direction you're looking in, so it looks a bit like you're rotating. I do indeed intend to try to improve that with a reversed fishbowl like effect, though I'm not sure it'll be fast enough in greyscale for enough frames to make it look good.
I've ditched the idea of OR-ing images, I now build the screen with several vertical images next to each other. Going through a LUT and comparing with the map determines which vertical image has to be shown in which column. It works alright, and it's pretty fast even with greyscale.
I've ditched the idea of OR-ing images, I now build the screen with several vertical images next to each other. Going through a LUT and comparing with the map determines which vertical image has to be shown in which column. It works alright, and it's pretty fast even with greyscale.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
Herm... I was precisely about to evoke the hypothetical possibility to gather certain interesting aspects of "3D-engines" attempts for the z80, and finally get something usable. Doesn't seem to be a good idea.CoBB wrote:No! Why do so many people get the idea that adding more coders improves development? It's rather the opposite.Stickmanofdoom wrote:It seems to me that the most practical way to get a 3d engine for z80 calcs would be to get many community members involved in different parts of an engine.
This is what I got so far:
I'm sorry about the noise, that's what RGP and PTI come up with.
It's actually too fast now, as you may be able to see it detects more keypresses than I intend to give it several times But that won't be a problem, I still have a few things that I have to code that'll slow this down, like the animated rotation. I'm not going for the fishbowl after all, because I realized that my images don't fit onto each other so it'll only look ugly. I'll try "Ben style" screen sliding instead
I also still need to mask the top and bottom edges of the slanted walls, so they don't overwrite the background (the background image holds the roof, the floor and the pointless "status screen"). Though I kinda like the smooth grey surfaces, so I'm not sure if that's still neccessary
Anyway, I think this is pretty much as 3D as you'll be able to get when you want to use greyscale. Unless you pre-render everything, but then you wouldn't be staying under 5000 bytes without compression like this thingy does
I'm sorry about the noise, that's what RGP and PTI come up with.
It's actually too fast now, as you may be able to see it detects more keypresses than I intend to give it several times But that won't be a problem, I still have a few things that I have to code that'll slow this down, like the animated rotation. I'm not going for the fishbowl after all, because I realized that my images don't fit onto each other so it'll only look ugly. I'll try "Ben style" screen sliding instead
I also still need to mask the top and bottom edges of the slanted walls, so they don't overwrite the background (the background image holds the roof, the floor and the pointless "status screen"). Though I kinda like the smooth grey surfaces, so I'm not sure if that's still neccessary
Anyway, I think this is pretty much as 3D as you'll be able to get when you want to use greyscale. Unless you pre-render everything, but then you wouldn't be staying under 5000 bytes without compression like this thingy does
Last edited by Timendus on Fri 04 Apr, 2008 9:52 am, edited 1 time in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- Fr0stbyte124
- Regular Member
- Posts: 75
- Joined: Thu 16 Feb, 2006 9:59 pm
It looking great. If you want to do rotaions with that, I think probably raycasting is the way to go.
James Montelongo made a raycasted grayscale program some time back, so it's certainly possible.
http://www.ticalc.org/archives/files/fi ... 36011.html
I haven't been able to find his source. It's not hosted on his website anymore.
James Montelongo made a raycasted grayscale program some time back, so it's certainly possible.
http://www.ticalc.org/archives/files/fi ... 36011.html
I haven't been able to find his source. It's not hosted on his website anymore.
Wow, Jim, that's pretty damn fast Is it really that fast, or did you spice up the gif?James Montelongo made a raycasted grayscale program some time back, so it's certainly possible.
http://www.ticalc.org/archives/files/fi ... 36011.html
I mean... I know you're a damned brilliant coder, but this is faster than the b/w z80 raycasters...
*watches the screenshot once more*
Can I marry your brain?
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS