Page 1 of 33

Slowdive's Little Daily Blog

Posted: Thu Jan 16, 2020 4:10 am
by slowdive
Time to kick off a new blog on the new forums.

A follow up from the legacy forums:
youngneil1 wrote:Do you experience the bad performance on regular laptos/notebooks/desktops, too (or only on phones/tablets)? Edit: And in case it happens on regular laptops/notebooks/desktops (Windows systems in this case), does normal IB show the same slow performance on these systems, too?
I see about 30-40 fps on my windows 10 laptop (Lenovo Legion Y520) when running IBx for UWP. I see about 4-7 fps on my android tablet, iPads, chromebook, and iPhone X. This is on the first main map screen for Blackwinter, other screens are different. I see 50-70 fps on my windows 10 laptop when running IB.

Re: Slowdive's Little Daily Blog

Posted: Mon Jan 20, 2020 9:13 am
by youngneil1
Thank you for cheking this out, Jer. On one hand this is good news as IB performance is good on your laptop, too. On the other hand this underlines that we will need to disable a few cosmetic features for IBx to run well. I will try more ways to turn off scrolling on main map after next IB release. First test for turning off scrolling I did were not very successful - I fear there will be no easy hack, but we will get there :) .

Re: Slowdive's Little Daily Blog

Posted: Mon Jan 20, 2020 11:50 am
by slowdive
Let me do some more testing on my side before you try to add graphic toggles. I’m trying to track down the main culprits first by turning one feature off (and then back on after testing) at a time. I saw your notes in the code about the two resource heavy functions in the main map screen and it looks like the main layout ui draw routine is the bigger issue. I’ll dig into that and see what I find. Turning off the call to draw the ui took me from 4 fps to 15 fps on my iPad.15 is quite playable on the iPad so it looks promising. The main map drawing routine is the other that I’ll inspect next. I bypassed the update function on the main map, but it didn’t impact fps so it is okay. Also, I bypassed the scrolling system, but it didn’t impact fps so it is okay as well.

Re: Slowdive's Little Daily Blog

Posted: Mon Jan 20, 2020 12:32 pm
by youngneil1
Biggest fps gains for me during optimization were related to the drawing of fonts. I dont recall the details right now but I think I reduced the numbers of calls for new writeFactories (or some such) to one 1/9. It was related to the way we draw the bigger letters (slightly shifted, multiple draw calls for each letter) and their black outlines. Before I optimzied I think each word had to be drawn nine times with 9 different creations and destructions of write factory objects. I shifted all of this into a single writeFactory, I think (doing its job nine times before being discarded). Well, maybe it was a bit differnt but it was definetly related :lol: ... I also drew them a bit less bold (less iterations, I think from 16 to 9), iirc...

Also, I think there was an important optimziation when it comes to drawing "blank" layers. Iirc the old code drew (loaded) each tiem a blank transparent graphic for this - just not drawing these blank layers gained a few fps, too. Again, I might rember this incorrectly :roll: .

Re: Slowdive's Little Daily Blog

Posted: Tue Jan 21, 2020 3:09 pm
by slowdive
When switching to skiaSharp drawText I had to reintroduce the 25 calls to draw black outline of text. I removed that and am now drawing just a single black text shifted 2 right and 2 down, then draw actual text color on top of that. So only two text draws now and I went from 4fps to 18 fps on my iPhoneX :lol:

Now IBx plays very well on my phone and iPad :D

From my iPhone X:
3C1205B5-C32E-4ED6-8065-AD5B0E89BE0D.jpeg
3C1205B5-C32E-4ED6-8065-AD5B0E89BE0D.jpeg (292.93 KiB) Viewed 2907 times

Re: Slowdive's Little Daily Blog

Posted: Tue Jan 21, 2020 4:46 pm
by Dorateen
slowdive, you would know better what works with the mobile platforms. Regarding the buttons on the bottom of the screen, would it make sense to reduce the words to the single initial for each command?

So M for move, A for attack, C for cast, and so on.

Re: Slowdive's Little Daily Blog

Posted: Tue Jan 21, 2020 6:41 pm
by slowdive
That could be an option. I probably need to use smaller text on the buttons at least. Another option would be to use icons like I use in IBbasic...
8E2BCE5B-398F-4A8F-B64B-984D5132B900.png
8E2BCE5B-398F-4A8F-B64B-984D5132B900.png (1.34 MiB) Viewed 2903 times

Re: Slowdive's Little Daily Blog

Posted: Wed Jan 22, 2020 6:54 am
by youngneil1
Amazing news about the performance gains, well done :) !

Re: Slowdive's Little Daily Blog

Posted: Sat Jan 25, 2020 4:16 am
by slowdive
Today I did some more play testing and clean up work. I also added panning buttons to the combat screen to take place of the arrow keys on keyboard. Eventually, I would like to use a swiping gesture to pan the map. touch and hold down while sliding finger to pan. I also fixed a few bugs. One thing that I haven't fixed just yet is that when tapping an arrow key to move up on the main map, The players move two squares almost every time. Only one square for other directions. I think it has to do with the scrolling or move while holding down feature, but I'm not sure how to fix it just yet.

I'll probably release another version of IBx to Google Play for people to test this weekend some time.

Re: Slowdive's Little Daily Blog

Posted: Sun Jan 26, 2020 4:07 am
by slowdive
Today I fixed a bug that has been "bugging" me for awhile. Moving up was jumping two spaces each time. It was a timer issue, but I fixed it so I'm back to one space at a time. I also removed the panning buttons and instead replaced it with a tap and drag feature to do the panning on the combat screen. It works very well, is super easy to pan around, and hopefully intuitive.