Jen, came in to see what incredible things the engineers and artists had come up with. Everyone was staring at a television set hooked up to a development box for the Sony Playstation. There, on the screen, against a single-color background, was a black triangle.
I have it pretty much figured out, it was a matter of using signed routines, but I've realized something here, if I try and fill 20-30 polygons on the screen at once and move them around, uxn crawls to a halt. It might just be too slow to handle that sort of thing, I'm wondering if maybe I shouldn't consider a polygon painting port in the screen device to get native-like speed on that front, instead of uxn-space implementation of complex graphics which will just be too heavy for most platforms.
@pixelherodev @akkartik @neauoire depends on what you’re calling code and which platform you’re on. i’d wager on psx back triangles is waaaay simpler than “hello world”- it’s jungles of code if it were something like opengl, sure. but the jungliest it gets on psx was poorly documented firmware routines
@pixelherodev well… i mean, where we started were typewriters we had coaxed into typing in reaction to ascii codes. the machinery to do that was not simple but once it was built, typing hello world and getting the computer to say it back is about the simplest thing
@pixelherodev hello world started getting more complicated as software once we had to build a software typewriter first
@neauoire I've been trying to think of good ways of drawing curves from very basic parameters, so eventually I can have something that draws a scalable fonts for things like puzzle game tiles 😊
Obviously there's lots of Bresenham stuff going on, but when it comes to things like quadratic/cubic splines the numbers get very precise and floating-point 😥
So I'm trying to come up with something that can boil down to 𝘹=𝘈𝘺²+𝘉𝘺+𝘊, with support of big magnitude changes for the constants… I think…
@alderwick nice! I've only got as far as drawing circles, https://git.sr.ht/~rabbits/uxn/tree/main/item/projects/examples/gui/shapes.tal#L130
I'd like to dive into that stuff this winter :)
@neauoire In terms of your quest to fill polygons, then ear clipping is what I ordinarily recommend. I've not attempted that in 16-bit numbers before though 😉
@neauoire Aha, I've found a PDF of the original paper and it's only 300 KiB!
@ruby0x1 Oh! I've skimmed through this a few years ago but didn't need it at that time, now this is very relevant, I'll try and follow their object structure and replicate.
@ruby0x1 thanks :) I think the tinyrenderer is going to be perfect for this, I'm more familiar to translating C code to RPN than lua.
@neauoire That might be a good idea.
Filled polygons are something that, AFAIK, basically every host should be able to do --- even if it's implemented over a software framebuffer by the host, it still avoids a lot of overhead in the emulation.
@neauoire that's what I did for the first vm I started on - pretended there was a PPU to do that. I'd bitten off more than I was capable of re: fixed precision 3D, but it's a nice way to do it.
if you add some options to the fill (e.g. I would use fill with charset pattern, or dither patterns for alpha), you'll wind up with a unique look to it.
@whtrbt It might be quite primitive, the principal use of this would be to clear specific areas of the screen, and draw large shapes that don't quite fit in spritesheets.
@neauoire yes. This is definitely a better way to handle this sort of thing imo - move stuff into a device and get it right once and don't waste rom space on rendering stuff.
I've been thinking about a gpu rendering device for uxn for a while haha. Super counter to a lot of the ethos but also, hardware 3d graphics in a 64k forth.
Software rendering is cool and portable so hey could implement a software raster backend for it too, but it's a short hop from there honestly
@maxc I was looking at the VM for Another World and it has a couple of vector drawing routines.. I wonder if there should be a specific device for this, and pack some other shape drawing things in there..
Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.