the i expanded the menu by making placeholder buttons functional. you can now create and delete worlds.
creating worlds will work in a more interesting way, because players will be able to code terrain generation - "world constructors". for now, it's only the initial world generation (without the realtime generation) and there isn't a lot of features, yet, but ill fix that. here is example:
i fixed compatibility issues with glsl3. at least, i think it works ._.
this is why i decided to do it:
the problem in the first place is that glsl3 (a shader language) is not compatible with some older GPUs, mostly the integrated ones (hidden in cpu). the solution was to translate it into glsl2.
glsl3 has bitwise operators (>>, <<, &, |,...
) that are important in manipulating the *bits* of a value.
here's an example of how i use them. every tile is a pixel on an image, and to encode information onto it, i had to put the rgba together (that gave me 32 bits), and then split it how i need to.
on 4 from right, 4 bits long, is the model of a tile
the thing is - glsl2 doesn't have these! >:‹
and it doesn't have couple of other stuff too!
solution - i made a function to translate the thing for me, and replace the bitwise operators with functions and math.
was it painful? a bit. but it's somewhat functional, and im happy it's now automated.
entity collisions are added, and they don't work as other games traditionally implement it. because every entity is checked for what tile are they covering (for colliding with tiles), i decided to link this, and avoid scripting traditional hitbox checks.
if you feel like checking entity collision like this, by what tiles they overlap, means that entities doesn't have to be really touching to trigger collision, well...
you're right! but i feel like it's a small distance, and they can't touch through walls
so i think it is a good tradeoff for performance
small interuption:
i got linux!it's Manjaro (with KDE). it was actually really easy to install, and from the distros i tried, it worked the best with my GPU out of the box. but it is still a little rough around the edges
now i want to work on lights. im not sure how i want to do them, but ill try my best looking for the most optimized way.
in the released demo, it was rendering the same image more than 15 times for every chunk that needed to update. i think, like that, a lot of lights at once can update efficiently (like when sun changes light level), but little changes had to be reflected too. ill see what ill find.
more updates and art soon ^^
0 comments