Pages

Friday, March 19, 2010

happy new year with a new demo

what? new year?
march 21th is the norouz day and it's the first day of year in Iranian calender.
we would love to create a game for norouz just what others make for western new year and christmas but we did not have the time to do so. so just a small demo that has some information for you and also is beautiful.
to know more about norouz see this
http://en.wikipedia.org/wiki/Nowruz
to see my demo go to this page

http://gcsoft.persiangig.com/zzzzzzzzzzzzzzzzzz.html
technically the code for the demo is simple and the code without function and class definitions is less than what i want to write here :) the modeler guys did their job well but i did not have the time to make something good out of it. it's small app that shows you and introduce 7sin to you.
what i learned
even in this small project that took less than an hour to complete i learned important things about unity.
1 remove every component and code that you don't need or use. unity will choose used assets (meshes and textures and materials and ...) for you but it compiles all of your scripts so remove what you don't want if you are publishing for the web. remove all components that you don't need too. i decided to play music on this demo and made the code for it but later it changed and when i removed all the stuff the size decreased 7 k. you might Say "hey it's not much". let's say you have 10,000 visitors and 7000k is about 7MB of your bandwidth and it can be important for you and if you remove 50k from one project you will buy 3 or 4 seconds for low speed connection users and some bandwidth for yourself. so always do this
2 always use mesh compression for web games. it compress your meshes well. my game was 1.56MB and now it's 992K so use that even if it takes time to change all mesh settings. if you have unity pro, you can create editor scripts for this too.
3 always write editor scripts for things that you do more than one time. i wrote a small 3 line script after doing something 5 times and saved myself from doing 30 more times this night and much more in other days.
i'll go to vacation so i'll not be here to answer you but email me any feeedback at ashkan_gc@yahoo.com
here also i want to thank sobhan and hossein for their great job. i will create something better with their models this summer.
hopefully the next year would be a better one. god willing!

Monday, March 8, 2010

interactive destructible objects and meshes

did you think about them before? what are they good for? can they add value to your game's gameplay? are they good design tools? are they bad rocks that designers of AAA games hide themselves behind them?
I can not stop my creativity when i think about them. my imaginations go wild and i can not get it. you saw many destructible meshes in games developed with UE 3 but when i think about destructible meshes i don't think about rocks and wholes in them or braking stones and ... i don't think about war or anything action. did you think about a cooking game that you can cut onions in any way you like? i thought much about it. it's not completely possible but for many foods it's possible to use really random destructible parts. for some of them you should create meshes of complete grocery and also create pieces yourself.
however there are some problems in your way. texturing of destructed mesh in the way that you want is not always easy. think of a potato and an onion. if you try to cut them, texturing the internal parts of the potato is rather easy but what about the onion? is there any possible solution?
what about game performance? physx tries to do it's best for you and you'll not have any problem in a normal cooking simulator but a vegetable cutting machine with 5000 tomatoes is a different story. i think performance will not be a big issue because in most cases you don't need many rigid bodies.
there is another important factor. did you think of gameplay of your game? isn't it too hard to cut the onion freely? can you make a casual game with free destruction of meshes. a very casual game, i don't think so.
i think there are endless possibilities. using destructible meshes with project natal or wiimote adds much more to it. a cake cutting game? lumbering? oh maybe! tell me what you think. i added a feature request to feedback site of unity and want to invite you to vote for it.
http://feedback.unity3d.com/forums/15792-unity/suggestions/536687-destructible-meshes