Slowdive's Little Daily Blog

Discuss anything in general about the IceBlink Engine + Toolset project (or anything else) here.

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Thu Jan 18, 2018 9:19 am

Onwards :D !
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

Re: Slowdive's Little Daily Blog

Postby slowdive » Fri Jan 19, 2018 12:34 am

I finished creating a TextEntryDialog, NumberEntryDialog, and a ListViewDialog. I then updated the toolset to use these new methods for entering data.
IMG_0154.JPG
IMG_0154.JPG (283.14 KiB) Viewed 1047 times

IMG_0155.JPG
IMG_0155.JPG (306.2 KiB) Viewed 1047 times

IMG_0156.JPG
IMG_0156.JPG (236.89 KiB) Viewed 1047 times

Some UI layout issues as you can see to work on still :oops:

So I am back to where I was before and ready to move forward (now with one commond code base for PC, Android, and iOS :P :D )
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2987
Joined: Wed Nov 21, 2012 11:58 pm

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Fri Jan 19, 2018 6:45 am

Circle closed, perfect :) . It all looks very charming and polished (the odd button needing a tiny move, but thats a non-issue).

Being able to instantly turn an idea eg into a dialogue, a dungeon or a new storyline - whereever you are, with just a few taps - is a mesmerizing and wonderful persoective :D .
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

Re: Slowdive's Little Daily Blog

Postby slowdive » Sat Jan 20, 2018 11:43 pm

I finished the save files code for the in-app toolset (at least for android that is). The iOS and UWP save methods still need work and testing. I think I am at a point where I have all the working parts needed and a good enough understanding of them to make the IB conversion to Xamarin as well. Once Karl is at a good breaking point in his coding (the engine, not the toolset) and can post a commit to GitHub, I'll clone it and start a new Xamarin project that I will call IBx (x for xamarin) and I'll post a repo of it.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2987
Joined: Wed Nov 21, 2012 11:58 pm

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Sun Jan 21, 2018 11:00 am

Aweosme - I will try to push latest commits to github for engine and toolset today. I will give you a heads up here once done.

I think the point in time is great as I wanted to turn to tutorial writing anyway, so the code can rest for some time while I am occupied with documenting.
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Sun Jan 21, 2018 12:55 pm

And there it is - marked both pushes (engine and toolset) with "Ready for Xamarin" :D !

I keep fingers crossed it works out well :) .

If I had to guess where problems might arise it could be the load-on-demand mechansim for areas (using many, many single graphic tiles). Also, many draw routines have gotten overloads, so there are quite deeply rooted changes (adding eg ability to draw transparency here and there)... if something proves to troublesome to port, please just cut it out. I will rebuild it then on the new grounds.

Really looking forward to this :D !
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

Re: Slowdive's Little Daily Blog

Postby slowdive » Mon Jan 22, 2018 5:33 am

I cloned the repo and then started a new xamarin.forms project called IBx. I then created a GitHub repo called IBx. At this point, I am going through all the code and converting all the SharpDX specific code to use SkiaSharp. There are quite a number of places that use SharpDX specific code such as Bitmaps, Colors, FontHeight, FontStyles, etc. In the end, there will only be one Dictionary of SKBitmaps (commonBitmapList) and one method for accessing (and loading as needed) those bitmaps (GetFromBitmapList). This way there will only be one place that deals with some drawing API (skiaSharp at this point). The second trick will be the file handling code, which may be spread out all over the place, will have generic methods that point to one place where platform specific code will be located.

I'll need to change the way some of the tasks are handled so that they are more cross-platform friendly (such as not using winForms for pop-up dialogs).

At this point there is nothing to show as I have a lot of work left to do to even get the thing to compile :lol: Give me a couple of weeks and I should have it all cleaned up again from my mess making process :oops:
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2987
Joined: Wed Nov 21, 2012 11:58 pm

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Mon Jan 22, 2018 7:11 am

Wonderful to see you picking up this herculean task :) . I imagine it must be a dauting prospect to go through all these instances of eg graphic related code spread all over the code base.

I will take this milestone in the project as a starting point to change my coding habits a bit (or try to). While I had to some extent the excuse that the whole coding process was new to me, that is less the case now. I will try to:
1. centralize my code in common methos shared by many calling routines (much easier to update later on)
2. do more comments (objectively understandable ones, but not too long either)
3. Clean up after coding, eg remove temporary commented out stuff I copy & pasted as template
4. Remove outdated code (methods that are not called anywhere anymore)
5. Pay more attention to code runtime speed (like breaking loops in time)
6. Avoid work around solutions (like using quantity also for charges)
7. I guess there is more, but I think the idea is clear

Furthermore, I will use the weeks and months until the Xamarin port is up and running to do lots of documentation work. IB has become quite complex and powerful by now, more than time to improve its accessability big time :) .
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

Re: Slowdive's Little Daily Blog

Postby slowdive » Tue Jan 23, 2018 4:19 pm

Those are all coding practices that I try and improve on as well. Right now I am going though the code and removing any bitmaps stored on any objects. Instead, the object will have a string property with the bitmap's filename and the one gv.getfrombitmaplist() is used everywhere to return the bitmap which is stored in a single dictionary. Awhile back we removed all the canvas.draw() functions (which is platform specific and all of these instances would have to be changed when porting to other drawing APIs) and replaced them with a gv.draw() routine. This way when using other drawing APIs, we only have to change the one main drawing routine (most of the draw() overloads point to the main draw routine now. We did the same thing with the IBrect class since Android and PC's System.drawing.Rectangle handle defining the rectangles dimensions differently. Same reason with our Coordinate class. I'm creating common functions for file handling now to make that more cross platform ready. All references to SharpDX.Color and SharpDX font stuff will need some generic function call to a single method that handles the different platform needs.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2987
Joined: Wed Nov 21, 2012 11:58 pm

Re: Slowdive's Little Daily Blog

Postby youngneil1 » Tue Jan 23, 2018 5:27 pm

Inspiring read there, many thanks for sharing - it sounds very clean and elegant to centralize API specific tasks and let all usage instances in code point to these last in line routines which then can branch, depending on the targeted plattform.

Keep me in the loop with these thought proceeses, please, if time allows. It's very instructive for me and will make it much easier to reorient myself in the Xamarin code base later on (and reduce the risk of me spreading chaos when starting to code again ;) ).
User avatar
youngneil1
Backer
Backer
 
Posts: 4648
Joined: Sat Dec 08, 2012 7:51 am

PreviousNext

Return to General IceBlink Project Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron