MoonDragon: 3rd Person Platformer

Ok, so this is my first game demo online. It’s called “MoonDragon” and it started out as just a terrain test and then evolved into a combination of what I learned from the 3rd person platformer tutorial and the FPS tutorial. It’s not perfect… actually it’s far from perfect, but it’s a start. Since this is my first game demo online I haven’t done all I can do yet to optimize it. It comes in at a whopping 38mb! So it will unfortunately take a few minutes to load… but I think you will enjoy it.

http://www.idancerecords.com/games/MoonDragon.html

Let me know your thoughts on improvements. I know that his huge gun needs to actually be attached to his hand and he needs to actually pose when he shoots, but I haven’t got that far yet. I’m still trying to figure out a way to make it easy to aim when he shoots. Space bar to jump high or mini fly forward. Use the arrow keys to navigate and the mouse to move the camera in the direction you want to go. The terrain is huge so there is lots of ground to explore and surprises along the way. Have Fun!

Best Regards,

Joey

P.S.
Thanks to all those on this forum who took the time to answer all my stupid newbie questions! If it wasn’t for all the wonderful support from everyone on this forum there is no way that I would have accomplished all that you will see in this game… so many thanks to you guys!

Oh, I forgot. Here are a few screen shots…

another screenshot…

editor screen shot showing how big the world is…

another editor shot…

You’ve been busy! I salute your bold color choices.

As for improvements, with only a few minutes available to play with it, I’d say a loading progress indicator, and a way to get more ammo once you run out (I didn’t find it if there was one).

Ricko

Hi Ricko!

Thanks! You are correct. I have been very busy on this game. I have been working on it non-stop for about 2 months now whenever I get a chance. Your also right about the ammo. I forgot about that. I need to work more on the FPS tutorial to figure out how to refill the ammo or how to create ammo pickups as well as a GUI display for how much ammo you have left. I also want to make the dragon breathe fire when you press a button and have that cause damage on the enemy robot guards. I think I can do that similar to how the fire for the Lerpz rocket boosters are used in the 3rd person platformer tutorial. That shouldn’t be too difficult to accomplish. And the loading progress bar… absolutely needed… I know how to make one for Flash games, but haven’t got that far yet in Unity, but I presume it can’t be that much more involved. Thanks for the feedback and helping me get it online!

Looks like fun! Unfortunately, I didn’t get as far as trying it because a) it was taking a very long time to download and b) I noticed it caused syslogd to spin out of control due to the large amount of debugging information that is being spat out into the log.

This error appears in the log, repeated about 60-70 times a second for the entire duration of the loading process:

----UnityEngine.Debug:LogWarning(Object, Object)
----UnityEngine.Debug:LogWarning(Object)
----UnityEngine.GUISkin:GetStyle(String)
----UnityEngine.GUIStyle:op_Implicit(String)
----StartMenuGUI:OnGUI()
Unable to find style 'mainMenuTitle' in skin 'LerpzTutorialSkin' repaint
UnityEngine.GUIStyle:op_Implicit(String)
StartMenuGUI:OnGUI()

I presume that means that you’re missing one of your GUI styles and you need to fix it in your project.

It’s quite important to avoid these kinds of log dumping errors, especially on Leopard, because they can use enormous amounts of CPU time and memory, as well as filling up disk space very quickly.

Anyway, I’m looking forward to trying it properly at some point. I love the visuals. Keep it up! :slight_smile:

I wish I was programmer savvy enough to know what that log error means. Unfortunately, I don’t know how to fix that. I am using the Lerpz tutorial skin for my Start Screen and it references that ‘mainMenuTitle’ GUI Style which it cannot seem to find somewhere else. I looked for it in the Lerpz skin, but couldn’t find it myself. Does anyone know where it comes from in that 3rd Person Platormer tutorial?

I uploaded a new build of the game that resolves the ammo issue for the moment. You now get 200 ammo (instead of 20) to start until I can figure out how to make ammo pickups and place them around the level.

Ok, no more log/console errors in this latest build. I also added a round house kick when you press the Fire2 (ALT/Option) key which will cause damage to the enemy robots. Now i just need to work on reducing the file size. Where should I begin with the optimizations stuff? I already putt all the pickups on their own layer and turned their visibility off in the Far Camera so they don’t have to render in that camera. I’m also using mostly prefabs throughout the game level. Is there a generic optimization script that I can use similar to the one used in the island demo?

http://www.idancerecords.com/games/MoonDragon.html

How big is this program ?

I have very fast connection, but it takes AGES !

Maybe a progressbar would be nice to see how much of the level has allready streamed in ?

It’s currently 37mb in file size. I have tried compressing all my textures to bring down the file size but it didn’t help much. I’m not sure what else to do to bring down the file size. I also made an instructions screen on this latest build and now the dragon can breathe fire when you press the Fire3 button (Apple/Cmd) key.

Take a look at this:
http://unity3d.com/support/documentation/Manual/Reducing%20File%20size.html

Looking at it, it should be possible to get it at least down to 5-6mb with some work.

Thanks Joachim, I’ll take a look and see what I can do. I could also watch the performance optimization video from the conference a few more times. I’m still entry level in terms of programming so it takes me a bit longer to get up to speed on that end… but I’m determined to master game programming. And speaking of that can you recommend any good beginning game programming books that would be most targeted at programming skills that I could apply directly to Unity? I almost bought one on beginning C++ game programming this weekend but I wasn’t sure if there was maybe something better out there to start out with… like maybe something on JavaScript instead?

I wouldn’t recommend a JavaScript book, as it’s certain to be focussed on web programming. The concepts are what’s important rather than the language…most anything you learn in one language will correspond to JavaScript in Unity, though sometimes only on an abstract level, since the syntax is different sometimes. Having a general knowledge of programming in some object-oriented language (not necessarily focused on game programming) will help a lot when programming Unity.

–Eric

http://www.idancerecords.com/games/MoonDragon.html

It works correctly now… and with no errors in the Editor Window. Now the big problem I have to solve is to continue to reduce the file size. I’m still coming in at 28mb even after reimporting every single texture at 256 max resolution? Does anyone know how to make a progress bar rather then just displaying the Loading text? I saw some code related to it in the documentation, but I couldn’t get it to work right.

Also, this update now allows for the fire breathing dragon to actually cause damage on the enemy robots when you press the Fire3 (apple/cmd key)! I’m getting pretty good at taking bits and pieces of code from different scripts and then getting them to work for something different. I used the punchHit, punchRadius script sections from the Lerpz tutorial and the fire breathe I also got working from the jet boosters fire tutorial part of the Lerpz tutorial. Great Stuff!

About the books… Flash’s ActionScript is an object oriented programming language. Will learning that help me to code better in Unity?

Look in the console log after building; that will tell you how much space the various assets are taking up.

I would say so, although I have almost zero experience with actually using it, so take that with a grain of salt. :wink: I did come across some useful ActionScript source code at one point that I was able to translate to Unity with not a huge amount of difficulty.

–Eric

While an entire JavaScript book will not be of too much use, I suggest getting a basic book that covers all of the basic JavaScript syntax. I have Pure JavaScript which is an excellent reference. You should probably find a book similar to its first 100 pages which covers the data types, conditionals, etc… And then use Unity’s online manual to get a grip on what hooks into their system they’ve added to it.

You can get a lot of information using Unitron to search the Unity Script Reference.

Thanks for the info on JavaScript guys, I’m going to see if I can find that Pure JavaScript book and also try my hand at translating a few simple Flash ActionScript code snippets since I probably have more knowledge of ActionScript then anything else at this point. If I can accomplish that then I might be on to something big because I could start to add some Flash-like features to my Unity games.

Regarding the console log after building… I have viewed this file and looked at the break down. Approx. 75% is in the textures and then about approx 20% in the mesh area. That is why I went through every single texture in the game… one at a time in the Project view and clicked the Settings button and then choose 256 size and the default compression setting (the one for smallest file size according to the documentation) and then reimported each texture. Doing this reduced my file size for my web player from 38mb to 27mb. It helped, but obviously not enough. This is a concern to me because I’ve only populated about 1/3 of the terrain with models. I was planning on adding a bunch more stuff to the level to fill in all the empty terrain sections, but it appears now that if I do, I will have to forget about publishing to the web player. Is there any other way to reduce file size?