08-27-2023, 04:20 AM
(08-27-2023, 03:10 AM)megamarc Wrote: Hi!
I want to apologize if I sounded rude for not providing support on other languages, but that's the truth. I know that Nim transpiles to C (and Javascript), but I don't know about its architecture or optimizations. So I can't really tell which construct is more performant. As a general rule is good strategy to avoid conditionals as much as possible, and replace them with sequentials, or function pointers. Tilengine makes extensive use of function pointers, and I thought about adding some more on critical places that should increase performance.
For example replace this:
Code:loop while condition:
if a:
do_treatment_a()
else:
do_treatment_b()
with this:
Code:if a:
loop while condition:
do_treatment_a()
else:
loop while condition:
do_treatment_b()
Yes, I've fixed the initial black screen in non-vsync mode. I have yet to upload the builds to itch.io, but you can do a pull from GitHub and build it from sources. Let me know if it gets fixed for you.
You cannot enable scaling and affine on the same layer, as it can only have one state at a given time. The new mode just replaces the old one.
Feature accepted about getting the number of entries on a palette :-) this number is already available internally, just need to add a public function to retrieve it.
Hi!
You were not rude at all, I totally understand. We can't know everything about everything. I just had the idea "Hey what if I try to do something similar to Tilengine? It probably would be a good experience and I probably can learn a lot of things!"
That makes sense for the fact that one layer can have one mode at a time.
Thanks for accepting the feature idea! I do some improvements to the Nim bindings for Tilengine and I thought it was a necessary feature to avoid out of bounds errors.
I will compile the latest commit and tell you if it works.
I'm also working on a game for my final school work now. And guess what I'm using for graphics? Tilengine!