Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Holy Manfred

Pages: [1] 2 3 ... 5
1
Misc Archive / Crafting Kingdom - An incremental Crafting Game
« on: March 17, 2017, 03:38:27 PM »
Hi guys,

I wanted to let you know about our latest game: Crafting Kingdom. The game started as a small side project and then blossomed into a small, neat incremental crafting game.
The game is out now on Android and iOS ready for you to play. You can get it here



NGUI
The game is very UI heavy. Lots of windows, buttons, and different screens. Lots of work to do for NGUI! Overall the development went very smooth and other than the sheer amount of different UI elements there were no big problems. Most things in the game are 2D, with a few screens, such as the players castle being 3D. We ended up having a setup of three cameras. A regular 2D camera, a 3D camera and an overlay camera used to render windows on top of the screen. You could do without the overlay camera , but it was needed for some of the windows which blur the 2D screen when the are being opened up.
The scene setup was pretty simple in the end:


There were a few of the usual problems related to particles and other effects on the UI. We have lots of particle effects on certain UI elements which live on different panels which might overlap each other. In the end we got it all working though with a bunch of rendequeue modifier and a bit of hacking in the right places.

Accessibility
There is one feature however which I would like to highlight though: The game is fully accessible. This means it can be switched to a mode which allows it to be fully played by visually impaired or blind people. Full accessibility is a thing we always wanted to try out in a game.
However, Unity doesn't support any accessbility out of the box, so we had to find some custom solutions. We have been working on an accessibility plugin for a while now and Crafting Kingdom is our first real field test to see how the tech works.
After all code was in place it took us only about 4 days to get all UI elements accessible. There were however a few spots where we needed to adjust the design. Just to give you one example: When the player is on the world map, he can sometimes find treasure chests which spawn randomly. Easy to see for your regular gamer of course. But a blind person will obviously not see the chest popping up. To fix this we added a quiet chiming sound which plays when a treasure chest is on the map which allows blind people to ‘sense’ the chest. It is things like those we did to make all aspects of the game fully accessible. Overall it was a fun task we are really curious to see what visually impaired players think about the game.

If things go well, we will try and get our plugin in the AssetStore in the next weeks to make it easier for people to make their games accessible.

So, if you like, download the game and give it a try!



2
I have a slider that makes a sound (through UIPlaySound) when moved. The more the slider gets moved the more the sound gets pitched.
I had to investigate an issue where my background music got pitched up instead of the UIPlaySound component when I was moving the slider. That made things sound pretty weird :)

It is not really a bug I guess, but the way NGUITools.PlaySound() finds its audio source to play sounds can cause some odd behavior. I have a gameobject in my scene which has my audio logic script, an audio listener and an audio source used for background music. NGUI just looks for any audio source on the listeners gameobject and uses the first one it finds. It only adds a new source when none is found.
In my case this leads to my music audio source getting modified by a pitch I set on any given UIPlaySound component.

It can be worked around by adding an empty audio source component and move it to the top of the component list but it might be nice to have a clean way to specify to NGUI which audio source to use.


3
NGUI 3 Support / Re: Does NGUI support VR?
« on: January 25, 2017, 12:43:59 PM »
You can always render your UI into a render texture and then use it accordingly, depending on your VR environment. Just rending the regular 2D NGUI camera won't work in VR. If you put your UI into a render texture you can render it any way you want.

4
NGUI 3 Support / Re: New child and depth problem ?
« on: January 25, 2017, 12:38:36 PM »
Are you sure you the animated sprite you add is added to the correct panel?

5
NGUI 3 Support / Re: Frame rate Counter that is NGUI 3 compatible
« on: January 18, 2017, 11:10:02 AM »
The Advanced FPS Counter plugin is pretty cool though :) It has a bazillion small features, such as device and memory info, color coding for fps limits, etc.
And it runs on top of NUGI out of the box. For 10$ I am much to lazy to write my own :)

6
NGUI 3 Support / Re: Frame rate Counter that is NGUI 3 compatible
« on: January 17, 2017, 04:00:34 PM »
The 'Advanced FPS Counter' plugin is really great and works with NGUI too. I am using it in multiple projects together with NGUI and it works well.
It doesn't render into NGUI Labels or such but you should be able to run it and just have the data printed into a regular canvas on top of your NGUI stuff. I know that the guy who made the plugin want to add NGUI support but as far as I know he hasn't gotten around to it yet.

7
NGUI 3 Support / Re: png+alpha on top of(higher depth) 2D UI
« on: January 17, 2017, 03:52:39 PM »
I am not sure I understand what exactly it is that is not working. I can see the UITexture in your screenshot but I am not sure about the rest.
I guess you want your texture to be rendered on top of your sprite? Without seeing the sprite/prefab settings it is hard to say.

8
NGUI 3 Support / Re: NGUI to place a popup in the same UI root or not?
« on: January 16, 2017, 09:42:28 PM »
That should not be a problem given your depth is set correctly. But I'd always put popups in their own panel at least to make it easier to bring them on top when you have multiple windows open for example.
Having multiple UIRoots shouldn't break anything but is probably unnecessary in most cases.

9
NGUI 3 Support / Re: png+alpha on top of(higher depth) 2D UI
« on: January 16, 2017, 09:34:55 PM »
Should not be a problem. Maybe post your setup so we can have a look.

10
If the footer buttons have proper colliders it should work. However, a scrollview is always on a panel. Maybe that is somehow overlapping your your footer? Is your footer on a different panel?

11
NGUI 3 Support / Re: Crash issue with NGUI and Firebase Analytics
« on: January 12, 2017, 10:21:42 AM »
Just a shot in the dark, but have you tried using
  1. NGUITools.SetActive(gameObject)
instead of Unity's
  1. gameObject.SetActive()
?

12
NGUI 3 Support / Re: Localisation and fonts best practices?
« on: January 12, 2017, 10:17:38 AM »
This can be a pain if you want to do it right :)
I usually chose to live with a few compromises in those cases. For example, my last mobile game supported 12 languages, including Chinese, Thai, Russian, Korean, Japanese and other tricky ones.
For this I ended up using the FreeSans font, which already supports a relatively high amount of alphabets and is free to use.
Then I found other free fonts for the languages not included and manually added them to my main font using a font editor tool. In the end I had one big ttf font with support for all my languages.
This way you don't need to do anything extra at all. Just give a string in whatever language to a UILabel and it will take care of it

Pros:
- Everything inside one small ttf file, no multiple big bmp atlases -> good for mobile
- No extra work once it is set up

Cons:
- A lot of one-time setup work
- The font is rather plain looking and not very pretty :)

Of course for the Asian languages you need to use the simplified versions of their alphabets. They all only have ~50 letters. There should be plenty of fonts out there to use.
Of all the Asian languages Thai is the most tricky one, due to they way the language incorporates spaces and line breaks. Have fun with that :)

I like the free *** font pages for a good selection of Asian fonts, such as:

http://www.freejapanesefont.com/
http://www.freekoreanfont.com/
http://www.freechinesefont.com/



13
NGUI 3 Support / Re: NGUI Localization Format
« on: December 23, 2016, 10:59:03 AM »
The user interface elements you use is relatively irrelevant. You can use buttons, drop-downs, sliders or anything else to switch the language.
Simply calling 
  1. Localization.language = "yourlanguage";
will switch the language.
So you could just create a button and call a function that calls the above line on OnClick.

14
NGUI 3 Support / Re: Tween isPlaying?
« on: December 23, 2016, 10:49:41 AM »
You could use UITweener.onFinished to get a callback when the tween is done.
Or, if it is applicable in your case, you could use the UIPlayTween component to take care of the tween handling for you.

15
NGUI 3 Support / Re: Particles, panels and render queue
« on: December 15, 2016, 03:30:38 PM »
I'll update the thread here, so that everybody who might have a similar problem has some hints.
I got particles on/between various UIPanels to work fine with the following setup, as recommended by ArenMook:

- Set individual render queues for the panels
- Changed UIPanel.cs line 1570 from
  1. dc.sortingOrder = (mSortingOrder == 0) ? sortOrder : mSortingOrder;
to:
  1. dc.sortingOrder = (mSortingOrder == 0 && renderQueue == RenderQueue.Automatic) ? sortOrder : mSortingOrder;
- Added RenderQueueModifier script to particle effects

Pages: [1] 2 3 ... 5