#424
Posted 07 November 2015 - 06:12 PM
#425
Posted 07 November 2015 - 10:03 PM
He was a bit off in that he was talking in terms of Manufacturer's Megabytes; though I've no doubt he understood the error and just didn't want to complicate his explanation by elaborating on it. Long story short the C64's RAM (like every other device I've ever been aware of) isn't measured that way, and a full screen 4bit image doesn't quite add up to 32KB.
Even colour depth within palettes (which also consume RAM, by the way) was packed down in those days; you might assume each index would consume 24bits, but it was often less. The same technique still sees use today in some image file formats.
Hardware-controlled sprites were fun; they made it very very simple to move multiple images around a screen without worrying about how they might interfere with each other. I've got a hunch Dan may've built something along their lines into COS2.
#426
Posted 12 November 2015 - 08:01 PM
#427
Posted 13 November 2015 - 12:44 AM
┈┈┈┈╱▔╲▂▂╱▔╲┈┈┈┈
┈┈┈▕╮╱▔╲╱▔╲╭▏┈┈┈
┈┈┈╱╋▏┊▕┊┊▕╋╲┈┈┈
┈┈▕╋▕━▅━━▅━▏╋▏┈┈
┈┈▕╱▔╲▔╭╮▔╱▔╲▏┈┈
┈┈▕┊┳┊▔╰╯▔┊┳┊▏┈┈
┈┈┈╲╰━━╯╰━━╯╱┈┈┈
┈┈┈╱▔╭┈┈┈┈╮▔╲┈┈┈
┈┈╱▕┊┊┈┈┈┈┊┊▏╲┈┈
┈┈╲╱┊┊┈┈┈┈┊┊╲╱┈┈
┈┈┈▏╋┊┈┈┈┈┊╋▕┈┈┈
┈┈┈╲╋╰┈┈┈┈╯╋╱┈┈┈
╱▔╲┈╲╋╭▂▂╮╋╱┈┈┈┈
▏╋▕▂╱▏┊▏▕┊▕┈┈┈┈┈
╲▂▂▂╱▏┊▏▕┊▕┈┈┈┈┈
┈┈╱▔▔┈╯╲╱╰┈▔▔╲┈┈
┈┈╲▂▂▂▂╱╲▂▂▂▂╱ֆɨ.┈
#429
Posted 13 November 2015 - 12:16 PM
ArchTyler, on 13 November 2015 - 12:44 AM, said:
┈┈┈┈╱▔╲▂▂╱▔╲┈┈┈┈
┈┈┈▕╮╱▔╲╱▔╲╭▏┈┈┈
┈┈┈╱╋▏┊▕┊┊▕╋╲┈┈┈
┈┈▕╋▕━▅━━▅━▏╋▏┈┈
┈┈▕╱▔╲▔╭╮▔╱▔╲▏┈┈
┈┈▕┊┳┊▔╰╯▔┊┳┊▏┈┈
┈┈┈╲╰━━╯╰━━╯╱┈┈┈
┈┈┈╱▔╭┈┈┈┈╮▔╲┈┈┈
┈┈╱▕┊┊┈┈┈┈┊┊▏╲┈┈
┈┈╲╱┊┊┈┈┈┈┊┊╲╱┈┈
┈┈┈▏╋┊┈┈┈┈┊╋▕┈┈┈
┈┈┈╲╋╰┈┈┈┈╯╋╱┈┈┈
╱▔╲┈╲╋╭▂▂╮╋╱┈┈┈┈
▏╋▕▂╱▏┊▏▕┊▕┈┈┈┈┈
╲▂▂▂╱▏┊▏▕┊▕┈┈┈┈┈
┈┈╱▔▔┈╯╲╱╰┈▔▔╲┈┈
┈┈╲▂▂▂▂╱╲▂▂▂▂╱ֆɨ.┈
This is a weird way to contact me... but Redirection was never $2. The lowest it has been is $4 on sale.
#430
Posted 13 November 2015 - 12:34 PM
ArchTyler, on 14 October 2015 - 08:49 PM, said:
oeed, on 14 October 2015 - 08:42 PM, said:
"Ok, focus for the time being is back to @redirectiongame. Finances are such that I can't have two projects in development limbo at a time!"
I have been waiting to ask this question... why does redirection cost money? If we can play it for free on CC?
Before I asked this I looked at the website and it said 2$
#431
Posted 14 November 2015 - 12:04 PM

As you can see there are several glitches with rendering. It does however implement depth testing, so you don't need to sort triangles before drawing. The weird colours are due to the fact that I tried to implement colour blending, which looks much better in Love:

I've also tried to massively optimise it, but it still runs like a snail in CC (but is fine in Love which is even odder). If you want to have a look through the source, it lives on GitHub but is kinda ugly in places. It uses quite a lot of code generation - the matrix, buffer and graphics library are generated by the build file. This should mean the matrix library is slightly quicker, and also means I can generate triangle rendering code that blends z values, colours or whatever you specify - it would be easy to generate a triangle drawer using texture coordinates instead. This also means I can provide triangles with and without colour blending to speed up triangle rasterisation a bit more. This isn't really a "serious" project though, more of a way for me to learn the basics about 3D graphics.
That being said, I'm happy for people to take this and improve it - it is still pretty buggy. Also alpha blending is a thing, though I see no point of it in CC (also it is very buggy due to overlapping triangles - though I'm not sure where all of those lines have come from).

Update:
A couple of minor optimisations later and this can render a spinning cube at about 30fps - though this isn't really practical for anything advanced. Blitting to the screen is still the slowest part of this: drawing to the buffer (and calculating matricies, etc... ) takes 0.00065 seconds, compared with 0.02793 to draw to the screen.
For those interested, you can see a video here.
Another update:
I messed up some stuff and so started the next-frame timer after rendering not before hand, and so ended up running at 15fps instead (though seeing as CC's refresh rate is 20fps it doesn't really matter).
Edited by SquidDev, 14 November 2015 - 04:34 PM.
#432
Posted 14 November 2015 - 03:38 PM
https://vine.co/v/iB1EiEBpFOw
https://twitter.com/...552046213505025
Good job on the 3D engine SquidDev - I wouldn't even know where to start coding that.
Edited by CraftedCart, 14 November 2015 - 03:43 PM.
#433
Posted 14 November 2015 - 03:49 PM
CraftedCart, on 14 November 2015 - 03:38 PM, said:
Ohhh, that looks nice. Wonder if it just an animation or if that is being calculated (so static frames or if the text position, pixels, etc... are being set through code).
CraftedCart, on 14 November 2015 - 03:38 PM, said:
Thanks! It is just matrices, lots and lots of them (well like 5).
#434
Posted 14 November 2015 - 03:54 PM
#435
Posted 14 November 2015 - 04:03 PM
LeDark Lua, on 14 November 2015 - 03:54 PM, said:
#436
Posted 14 November 2015 - 04:32 PM
Lignum, on 14 November 2015 - 04:03 PM, said:
Normally this is the case, but there is only one important matrix - which is the one every vertex is multiplied by. This example is so simple it doesn't need both a view and model matrix, instead the final matrix is made up of 4 view matrices (translate , rotate in x and y and scale) and one projection. However there is nothing stopping you changing the order: projecting the vertices into 3D space and then scaling them: such as rendering a scene upside down.
#438
Posted 15 November 2015 - 01:12 AM
and for that startup video, why is that fullscreen? maybe it is gonna be a real OS.
#439
Posted 15 November 2015 - 01:42 AM
Wait_, on 15 November 2015 - 01:12 AM, said:
and for that startup video, why is that fullscreen? maybe it is gonna be a real OS.
#440
Posted 15 November 2015 - 02:16 AM
Is that engine actually running at like 15-30fps? if so how many polygons can it handle at that rate
Edited by Creeper9207, 15 November 2015 - 02:20 AM.
#441
Posted 15 November 2015 - 06:10 AM
#443
Posted 16 November 2015 - 04:14 PM

For reference, this is an 8x8x8 chunk of blocks being rendered - there are about 2600 polygons here which are being drawn in 0.025 seconds, and blitted in 0.038. There are some pretty serious bugs with this:
On a positive note, these textures were rendered with about 20 lines of code which I think is pretty cool, and shows how powerful code generation can be.
Lets be honest though, this isn't ever going to be playable (though it is not too bad running in Love).
Update:
Fixing the additional line bug makes the alpha-blending look much better (though it easy too see that I'm not sorting faces correctly (green is opaque).
Edited by SquidDev, 16 November 2015 - 04:37 PM.
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users











