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.


Topics - Holy Manfred

Pages: [1] 2
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 / Particles, panels and render queue
« on: December 08, 2016, 09:54:08 AM »
I ran into some problems with particles in a setup where I have multiple panels on screen. Using Unity 5.5/NGUI 3.11

I have used to have setups which worked in the past, with particle effects attached to my UI elements and then using the render queue modifier script (http://www.tasharen.com/forum/index.php?topic=776.msg34546#msg34546). I am currently trying to set up a scene containing multiple panels (windows) with particles in some of them. However particles are always rendered wrong now, behind or in front of things they shouldn't be when there is more than one panel in the scene.

I tried giving the panels and particles individual render queue start numbers to make sure they have the proper order but it doesn't seem to help. In a setup with only one panel and the particles in it everything works as it should.
The UIPanel documentations say individual render queue numbers are the way to go but I am not sure if this is working anymore.

Any non-hacky ideas on how to get multiple panels working with particles in between them?

4
NGUI 3 Support / Multiple cameras and image effects
« on: October 31, 2016, 11:52:31 AM »
I am trying to achieve an effect where the background UI gets blurred when a window is opened up.

I have two 2D UI cameras and I am adding a new UI element to the camera in front while at the same time activating a blur image effect on the camera which is behind. However the blur effect always blurs the whole screen instead only the content from the camera which it is on.
Is this an approach that is supported by NGUI or should I find a different way of blurring parts of my UI? Any other hints how to achieve a nicely blurred background effect would be appreciated.

5
NGUI 3 Support / Limiting ScrollView movement
« on: October 25, 2016, 05:09:24 PM »
I have a scroll view with a UITexture as a child which can be dragged around using a UIDragScrollView. Basically a 2D map for the player to drag around on. Works as expected.

I would like to cancel the dragging movement when one side of my map texture reaches the edges of the scroll view. Example: Player drags map from left to right -> Cancel drag when left end of the map texture reaches the left edge of my scroll view.
I was going to check the position when dragged, then cancel when the edges hit the screen boundaries. Not really that difficult, however I am not sure if there isn't already some magic checkbox or anything built into NGUI that takes care of that problem?

6
NGUI 3 Support / UIPopupList issues with sliced sprite
« on: August 15, 2016, 11:12:04 AM »
I am having some issue with our drop down menus.
It is basically a regular UIPopupList using normal sliced sprites for the background and the buttons. It seems like the amount of border set in a sliced sprite is offsetting the positioning of the list.
This can be reproduced in NGUI 3.9.9 / Unity 5.4.0f3:

1) Open NGUI example scene 'Example 0 - Control Widgets''
2) Change border of the 'Button' sprite to something higher, e.g 9
3) Play and observe popup list being slightly offset

With larger sprites with a bigger border the issue is more obvious of course. Not sure if this is intended behavior but I would expect the amount of border within a sliced sprite not to matter.

7
NGUI 3 Support / 3D Objects in between NGUI elements
« on: May 13, 2016, 10:27:30 AM »
I am using a mix of 2D and 3D UI in our game which works pretty well so far. For example, I have a 2D UI window with a 3D model rendered on top of it.
I am now trying to set up an UI element which is supposed to display a 3D model on a 2D background in addition to some 2D elements on top of it. I am using a 2D camera rendering the background, a 3D camera to render the model and the UI elements in 3D space. This works but of course the UI elements rendered with the 3D camera have a slightly different look and crispness than the ones with the 2D camera.

Is there any other way to render clean, crisp 2D UI elements behind as well as in front of a 3D model? Would it work to have multiple 2D UI cameras with different depths?

8
NGUI 3 Support / UIKeyNavigation Keyboard + Controller
« on: August 29, 2015, 02:45:48 PM »
I am having some problems with my menu controls which I did not have in previous versions of NGUI. The arrow keys on the keyboard are not working anymore to control buttons with UIKeyNavigation components. I suspect a recent upgrade changed/broke something but couldn't nail it down yet.

Here is whats I have in 3.9.2 (Unity 5.1.2f1)with the following setup:

+UIRoot
++UIButton
++UIButton
++UIButton
++...

All buttons have a UIKeyNavigation component. The UICamera has all event sources enabled. In older versions (3.8.x or so) I could use either the mouse, the keyboard or the controller to go left/right/up/down between the buttons. This does not seem to work anymore.
In the latest version the controller input still works but keyboard input seems to have stopped working. Basically I would like to be able to use the keyboard keys to switch between buttons as it was possible before.

Any suggestions appreciated!


9
NGUI 3 Support / Alignment of ScrollView centering
« on: July 17, 2015, 10:48:45 AM »
Hi there,

I have a ScrollView with a table child and a bunch of entries in it. Pretty simple setup:
+ScrollView
+UITable
+++Entry1
+++Entry2
+++...

When clicking on an item in the table I want it to center on it. This also works well, however I would like to set the position inside the table where the clicked item will be centered. This is how it looks right now:


What would be the best way to set it up so that clicked items align with the top of the ScrollView and not the bottom? Bascially I would like the top border of my entry to be aligned with the top of the visible area of the ScrollView. I hope this makes sense :) I am thinking there might be a simple setting or checkbox I overlooked.
Thanks!

10
Misc Archive / Made with NGUI: Unlock It!
« on: May 06, 2015, 11:17:21 AM »
Hey guys!

We just put out Unlock It!, our new puzzle game. It is out on Google Play and the Amazon Store so far. No iOS yet, since Apple takes their sweet time with their approval :)
Tired of match-3 games? Give Unlock It! a try, it is a relaxing logic puzzle with 120 levels and an endless challenge mode which is a lot of fun! See if you can crack the lock!

Have a look here on GooglePlay: https://play.google.com/store/apps/details?id=com.MetalPop.UnlockIt
Or Amazon AppStore: http://www.amazon.com/MetalPop-LLC-Unlock-It/dp/B00WPZL1FG
Any feedback is welcome!



For this one NGUI didn't have too much heavy lifting to do. It's all 2D with a bit of particles and some tables and grids here and there. It was a breeze really with no big troubles along the way. There are no big special graphics in there so we could keep the atlas rather small.
In order to improve downloads we decided to invest heavily in localization and got the game texts translated in 12 languages. NGUIs nice, neat localization feature didn't complain at all and the whole process went very smoothly.

Love NGUI, keep up the great work on the package!

11
NGUI 3 Support / Strange issue when placing prefabs onto 3D UIRoot
« on: April 01, 2015, 09:46:35 AM »
I have been experiencing some odd issues when placing prefabs onto my 3D UIRoot. Never had that issue before, so I am not sure what could be causing it. What happens is basically that multiple UIRoots (really a lot) get added to my hierachy when dragging a prefab onto my UI Root. It looks like a new one is created each frame while my prefab is being dragged over the Scene viewport. This leads to dozends of new UIRoots which need to be deleted manually.

For me it is pretty much a 100% repro even with a clean project and scene. To reproduce try:

- With Unity 5.0.0f4 / NGUI 3.8.1, create a new project, and new scene
- NGUI -> Create -> 3D UI (Issue does not happen with 2D UI)
- On 'UI Root (3D)' create any new NGUI element (sprite, widget, label, ...)
- Drag the new element into the project view to create a new prefab from it
- Drag the new prefab back onto your UI Root moving the mouse over the scene viewport

This issue can be worked around by making sure to not touch the viewport with the mouse while adding the prefab to the scene, however it is pretty annoying :)
Not sure if this a known issue or something is wrong with my project setup but I am pretty sure I did not experience this in earlier NGUI versions.

12
Misc Archive / Boob Rescue
« on: October 21, 2014, 05:15:32 PM »


Hi guys, we just released Boob Rescue, a little side project we have been working on for a while. Give it a try if you like!

The game is a simple and easy going puzzle game, and deals with the rather difficult topic of breast cancer. Its free to download and play with optional in-app purchases. The great thing about it is that 10% of each in-app purchase will be donated to the Breast Cancer Research Foundation. This means each purchase helps funding the fight against cancer.
We hope the game will be fun for people to play and will help raise breast cancer awareness as well as generate some research funding.


Of course we used NGUI for the 2D art. Here is a little post-mortem for you guys.
There wasn't really any heavy lifting for NGUI in this project. We had a couple of windows, draggable panels, buttons, etc. Performance was good on both Android and iOS.

What went well:
- The lighting fast workflow with NGUI made life easy :)
- Atlas management for HD/SD atlases well supported by NGUI. This was helpful when dealing with extreme mobile resolutions
- We supported multiple languages, so the build in localization system was a nice bonus

What went not so well:
- The depth issues when dealing with many sprites in different panels plus particle effects in between sprites were quite tricky to get right
- Rather cumbersome when working with NGUI local coordinates + world space coordinate system (especially when animating things in relation to different NGUI objects)

Keep up the good work, NGUI has become a really great package!



If you want to try out our game, it is out on Android now and in review status in the Apple AppStore. Hopefully they will approve us soon (has been over two weeks already).
Check it out here: Video

Get it for Android: Here!
Get it for iOS: *coming soon*

13
NGUI 3 Support / Depth issues with sprites/scrollview/grid
« on: June 09, 2014, 05:09:35 PM »
I ran into an odd issue which I couldn't really figure out so far. Maybe somebody can offer some insight.

I have a screen with some buttons and a scrollview containing a grid. Works all nicely until I start putting a modal window on top of everything during runtime. The new window kind of fills most of the screen, has a collider and works fine except that all elements of the grid from the screen below it are rendered on top of it. Everything else looks fine, it is just the items in the UIGrid which are added in at runtime are rendered on top of everything.
This shouldn't happen since all the depth values are set up correctly. I suspect it having to do somehing with the Panel/Scrollview containing the UIGrid but I am not sure how to fix it.
The setup is relatively simple and looks like this:

UIRoot
=>UIWidget
==>UISprite
===>UIPanel(with UIScrollView)
====>UIGrid
=====>UISprite (this is what is visible on top of everything)

I am on 3.6.2.
Any ideas are welcome :)

14
NGUI 3 Support / Tweens, Anchors and other Joys...
« on: January 16, 2014, 10:25:40 AM »
It is probably kind of a common problem and I searched around quite a bit but couldn't find any way to figure it out so far:
I am building a menu which has buttons 'flying in' from the left using a TweenPosition component and I am having problems making it work in different aspect ratios.

The UI Root is set to pixel perfect and the menu is being instantiated from a prefab. All static elements within the menu are anchored and are placed nicely even in weird resolutions due to the fantastic anchor system.
I have no idea however what the recommended way of having objects tween in would be. The TweenPosition values are kind of absolute, so when I switch my resolution from a 4:3 to 16:9 resolution for example the buttons don't fly in all the way anymore, because the new 4:3 screen is 'not wide enough' (see attachment). I'd anchor the buttons but position tweens do not work on anchored objects.

What would be the recommended way of having my buttons enter the screen nicely tweened and properly positioned in all aspect ratios? Adding a 'relative' option to the tween script? Positioning the buttons manually after the menu opened in script? Any suggestions are welcome.

15
NGUI 3 Support / Getting keyboard input events
« on: December 28, 2013, 12:13:41 PM »
I'd like to check for certain keys being pressed using the NGUI event system if this is possible. I have a game object which is handling all kinds of UI stuff. It is set up with
  1. UICamera.genericEventHandler = gameObject;
to receive all events happening. That works well for click, double-click, scroll etc. but I am having problems getting keyboard input. My OnKey function looks like this:
  1. void OnKey(KeyCode key)
  2.         {
  3.                 Debug.Log("OnKeyCode " + key);
  4.         }
and I would expect it to get all kinds of keys pressed on the keyboard. However currently I only get certain inputs like 'UpArrow' 'RightArrow', etc. However I would like to be able to get any key or key combination being pressed so I can react to things like ESCAPE, SHIFT-S, CTRL-P, etc.

Of course I can do this the hacky way with Input.GetKeyDown... but I'd really like to use the NGUI events. I am sure there must be some script or component where I can customize what keys will trigger what events.
Using UIKeyBinding is not an option for me because I need to react to a lot of global things happening which might not be related to specific objects in the world.
Any suggestions on how to achieve this would be welcome.

Pages: [1] 2