I aim to misbehave
Ramblings of
Alex Lovett
RSS
Twitter
Tumblr
Youtube
LinkedIn

Y2013-Mo08-GameDesign

Navigation:

Up a Level -

Documents:

Unity5 - Reality_2.0 - Math_Art - Lilly - Drawing - GameDesign - Inspiration - XFactor - Valideus - Food - WheelReview - GKN - Lumen - WishList - RoundTree - Painting_with_Light - House - Website - Fridge
Tags: - Programming - Games - Unity - Shadowood
Show comments

Every little thing in making a game is a hurdle, or at least a dozen google searches then a hurdle

Today wrote my own InputManager for multi touch, made it way smarter than I should have, it will look for a special component on the object you touch ( which it find by doing ray cast from the camera ) if none was found it can look at the object parent, and parents parent etc till it finds one, it can also contact ALL parents if they have a listener on them, simple really. I can also have it auto add a component to the touched object that caches all this so it is fast without having to perform lookups every time.. like a boss

So code to have good component orientated design to handle touching the iPad screen:



But that's a bit misleading as that contains code to auto add components and handle duplicate objects, singletons and such

:-)



But you get the idea, every little tiny thing, involves 100 other tiny things and so on

Lets not even think about how the ray cast to find the touched object itself is leaning on 1000's of lines of physic engine code and scene caches to aid in speed

Speaking of ridiculous code, I have been slowly write examples for various c# concepts and functionality...

All of this, and none of it actually visibly does a damn thing. In fact at his point all I have done in Unity is make a box move, but I decided to learn the language first so learn it I shall *grumble*


Show comments for 'MultiTouch'
Tags: - Programming - Games - Unity - Shadowood
Show comments


Unity3D is amazing, great, wonderful etc etc

And then you get all excited about having spent all year reading and learning C# in depth like a boss. Having read the entire Unity manual, 100's of articles.... 1000's of articles....

And then... aaaand then... you can't even figure out how to draw a simple rounded rectangle on the screen to make a button. Basic things you take for granted in Flash completely missing in Unity. As Unity really is more of an operating system for making things. And so off you must head to the asset store and goole to find someone else's code to solve this. And then you find dozens of approaches, some long ago abandoned and longer updated, and the best ones no longer developed as Unity snatched the debs up and employed them! How is drawing a simple shape so complicated!

In any case, I decided to create a rounded rectangle in vector style using no bitmap data, found Vectrosity was super good at turn lines into polygons that then draw on the screen to look like well... lines. Nicked some kind to draw circles, put them together in a class and tadda the rounded rectangle drawing class was born:





And yah it has a glitch in it, but otherwise good job team me only took me several days of googling and trying to find a compromise

Ok now to just draw it the size I want and make it fit the width of the screen on ipad/ios etc etc...

Seriously... ok this too is hard apparently!

Which sprite / UI manager do I use, NGUI, SpriteManager, EZGUI..... on and on, oh Unity is bring out a new GUI system... they said a year ago... ok can't wait for that

Screw it, made my own Transform like class with relative scaling, positioning and all that fancy jazz. Took longer than I thought... many days arguably wasted

:-)



Now I need to draw my Logo, but at a different location and scale depending on the screen size, screen dpi.. orientation... oh god, what can of worms is this....

So I write that by having multiple copies of my special Transform and a script that picks which one of those to use based on criteria....

And there you have it, several weeks to get my logo and a rounded rectangle drawn to the screen exactly where I want it

This while making a game thing... could end up taking quite some time I think :-S

In the process made some weird looking stuff!

First attempt at rounded rectangle created some weird bacon like creations:





Rectangles ahoy:


Playtime with procedurally rounded rectangles!, Oh the fun I have:








Tinkered with making 3D looking text:





Show comments for 'Unity Vector Graphics'
Subscribe to my News Feed.. or screw you then!
The pure and simple truth is rarely pure and never simple -- Oscar Wilde
Copyright © 2006 - 2024 - Alex Lovett
Site and content designed, built and massaged by
Alex Lovett
( HD6 / HeliosDoubleSix )
contact me by email:
Page Rendered in: 0.006 seconds, like a boss