Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vertical callback or per pixel callback : I understand/How does Tilengine work?
#10
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.
Reply


Messages In This Thread
RE: Vertical callback or per pixel callback : I understand/How does Tilengine work? - by megamarc - 08-27-2023, 03:10 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)