Pages

Friday, September 9, 2011

version control

I don't know weather you heard the word version control before or not but I am sure that most of you used it never before. I don't know why no one don't teaches using source control (version control) in first semester in university. I read a great article on reasons for which I forgot the link and name and ... completely (shame on me). Version control software allows you to keep the history of all changes to your project and its files. It also allows multiple people to work on the same project and merge their changes with ease. It works on most network protocols on LAN and on the Internet so working remotely is highly possible. To use version control you don't need experience or anything close to that. Just download an SVN server like visual SVN server and install it on a computer in your LAN or on a machine with static IP on the net, even you can use one of the many free alternatives like sliksvn.com. If the project is open source there are dozens of sites that would be more than happy to lend you some space. A project's container on the server is called a repository and all users and members of the project will connect to it using their clients in order to put their changes on the server (commit) or update their projects (working copies) with the changes other maed to the project (update). As you might noticed we use subversion (svn) as our version control system. There are other systems available with pros and cons which I'll not describe cause you can find much info simply by googling their names. As subversion client, you can use the main/original command line client but there are many clients available for most IDEs. There is a great client for windows explorer called tortoiseSVN that we ourselves use. Before using SVN if someone would ask us: what do you need on your system to make a game we would say, well Unity and visual C# express but now surely we would say: Unity, visual C# express and subversion surely with tortoiseSVN client. The speed would become more than doubled even when only 2 or 3 people are working on the project. Unity users should know that it's better to don't use the SVN clients of IDEs cause there are files that they should version but they are not available on the projects of their ides (i.e models and scenes and prefabs and ...). you can use visual studio's SVN client but don't forget to commit your other changes. We highly recommend tortoiseSVN for windows users. Lucas meijer of unity himself recommended this to us. Unity has a version control software for itself that is called asset server which is $500 for each client but they say that it handles large binary files much better than other solutions which originally created for versioning code (text files). At this time some of the unity file formats are binary and svn can not merge them so if two people change a scene when the second one commits his/her changes changes of the first one will be lost (file will be replaced and not merged). in 3.5 this will no longer be a problem cause unity will use YAML for all of it's file formats which is a popular XML serialization format. they'll also bring in a better integration for subversion and perforce too. A big thanks to robotduck for reviewing and helping me to edit the post (i did not manage to find the time to do all of what he said).

Thursday, September 8, 2011

version control

i don't know weather you heard the word version control before or not but i am sure that most of you used it never before. i don't know why no one don't teaches using source control (version control) in first semester in university. i read a great article on reasons for which i forgot the link and name and ... completely (shame on me). version control software allows you to keep the history of all changes to your project and it's files. it also allows multiple people to work on the same project and merge their changes with ease. it works on most network protocols on LAN and on the Internet so working remotely is highly possible. to use version control you don't need experience or anything close to that. just download a svn server like visual svn server and install it on a computer in your LAN or on a machine with static IP on the net, even you can use one of the many free alternatives like sliksvn.com. if the project is open source there are dozens of sites that would be more than happy to lend you some space. a project's container on the server is called a repository and all users and members of the project will connect to it using their clients in order to put their changes on the server (commit) or update their projects (working copies) with the changes other maed to the project (update). as you might noticed we use subversion (svn) as our version control system. there are other systems available with pros and cons which I'll not describe cause you can find much info simply by googling their names. as subversion client, you can use the main/original command line client but there are many clients available for most IDEs. there is a great client for windows explorer called tortoiseSVN that we ourselves use. before using svn if someone would ask us: what do you need on your system to make a game we would say, well Unity and visual C# express but now surely we would say: Unity, visual C# express and subversion surely with tortoiseSVN client. the speed would become more than doubled even when only 2 or 3 people are working on the project. unity users should know that it's better to don't use the svn clients of IDEs cause there are files that they should version but they are not available on the projects of their ides (i.e models and scenes and prefabs and ...). you can use visual studio's svn client but don't forget to commit your other changes. we highly recommend tortoiseSVN for windows users. Lucas meijer of unity himself recommended this to us. unity has a version control software for itself that is called asset store which is $500 for each client but they say that it handles large binary files much better than other solutions which originally created for versioning code (text files). at this time some of the unity file formats are binary and svn can not merge them so if two people change a scene when the second one commits his/her changes changes of the first one will be lost (file will be replaced and not merged). in 3.5 this will no longer be a problem cause unity will use YAML for all of it's file formats which is a popular XML serialization format. they'll also bring in a better integration for subversion and perforce too.

Tuesday, December 14, 2010

We.Update () {} :)

Fellow developers and friends! After months of silence I decided to do a post here to update you all about our status.
Unfortunately my closest friend and my best workmate, Sina immigrated to another city to study in the university that he qualified for going. Fortunately we are always in contact but it was better if he was here. He will come to Tehran today and we will go to a fun session together soon. In these last months we did some good jobs and said good bye to those small phone projects. Doing mobile phone projects is not bad but we needed some more challenging things in a more creative manner than what we had before. So we said good bye to those guys to focus on our own big project and doing other contract works.
We are doing some web player based project for a well known brand in our country called "Golrang" games are fun to make because they are targeted at dial up users and using different features like streaming and creating content procedurally is what I love much. Hopefully the first game will be released in next week. Their staffs are cool guys and working with them is much easier than many other people that we worked with before. They are much busier than what you can imagine but it's easy to work with them because they allowed us to do what we love and just showed us some outlines. In this way we can let our creativity to go wild and create good games.
We also talked to some other big names here and the results are good. Hopefully we will have some work to do after this project. We might divide our team's power to multiple projects too. From a general point of view things are not go as well as we expected about some projects but some others are going well. So let me to be clear I am happy with the result of our contract works but our big project is not going well because of some technical restrictions. We are changing it to become something more doable with our time and budget. The project is a social multiplayer game that might become a social MMO. I can not tell more now but soon we will start writing development blogs about the project.

Monday, June 7, 2010

happy birthday unity! i am happier than what you can imagine. unity is a great engine and i described before what is my story with unity and how i found it and ...
unity staff are cool guys and humanitarians. they made the engine free to remove everything from anyone's path to become a game developer. from any country. it might be USA or south Africa, anyone with Internet access or even without it can have it and make money out of it. doing Good always will result in Good. it's a rule in our world. in my beliefs it's God's tradition. unity has many technical advantages over other engines but i think the most important advantage is it's cool staff and their strategy and vision. because of their love and great strategy unity's community is more than a technical community and you can easily see it everywhere from forums to answers.
surely we will be amazed by told and untold features of the unity 3 but real great thing there, is unity's vision from gamification to democratization. with help of this free product i am creating my game development team and we even started doing jobs for others. it wass not possible without a free unity. i would do other jobs like programming normal windows/web apps to make the money to buy unity but now i can use it and make money to buy it. it's great! every good work that users do with it will be their and also a big share will be for UT. users in this community will be effected by the vision of UT founders and surely will do works for charity or any other good job with it and it's shares will go to UT too. making money in a correct way is a good job and UT made it possible with the free edition.
i don't have to make a happy birthday demo but if someone has time please create a room full of unity logo boxes and some paths to it. then people are running toward it from other rooms (other engines) and you should make their path clean and remove all sort of things from their way.. :) when a developer comes to the room, he will not wait much so drag a logo and box toward it to make it a UT developer.
hope and a great year for all unity developers. i would be happier if the logo was green :)

Thursday, May 27, 2010

NaCL, advantage or disadvantage

recently Google announced a technology called native client or simply NaCL.. we can run native code through it in a secure manner. it has it's own compilers and the hole machine code will be checked for security problems. your code has no access to drivers and operating system calls. it's multi platform and it's code will be compiled before running from an intermediate language. NaCL exposes some useful APIs for it's developers to use in their apps. one of those APIs is OpenGL ES 2 so game engines can be ported to NaCL. as most of you know unity works closely with Google to port it's engine and in Google IO they showed Lego star wars running on Linux using NaCL.
NaCL will fill the gap between games and users and removes the need for plug ins completely for it's users. if other browsers follow it we should forget the plug in word at all. some features will be covered by HTML 5 and some others by NaCL. two questions will come up. 1 what will happen to platforms like flash and silverlight? 2 is it an advantage for unity or not? surely the second question just will come up in our minds (unity developers).
Microsoft and Adobe invested much in RIA platforms and they don't want to lose their market. hey NaCL is not their enemy or competitor! you can write any app for your desktop using C++. oh you can write it using assembly! you don't do that always. people even use flash and silverlight for desktop applications. so they remain great platforms for creating apps fast and easy. flash will harm from this because silverlight now has great features and flash's main advantage it's wider platform support and plug in install base. the first will be killed by moonlight and the second by NaCL. Microsoft added much to it's silverlight and continue and i think this competition will result in 2 great platforms. maybe silverlight kill flash just like unity that killed director. so middle wares will not be killed by Nacl, adobe might use it for creating a web based premier or video conversion software and many other CPU bound applications but middle ware will remain important. it just will become easier for middle wares to come and say hello to users.
now the second question and my answer! it means that torque, shiva, dx studio, unreal, unigine, cryengine can be all on the web just like unity. yes it means! is it bad for unity? no no no! why and how?
1 UT guys showed that they are creative guys with correct vision. they choose write add ons and write great code. it's the only engine that uses mono for it's scripting. why? because DHL and other UT guys have the correct vision.
2 even now unity's plug in penetration is not too much and the competition is open for others. 30M is much but it's not like flash available everywhere. do you want that much! let's donate UT to show world cup games with unity player for free and anyone will install it. it's what Microsoft did on Olympic with silverlight :) just kidding. let's make great games and users will have to install it. when it's not the main power of unity we should not afraid. it might just make unity a better engine because it should compete.
3 it will remove the player size limitation of unity because each game will have parts of the runtime that it uses in itself. it's good and bad. it's good because they can add features without even thinking about size. it's bad because all game's size will become bigger than before. we might find work around but unity's engine is about 4MB now and this will be added to every game. maybe unity exposes it's engine as APIs for NaCL users using unity and Google might be kind enough to preinstall it on chromium. :) in this way we can have best of both worlds but someone might say it's just like having a plug in another might say Google will not do it but Google will ship flash with it's browser so why should not ship unity? from the other hand each game should carry parts of the engine that it really uses. some parts like rendering and input and physics are needed for all games both all parts of the physics are not. for example cloth simulation can be added to unity in a seporate module and just games using it will carry it with themselves.
4 unity has other features for web games that other engines don't have because either they don't want to be in this market or they are not mature enough yet. for example WWW class or mono's abilities to work with databases or web services are not available in those other engines. server side middle wares has clients for making MMOs and virtual worlds using unity because it uses mono and but they don't have clients for other engines. for example netdog, photon and smartfox server all have unity clients and C++ clients or flash clients. using them in unity is easy but try integrate them with torque's source code and use them. how much will it take to integrate?
there is much more to say but i have much work to do these days.

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