Game development studying - continuing

by Maxim Zavadskiy

Conclusion - self-evaluation

Posted by Maxim Zavadskiy on 05 February 2012, 10:58 PM

I like this course, especially that lerpz project. I didn't expect that big portion of software/game development tools, like debugers, profilers but it was all helpful. But I expected more of game programming itself. I see also there's a game programming project course that I think is the right one for me.

But now I have to go for the most boring stuff in the course - self-evaluation.

 1."Which of the course objectives you have reached?"

I think I did all the course course objectives well or even fine in some cases. But wait! Not all, it seems! I cannot say for sure that I can do this: "include debugging information into C# programs". Probably I simply don't understand that sentence. Does it mean inserting logging to console lines or smth else? I am also not sure about "understand how attributes are used to create NUnit test cases". Are things like TestFixture that we put before the test class mentioned here? Sadly I don't have time to check that for I am at very deadline. 

Also as I said previously I haven't studied MonoDevelop and VisualStudio tutorials well, so I can't say for sure that I met objectives related to those IDEs but I think I am familiar with MonoDevelop and especially with Visual Studio.

2. "In your personal opinion, explain

  • what have you learned during this course.
  • what kind of knowledge you have obtained?"

I am now familiar with a notable game engine, Unity. And I now know what to expect from other game engines. I studied useful tools that are convenient both for SW development and Game development.

I gained mostly pure practical knowledge, with a lack of theory beyond it. E.g. I know a tool, like Unity but I don't know how it works actually and what's it's architecture. But the topic about profiling is a good example with some theory inside it and that should be also applied in Unity's case.

That lerpz project that I did is smth that I can show to my possible employers to demonstrate some of my skills but sadly things about other topics are not so easy to show. Would be much better if we could apply all those things on the project while doing the course.

3."Give yourself a grade from 0-5 (0=failed,5=excellent)

  • based on reaching course objectives
  • based on personal effort you have put to this course (How many hours?)

"

I will give myself a 4 based on reaching course objectives. Firstly, because I always live some space to make things more perfect and I know I can always do this better than I did. If I would give myself 5 that means I am so satisfied with my result's that I don't see the way to make it better. A bit of philosophy...:). Also as I mentioned I haven't did the whole course but probably I will do that topics about MonoDevelop and VisualStudio soon.

Totally I spent about 45 hours doing this course but I still will do those two topic about IDE so it might go up to  55. Probably the amount is not correct because in one week's topic it seems I haven't counted the time so I simply took around 6 h for it. But in the course specification it  is 80 hours!! Does it mean that I did 45/80= 0.56 of the course with a grade of 3?? - Maybe but I had some experience in SW development and programming before the course so I knew much of things before the course. Well I see that I can work harder on the course, e.g. developing the lerpz project further. Ok I'm giving myself 4 based on personal effort.

I think that I did the course very well and even with some effort applied;). I am sure that the time and efforts that I spent on the course certainly worth it. A GREAT thank to teachers of the course and to all the participants!

week 6 - Know Your Hammer: Introduction of some IDEs (Eclipse IDE)

Posted by Maxim Zavadskiy on 05 February 2012, 12:23 PM

5.02

12:00

This is the last topic of this course:(. After that I just need to provide some feedback and that's all. I hope the content of the last topic will be fascinating. So, what I have... I see that I can choose one IDE of 3 to examine: Visual Studio, Eclipse or MonoDevelop. But where's the introducting itself?! I expected some articales or even video lectures about IDEs in general when I will undertand what is IDE, how it works and the most importand thing - classification of IDEs and most notable examples. I am more that sure there're plenty of IDEs and probably my favourite one or the one that will be favourite for some particular type of work does not belong to these 3. But  what I am waiting for? I will study that missing part myself! Let's google and read! To be honest I never did that although I dealed with some IDEs, like CodeBlocks IDE quite a lot. Now I think I will expand my point of view and probably will find another, even more convenient IDE.

I beginned with Wikipedia - http://en.wikipedia.org/wiki/Integrated_development_environment. The wiki article was a bit boring. Many of the wikisa are too formal I would say. I didn't studied much new from taht article but it leads to http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments. There are just plenty of comparasion tables for each programming language - quite boring. And no word in classification and also most notable IDEs are not mentioned. From those table of features I see that one of most powerful ones are CodeBlocks, NetBeans, Eclipse. I also see that MonoDevelop is not in the last place. I see that my teacher was not wrong when he advised me to look at Code::Blocks. But I still not satisfied with my understanding of IDEs, let's look on other articles... OK from what I see in the articles most of most notable IDEs support usually many languages but were designed only for a few originally. Again Eclipse, NetBeans and also Geany worths looking at closely. OK, I will start from Eclipse and maybe then go for MonoDevelop and finally will have a look at Visual Studio, a very short look because I am not going to use the product at this time that is beyong the freedom. So Eclipse...

Eclipse IDE

Eclipse IDE Video Tutorial part 1 : GUI (12 min):

I have seen in the beginning that there're different kinds of Eclipse for each programming language. Did I get it right that the core of Eclipse is the same in each case but it only has different plug-ins in each case? I installed the IDE in my Ubuntu distro as easy as going to SW Center and clicking install. There was just one Eclipse available, it seems that it's kind of universal build.

Ups, it seems I don't have plug-ins for C++ installed, only for Java. I need to fix it..

Wonderful!  I installed the missing C++ package for Eclipse and when I restarted it I see both Java and C++ Development links. I am beginning to love Eclipse.

The Eclipse layout looks natively and is similar to other IDEs which is great. I even think that among developers of IDEs there're some conventions or standards about IDEs.

The Eclipse UI looks fine and convenient, probably I like it even more than that of Code::Blocks IDE or NetBeans. But what a huge list of things appear when the right click in code-editor is done. That's too much to feel comfortable.

1:40

2:50

Perspectives are useful thing that I didn't use in CodeBlocks. Probably it's not there. In MonoDevelop it's called Layout I think.

Eclipse IDE Video Tutorial part 2 : Projects and Workspaces (6 min):

One idea that came to my mind when I was watching about Debug and Release targets: cross-platform support. It seems that at least with no special plugins it's not supported, i.e. from the beginning we bind the project to some toolchain e.g. GCC. But what if we would like to develop a cross-platform app using wxWidgets GUI? It's not convenient to create separate projects for each platform. In CodeBlocks I solved this by creating different targets, e.g. WinRelease, LinuxRelease.

Hm.. I wonder why Eclipse is restarting when I select another workspace? Did I get it right that all the settings including layouts are specific for each workspace?

Eclipse IDE Video Tutorial part 3 : Working with project (11 min):

 src source folder.... I always see the same folder names like src, bin etc, when browsing some open-source project. Is this some kind of convention or standard among developers? Probably there should be something about that on the Internet.

3:08

6:04

I didn't understand why Eclipse cannot clean or suggest cleaning a project when we move source files. Probably it can be done with plugins.

So what if I will delete some file occasionaly? How can I get it back?

Eclipse IDE Video Tutorial part 4 : Adding classes and refactoring (19 min):

Most of the stuff there I have used in CodeBlocks too but probably not auto include. Well actually it will be much more convenient if Eclipse will place includes as soon as we mentioned some class in the code. The method showed in the tutorial is partly manual but still more convenient than doing everything yourself.

Conclusion:

OK I have watched all those tutorials and I see that Eclipse has almost the same apperance and behaviour as CodeBlocks. I suppose that once I learned some IDE, like CodeBlocks, studying another won't be a challenge because all of IDEs are pretty much the same.

The tutorials were informative but I would be much better if all the features are demonstrated on one small but real-life related project (calculator e.g.) during it's development process.

Well I think that what I studied from those tutorials meets the specification stated in the topic:

  • Setting up a working hierarchy of workspaces, solutions, and/or projects in the IDE.
  • Setting up and using different configurations for example debugging and release phases of the project.
  • Adding, creating, (re)opening and deleting files in a project.
  • Building, rebuilding, and cleaning projects.
  • Running and debugging projects.
  • Adjusting project and solution settings to meet your requirements.

Now I will go for Coclusion topic where I will write a couple of words about the course and after that I will look maybe at other IDEs.

7:57

Total time spent: 3:48

week5: Unit testing with NUnit

Posted by Maxim Zavadskiy on 21 January 2012, 10:41 PM

21.01

21:00

This week's material won't be interesting that much for me I suspect. I have experience with JUnit and NUnit won't differ much most likely. From the other side I may do the task fast.

Let's look at videolectures:

Video lecture

Why do we need Unit testing: The main problem for me is to make myself DO the test units once right after I did my class and then forget about it. But I always lazy enough so I leave this for "later" which may result in nasty situations. This is the same as in case of documentation:)

21:16

22:07

There was mentioned smth about "Simplifies integration" but it was swallowed so I didn't understand. How it can simplify integration?

Let's look at that wikipedia link about unit test tools... From there I found that NUnit and JUnit are related to so-called xUnit. That means that they are basically the same systems but just implemented for different languages. And for many languages there are relevant xUnit frameworks.

Creating a simple test: what's an attribute in C#? Is [TestFixture] similar to Java's @TestFixture? I am pretty sure it's so.

Why may we need constraint-based assert model? It just does the same as "normal" model but we write slightly similar line of code. I wonder when it may be more convenient that usual style?

ExpectedException: but what if we have several test for some method of class that are put in TestMethod()? Then if the first test in TestMethod will thorow an exception the others simply won't be run! What is the solution here? Currenly I don't see any sense in such feature because usually there are plenty of tests for each method. Of course we may put try-catch block everywhere but it's not convenient.

I am not sure if I got the difference between MaxTime and TImeout. So Timeout may be applied only for complete test fixture and it measures the executing time of the whole fixture?

I watched the demo and I go for task. Oh yes, almost forgot there're some articles in Material section let's read them first...

Material

"About software testing in general": Yes I agree it would be nice to study a separate course in Testing, But the problem is that I haven't seen such on amk.fi, pkamk.fi or at my curriculum. A section "Testing methods" is interesting for me. So which of these 3 methods works better in most cases? Another question is, who should actually test some piece of the software: the programmer, who knows best of all what his code does  or other person, e.g. tester who will have a fresh look? Of course the best case is both but I think it may take to much time.

12 Unit Testing Tips for Software Engineers: http://www.readwriteweb.com/archives/12_unit_testing_tips_for_software_engineers.php- "Instead, write a test that focuses on the behaviour of the system." - well, I am not agree here. Behaviour may depend on many helper methods/classes and if for some reason behaviour method test will fail we then have to check each non-behaviour method used here in that case. But if the test will be written for helpers too then we will see immediately probably where is the problem exactly.

0:03

Task: Write a complete NUnit test classes

22.01

12:15

:(( For one hour I tried running the NUnit test but I always crashes with reporting of invalid path. I googled it and tried a plenty of different ways but all doen't help:(. I left my post in discussion forum on Moodle. I see other guys have similar problem. I will probably reinstall MonoDevelop and try again later on.

13:18

04.02

19:50

Today I did that assigment, here's the link to the screencast - http://www.youtube.com/watch?v=AwVKIrFW4DE

I did this week's assigment in several weeks! Probably I was too lazy or there were many things to do maybe.

I have studied a couple of new things about unit testing but the majority of them studied before. To be honest that week was not that interesting for me as previous one. But now I will go for the next one!

21:15

Total time spent: 4:40

Attached files Attachments 1

cpu-emu.zip (123.7KB) - Download

week 4: Profiling using SlimTune

Posted by Maxim Zavadskiy on 14 January 2012, 10:04 PM

14.01

21:14

The topic of 4th week seems to be more or less interesting, I think I have never done this in my programmer's experience. Also a note about video game optimization attracts me. So let's see what's there!

Video lecture

Introduction: From there I got that it's quite useful this profiling. I think it's especially good for optimization of big projects with big resource consuming. I'm remembering my ACM-contest that are about algorithms and data structures. There things is that not only the time(usually 2s) of execution but also memory was limited but the inputs were huge. So clever data structures and algos are needed to fit these limitations. Well actually I have never used profiling there though some of competitors do.

Hm If I'm not wrong in the definition of profiling given on the lecture debugging  also fits. Should it?

Ways of doing profile: well for me that's quite evident that we can use both. Or some tools offer one only? And yes, why we simply cant output needed info, e.g. memory use, all the time? We could use that during testing phase, when we play the game we develop and see at which moment it ates the memory.

Why profiling?: Good reasons were provided but for me it would be also strong argument that we should use this in case of big resource-consuming cases. oh Well actually many of modern games are such:)

When to profile?: I see the time that profiling takes is nothing compared to time to fix all the problems found. But first of all the developer should do the project from the beginning in such way that no optimization will be needed. I don't have enough experience if it can be in real live but at lest everyone should try. It's easier to do smth while it's hot and not e.g select non-efficient algorithms because efficient one is easier to implement and then to hope that it all will work fine. The same situation was described on Source code documenting.

Why profiling? I didn't understand why we need the program to be balanced in a way that frequency of each method call should be about the same? Probably I just didn't get it right what the lecturer says. Also can we actually see how frequently each method/object is used with dynamic call trees/graphs?

Calling context trees: So for the same function we have there separate node for each call of it. But won't it be inconvenient to see which nodes are related to the same function. At all, what kind of picture/info we get as an output from the profiling tool for those trees/graphs? Would be nice to look at it in the lecture but I hope I will have an opportunity when I will do my task.

Execution statistics: So these statistics can be collected during the run of the program? Then we have to get memory use and time use at each moment of execution. It differs from those two ways that were given in Introduction. Does this way have it's own name?

Execution flow: So how it's different from e.g. call graph? Do we get here just a list of function called?

Event-based profiler: C++ was not in the list of languages that have a profiler build-in. And I haven't seen that in C++ standard. But I am sure that some profiles exist with support of C++.

Statistical providers: Yes I was things about the fact that profiles can consume themselves a lot of resources. How they work actually? Should the profiler usually be built-in the project in order to work? But then the would be difficulties with memory and performance monitoring because the profiler use the memory and CPU too. Or it's probably is run as a separate process which interacts with the process of the program. But anyway I think the interaction will decrease the performance of the program so we won't get real results. It would be interesting to understand how it's actually done to get the correct results.

Simulators: so yes now I see that there're two ways: either to inject the profiler in the code or to run it separately. But Simulators I suspect is from another categorization that e.g. statistical provider. Statistical provider e.g. can be simulator, right?

Hm. but where is practical lecture that was mentioned in the end of the lecture? I haven't found anything. OK, I will see tomorrow.

22:47

19.01

15:43

Reading Articles

I found two interesting looking articles in the Material section of this week. I will go through them..

1."The Top 10 Myths of Video Game Optimization" (http://www.gamasutra.com/view/feature/1879/the_top_10_myths_of_video_game_.php?print=1)

The language used there is quite uneasy to read but the article seems to be helpful. The first myth touched interesting problem - when to optimize? Probably I remember not clear the lecture since 5 days passed but there was probably mentioned that the optimization is usually done in the end,But I read from the article that the optimization of micro level(amount lines of code) should be done closer to the end but not of Application and System levels. In the article wasn't explained that much why it is good to do so but one of the reason I got is that these last two levels are about hardware and class - structure so it's related also to design phase.

The article was a bit too professional for me to be honest and there were used such concepts that I haven't hear about. But the article worths reading. There was mentioned all the way that the main purpose of VGO is to increase Frame Rate. I'm not sure if that's true. Firstly the FR can differ from one moment of the game to another and at one moment it might be really slow and at another - really fast. I am sure that it's better to try to have monotonous FR during the game but that is not that related to the question. But what about game/level load time vs FR? I am not sure that all people would like the game that loads for 30 minutes but have extremely low FR. Well, probably I know to few about CPU and GPU work in Games to discuss that. But the good thing in that article is that the myths were related also to optimization in general.

2. " Profiling, Data Analysis, Scalability, and Magic Numbers: Meeting the Minimum Requirements for Age of Empires II: The Age of Kings" - http://www.gamasutra.com/view/feature/3137/profiling_data_analysis_.php

Should be interesting - real example of well known game! But to my embarassing I never played that game though many advised it much. I should certainly do that because I like good stategies. I hope the AI will be good enough.

" In these cases, we fixed the problem by capping the number of times the code could be called by other systems or by capping the amount of time the code could spend executing. " - here I was confused. How it is possible to limit e.g. number of times of function call by the system? If in some code that function must be called say 5 times how it is possible to force it to call it 3 times without affecting that code?

"And since performance profiling and logging significantly slowed game play, analyzing recorded games was a much better solution from the tester's perspective." - yes, I got a partial answer for my question raised during the lecture. At least at those times profilers deacresed the game perfomance significantly which caused some difficulties during optimization.

"While we were able to improve the pathing system for AoK, enhancing the unit-class hierarchy system was a much more onerous task. The unit-class hierarchy system from AoE couldn't be changed easily since so many game systems and so much functionality relied on the old implementation" - I guess that it was the problem of not good Object oriented design when AoE was being designed:). That again awaked a wish to study seriously OOD. At Savonia UAS there are no special courses about this. Probably it would be a good idea to ask my tutor teacher to run it there. Or maybe it is possible to run it as an online course like GPB2? E.g. "OOD in Games" or even beeter at first just general "OOD". But probably this topic is not that comvenirent to run online as I feel it will require a lot of discussions with teacher and student.

"VTune is great because you don't need to compile a special version of your program, it doesn't slow your program down while it runs, and it lets you see the amount of time the CPU spent executing processes besides your own." - Wow, nice! I think I will extend my knowledges got from the lecture quite a lot in this article. On example it's much more easy to understand differences between different profilers types.

Perfect, the article was amazing and I learned quite many things. Now I know roughly how optimization is done in real projects and what difficulties/solutions I can face/apply.

17:45

21.01

16:10

Ok, now I go to the assignment. I haven't found that practical lecture but it will be even more challenging and interesting maybe.

I installed the app and downloaded exercise app to profile which is a simple game like aero hockey where my opponent is a computer. Now launched the profiler which seems to be a light and not powerful one but let's see how it actually will do it's job. The good thing is that I don't need to recompile the app to profile in with SlimTune.

The input dialog of the profiler is simple but intuitive enough, from the first attempt I get things done. I played the game for about 10 sec and lost to the stupid AI:). The profiler generated statistical data based on sampling on each 5 milliseconds. Now I am analysing this info.

1. Per-Thread Call Trees Visualizer


Well to understand what is going on from that tree it would be good to examine the code at first but I don't see such task. From the screenshot1 it can bee seen that the app has 3 threads during it's run2 of them are some system functions in which I am not interested, they are called with frequency of about 1% and the Main thread with about 99%. Stop! That's wrong. It doesn't show the frequency of calling but just what relative amount of the time was spent in functions. So 99% of time during the app run was running Main thread and 1% - two other. two together.

Amoung functions called in Main the picture is slitly different. We see that Run method is used most of the time (91,57%). Other methods are some kind of initializers, like InitializeGraphics so they are called usually at app's start up. That's why the are not used much. I extended the Run function to check for the situation there and again noticed the method that is used most. I continued recursively to the very end. At the end it was PresentInternal method which belongs to DirectX3D library I suppose. 81,47 % of all samples were taken when that function was running. That makes me feel that this function is also uses CPU most, or hm.. GPU? I even don't know what is the actual situation. OKk anyway if the app is slow then I would certainly look at updateScreen function to optimize things. This is app's own method that make calls to DirectX to draw graphics I suppose.

2. Function Details Visualizer


I am confused a bit with this part of the task."Explain the function details from the program's own functions and library functions that are used extensively during the program execution. " - to do that I need to take several screenshots not one. But probably it's needed just to describe the situation with Main? I did in this way. The picture I got can be seen from screenshot2. I think this visualizer is a bit useless I get much more detailed and convenient info from Thread Calls visualizer. But it would be nice to have integrated function details diagram when I click on some method in previous visualizer(Thread calls). Sadly this feature is not available:(. Ok from that diagram I see that the Main method itselfs does not that much the most of work is done by Run method which Main calls. Some time is spent to initialize things, e.g. graphics(blue).

3.NProf-Style Treeview Visualizer


 In Tree View tab I get two trees of function calls. There're two of them probably because there were two threads running parallely. But where is that 3rd thread which was shown in the first part of the task? Hm.. yeah the input shown on the screenshot3 is not that clear for me. When I extend 47,Main()(I suppose this is the first function called in this thread) I get other function called in Main in their order of call and the first one is with id 265. But also after Main() this function is again present! I think that here two formats are integrated: I can extend some function to get a tree look what is called inside and also in the list form, if I won't extend anything. I feel it might be done in better way but can't say in which:). It's easier to use tree feature in this tab to find the info only about app's own methods(the task is such), From what I see.... Firstly the Run function is called and only after that initializers!! I don't know why it is so. Maybe a bug:)? Also that in that Run function some thread should be runned because it's calling tree is not big and I don't see there that updateScreen function that is called most of all. From the call tree I see that after Run() the graphics, sound is initializing and Window is drawing.

After the task is done I got a general impression what the profiler is and what to expect from it. I actually expected some more complicated output of information, probably more graphics, visualized graphs and that stuff. But that is a simple program I see and it doesn't do that much. Probably in most cases it is enough. But I am not sure if big companies will use such tool.

From this topic I got a lot of knowledges. I understood what the profiler is and why it is useful and also in which cases it is useful. I had a look at how games are optimized though reading that article about AoK optimization. But the main thing is that I now know that there profilers(I didn't know that):) that VGO is a big part of project.

I was missing a task about Lerpz platformer but nothing prevents me from do the task that I will invent! Of course it might be difficult to imagine some things about the game.

19:30

Total time spent: 6:50

3rd - Debugging using MonoDevelop

Posted by Maxim Zavadskiy on 31 December 2011, 11:00 AM

31.12

11:00 a.m.

LECTURE

This week's topic should be useful in my opinion although I have experience in debugging. Anyway in case of scripts and Unity things should be different a bit. Let's start from the lecture as always!

How to find bugs?: In my opinion and experience a debuggin on paper is maybe the most effective way although it consumes more time that e.g. debugging using a debugger because you have to e.g. update the variables on the paper each time manually and the debugger does it in your place. But nice thing about paper debugging is that you are acting as an interpretator so you feel some kind of total control on your program which is cool:) Also for me many logic problem are solved much more easily with this method.

I used debuggers quite many times but an embarassing thing is that I always was lazy to study info about some features, e.g. breakpoints! I knew only those that are intuitively clear how to use. But now at last I will learn a bit more I hope. Instead of breakpoints I always used run to the cursor but now I see it's quite manual way of debugging and it might be more convenient to set breakpoints in needed places rather that switch through sources and click a mouse each time.

What are tracepoints?: Well maybe useful thing sometimes instead of incode tracing but that has some disadvantages. For example unlike incode tracing( and debugging in general) I don't thing that tracepoints and traces can be so easily ported to another debugging tool if nessasary or goven to another programmer. So currently I preffer incode tracing. But it would be nice if IDE's would generate trace code automatically and there would be an option t hide debugging code when needed.(I have never used or met such features).

11:22 a.m.

14:07

It would be good to hear how debugers work actually. Maybe it is not that easy but I think we have to know at lease the basic principle.

From the lecture I didn't get what is the difference between soft and hard debugging and GDB, what are their pros and cons. Seems I should look into the Web for that. It also was a bit frustrating for me that it wasn't explained why we should use soft debugger and mono develop in most cases. I always like to understand what things I am doing and why.

Ok from the lecture I got a couple of new things such as breakpoint. Sadly tracepoint were not demonstrated at all:(. Not that advanced level I expected. Also I in the video tutorial of debugging and in my experience I see that it's more than frequently needed to step BACK. The fact that I haven't met this shows that this feature is hard to be done. But it would be really needed feature.

I will skip debugging excersises for now as I find them quite boring and not useful for me and will go to "candy" - developing the game futher.

TASK 2

Lets start things!

First of all I will do the remained task from previous week on joining wheels and box.

15:00

16:31

Ok, seems like a hinge joint is appropriate solution. Joints are useful but... it is a physical cheat to be honest. I wonder, is it possible to create a real joint which consist of physical objects completely. Then it will better simulate the real world I suppose. But proably perfomance will be decreased.

It's not that easy I see to get things work. I had to put 4 wheels but they are behaving like non-physical objects: they are ingoring collision with platforms! I don't know what is wrong. I have to look at reference answers for assistance...

Hm... Joints are not used there! Interesting... Aha! There are box and wheel colliders attached but they are not rigid bodies - that's the solution. Ok..

Now I will start the 2nd task.

I used our previous version of the project (the result of working on 2nd module) as a base. I noticed that it is quite hard to pull the cart on the moving platform because of it's small size and because it doen't stop at the bottom. So I resized the platform but I didn't touch the moving behaviour because it's even more interesting I think in this way. But the cart being placed on the platform behaves like it is too light, it is loosing it's balance and rotating. I tweaked many params of the cart but it is still bouncing.

Ok after some tweaking I get desired results. Now I have to "Make it possible to load the ship fuel."

19:53

22:41

I found a ShipFuelTrigger already done from solution of second week but I will do my own script.

I found an interesting thing in Unity: actually there're classes for Colliders, GameObjects! And I though it is hidden in Unity engine and we can only manage these objects though Unity IDE!

22:53

23:25

I studied GUI basics of Unity from the manual. Things are strange for me. I used GUI systems in Software in other way, there aren't OnGui stuff and GUI.smth to create smth. I don't understand why e.g. we have to redraw the button each time with OnGui, event based system I think is more elegant. But I see there's no way but only one in Unity(at least in non-Pro version:)).

Ok after some time I the button "Load Fuel" is desplayed each time the fuel is near the ship and the fuel destroyed when the button is pressed . Here is an interesting issue: where to put trigger script in the spaceship ot in the fuel?? I decided to put in the fuel for Fuel should know how to destroy itself and explose.

1:00

1.01

11:18

Now I need to make an explosion animation when the fuel is loaded into the spaceship.

After about an hour I did my very own(except textures) explosion using particle systems. Now I should make it instaniated when fuel is loaded.

13:00

13:51

I decided to make the game fair, i.e. the player won't be able to enter the ship if the fuel is not loaded. So I have to make a fuel_loaded member variable for the Ship. And that may be a bit challenging for I don't have Spaceship class but a set of scripts attached to Spaceship game object. For simplity I will add the entering script to the spaceship not to the Lerpz so I can easily access fuel_loaded.

I noticed that altough MonoBehaviour has OnTriggerEnter method, when I begin to type this in the script, the IDE don't suggest to fill the name of the method to the end, which is a bit frustrating.

I found another disadvantage of not creating separate class for each new GameObject(Ship, Lerpz) - when we want to call some method of other game objects we have to use this nasty CallMethod method which is not a good solution.

14:43

20:00

Some difficulty I met when I was finding out how to detected that the collider in OnTriggerEnter is Lerpz. When I checked that colloder==lerpz it doesn't work because actually the footEffects is the trigger of Lerpz. I am sure that there should be more convenent way than passing footEffects as a parameter to the script but I don't know which way.

foorEffect turned out to works badly so I added separate tigger area to lerpz.

I have a problem hiding/destroying lerpz. When I set active=false the lerpz remains. But GameObject.destroy works! But there's a hidden problem: it will destroy the lerpz not hide it so it's at first chating because the lerpz actually should be inside the spaceship, and at second all the members variables of lerpz will be missed, e.g. it's coins, experience or whatever. But for this time I will do in this stupid way of destroyin the lerpz.

Wohoo! I did it: the lerpz now can enter the ship when the fuel is loaded and I can control the ship but there's a problem with camera: it remains at the same point and not follows the spaceship.

I found a method in CameraScrolling script of main camera but to coall it with CallMethod I have to pass 2 parameters which is not possible it seems. That's another problems with separate scripts. So it seems I have to use default value in that function. But no! There's an overloaded method with one param there so np. OH! CallMethod doen't support overloaded methods! No way but to put there a renamed method.

Fine I did that! Now the last thing remains..

I haven't finished the task today and missed the deadline but I think it is no problem if I sent it to the teacher tomorrow because of holiadays. So no rush..

Wow I'm spending a significant but enjoyable amount of the time on this course, especially on this task!

23:53

2.01

14:30

I used a rotating particle system as an appearance of teleport: looks flne! But I don't know what effect to use when the ship has dissapeared. After a while I decided that the teleport will get smaller and smaller and then a blue explosion will be shown.

Hm, strange! When I copy-paste the explosion from fuel and change it's appearance that of fuel is changed also in the same way! Crazy!

At last! I found an issue: particles! I used in both cases flam particle and when I channged the color in particle system I actually changed the flame itself!

Yep, fine! Now "Quit application after ship has disappeared and final effect has been shown." I think it's not difficult:)

16:00

20:00

But not that easy because there aren't event's in Unity!!(it seems) So I ended up with this:

if(final_explosion_instance==null&&explosion_beginned) //the game ends after final exposion is gone


which is not beatiful

As for me there may be much better script support in Unity.

21:51

21:00

Fine I tested the game and all works!

23:00

I am attaching some screens demonstrating what I finally did in the task. Enjoy!

CONCLUSION


Totally I spent about 1080 minutes on this week, that's about 18 hours(if I didn't confuse my calculations)! I can't say of course that I was fully concetrated on the task at all times, so real time may be less.

For that time, I got a good portion of knowledge and experience about Unity and scripting. I began to understand how the whole consept of this game engine. Some things about scripting possibilities in Unity make me a bit disappointed, such as some OOP issues and invconvinces, SendMessage, no Event/callback support. But probably I simply didn't find out how to do all I wnat in Unity in the way I want. Anyway I find Unity quite a powerful and easy to study.

One important things about Unity classes structre I get is that properties of game object in Unity is not done by inheritance but with aggregation. E.g. if we make a gameobject a rigidbody  then the relevant GameObject fiels called rigidBody gets "filled" with RigidBody instance. I can't say for sure at this moment that inheritance would be better solution but I think that personally for me it would be more intuitive.

 

Attached files Attachments 7

1.bmp (3.8MB) - Download

0.bmp (3.8MB) - Download

5.bmp (3.8MB) - Download

3.bmp (3.8MB) - Download

6.bmp (3.8MB) - Download

2.bmp (3.8MB) - Download

4.bmp (3.8MB) - Download

Feedback

Anssi Gröhn - 15 February 2012, 3:16 PM

Module 5:

You have explained that you have prior experience with JUnit framework, which if suspect to be similar to NUnit. You explain your personal issue of leaving unit test and documentation writing for "later" and never actually do it.

Unit testing simplifies integration because it helps in testing individual components, and thus integration of components to larger whole becomes easier - we can be more condifent that components themselves work properly.

You have explained that Nunit and Junit are related to xUnit framework, and discovered it to be a system which Nunit and Junit implement for different languages. You have pondered about C# attributes and their relation to @TestFixture in Jave. You have pondered about necessity and advantages of constraint-based assert model. You have pondered about usefulness of ExpectedException with several asserts in same test.[Obviously, you need to create a separate test case for throwing an exception].

You have pondered about the difference between MaxTime and Timeout attributes. MaxTime waits for test to complete, and fails test if its running time exceeds the given time. Timeout, on the other hand, cancels test immediately if given time is exceeded. Both can be applied to individual test case.

You have pondered about different approaches to testing, and should testing person be some other than programmer itself? That depends on what is tested, but programmer should have some kind of objective testing made for own routines that are written.

You have pondered about writing a test that focuses on behavior of the system. Writing tests in this way helps finding real problems easier than just by testing each component separately. If specification for a single component is wrong (for some reason), integration testing  should reveal that it has a problem.

Your screen cast shows well what you did for this module and that you were able to write unit tests and run them properly.

So you have made contemplations about learnt lessons, made observations and raised faced problems.Good job!

Anssi Gröhn - 15 February 2012, 3:51 PM

Self-evaluation:

You have stated that your reached course objectives well. You have pointed out that objectives "include debugging information" and "understand how attributes are used to create Nunit test case" are difficult to understand - I will fix these for next time. And yes, if you compile program in debug mode (include debug information) that covers first one. And that last is just as you described.You state that you are familiar with MonoDevelop and VS.

You have gotten familiar with a Unity3D game engine, and are able to deduce how other game engines work. You have learnt to use tools for software development. You have stated that you learnt mostly practical knowledge (Unity's architecture is covered in detail on another course, GPB1). You have gained a piece into your portfolio (Lerpz project) that you can show to potential employers.

I agree that including all information into single project would be nice, but lack of time made it impossible to do complete integration. I will try to improve this part in the future.

You have outlined that you would receive grade 4 from this course, and stated that you feel you have room for improvement in course topics which would prevent you from having grade 5. You have listed your time consumption for this course and calculated it to be roughly 55 hours, which is below estimated 80 hours. You have deduced that your personal experience and prior studies have effect on that, which I have to agree.You have also given your personal effort a grade 4.

I feel your estimate is pretty accurate, but will get back to your evaluation vai Moodle.

anonymous profile picture
EdwardEstrada
Thank you so much for this informative post and points. I hope the information you have posted here will reach the readers. And also I like the way you discussed this topic here for us and I appreciate you for this great effort. Likewise I used another helpful resource https://essayreviewratings.com/
anonymous profile picture
Amna
There must be communication channel between the service provider and service seeker so they can communicate with each before starting the task. https://alternativestips.com/sites-like-fmovies/
anonymous profile picture
AHeeteshimi
<a href="https://cialisle.com/">where to buy cialis</a>
anonymous profile picture
Norton.com/setup with product key
Norton is one of the popular antivirus products in the market with a wide range of products. It is a bestselling and trusted software brand in the market with advanced technology. It offers exceptional features and complete protection to your system. Norton timely upgrades its products with market trends.
Page created 06 February 2012, 3:46 PM / Page modified 06 February 2012, 3:51 PM
You can see this page because it is public.