Showing posts with label UDK. Show all posts
Showing posts with label UDK. Show all posts

Monday, April 15, 2013

Book Review: UnrealScript Game Programming Cookbook

tl;dr: Solid book for beginners. I'm not happy with the fact that a lot of the 'recipes' use derived UT classes instead of the base UDK engine. Covers a lot of important information at the beginning, sets you on the right track to avoid confusion down the road. Chooses to explain silly Canvas for GUI instead of Scaleform. Good explanations, poor editing (has some typos in code blocks). I wish I had this book when I started my senior project.

The Actual Review

A couple weeks ago, someone from Packt Publishing asked me to take a look at one of their newer UnrealScript books. I haven't worked with UnrealScript or UDK for about a year now, but the memory of the frustration and lack of documentation is still fresh in my mind, so I was happy to take a peek.

Overall, I kind of wish I'd had this book back in the summer of 2011, when I was first trying to wrap my head around UDK development for my senior project. The book itself isn't a fantastic cure-all for the tribulations one will inevitably face when working with UDK, but the first chunk of the book would definitely have clarified a lot and set me on the right path. Early on, it tackles the subjects of IDEs and script references (like UnCodeX and the Dungeon Defenders Development Kit; I'd used UnCodeX extensively, but I wish I'd known about DDDK). Then it goes on to tackle prefabs and archetypes, and then walks the reader through the creation of a fairly flexible camera system. All of this information is delivered fairly painlessly with plenty of explanation.

For my purposes, that's where the usefulness of this book ends. That's not really a criticism, mind you, I think that so far the book has managed to deliver enough for me to consider it a valuable asset for anyone getting into programming for UDK. After this point, the book delves into more specific topics, most of which float atop the Unreal FPS model. The chapter on AI is probably useful, but the rest seems to deviate a fair bit from the needs of someone using UDK to create a game that strays from the standard Unreal Tournament formula. Unfortunate, because that's the area that has the greatest need for reference and documentation.

Actually, I lied - kind of. The GUI section (Chapter 7) is probably rather useful, though the author chose to go the route of Canvas instead of Scaleform. Somewhat understandable, since at least one can assume that the reader will have what they need to work with Canvas, but not necessarily have access to Adobe Flash (or knowledge of ActionScript for that matter). If you're looking to make a GUI that looks remotely professional though, definitely look into Scaleform somewhere else.

In a few instances, I did notice the wording used to be poorly structured, though for the most part it was fairly easy to understand. I also noticed several typos, mostly in the code itself - something that is definitely harder to forgive, as it can easily confuse a reader into making numerous mistakes. I could pick up on them fairly easily, but I feel that such typos could trip up beginners.

If you're just starting to get into UDK and want to start digging at the surface of the world of complexity that lies beneath the hood, I would definitely recommend the UnrealScript Game Programming Cookbook, even if only for the first three chapters. It definitely sets you on the right path and saves you a lot of confusion down the road.

Monday, August 27, 2012

Some Tiling Textures

A couple tileable textures I made this weekend for an environment project I was working on over the past month. I haven't been focusing on it as much as I should, and have steadily been growing to regret marking my first foray into 3D in the past several months in a project of this scale. I'm aiming to put something together in UDK, using modular pieces with (mostly) tiling textures. Then throwing in a few more unique elements. Unfortunately, UDK just decided to start crashing every time I attempt to import something with TC_Normalmap compression (which, surprise! you need for normal maps). Oh well, I probably wasn't going to get it done for the Gnomon Workshop monthly challenge I was aiming for anyways. No big loss.

So I painted some wood panels and some stone bricks. The bricks are going to be used in conjunction with a much less noisy plaster covering, and I'll use alpha maps and a LERP material node to blend seamlessly between the two surfaces.


Wednesday, April 11, 2012

Finally! A look at Carnival


So I'd been holding off on showing off screenshots of Carnival for a while. But now that the Senior Project Fair is over, I may as well show off where it stands. I was going to post a video as well, but I think I'll hold off on that for a bit. At least until I've got some rather major bugs sorted out and a few extra animations and particle effects thrown in.

Be sure to check out Marie's blog as well. She was responsible for all of the character, armour and weapon textures, and definitely bumped our overall visual quality up a couple notches.


 The two trainer screens - currently missing skill descriptions. The icon designs were done by Lee Pakkala, the UI elements and background by Marie Deslauriers, and the two trainers were illustrated by me. I also was responsible for adding the interactivity in Flash with Actionscript 2.0 and connecting it to the Unrealscript side of things.


The gear and abilities loadout screens, just before a player enters a server game. Currently missing weapon/armour descriptions, and more specific details. Icons are dragged across from the table on the right and dropped on slots on the left. Armour and weapons are equipped in real-time on the character preview. The player can also click and drag on the preview area to rotate the model. The armour and weapons were modeled by Lee Pakkala. The character mesh was modeled and textured by Marie Deslauriers, who was also responsible for painting the weapon and armour textures.


Some in-game screenshots. I tried taking these on my own, holding two controllers and hitting the screen capture button as quickly as I could. I would have liked to use our spectator camera to angle the shots more effectively, but unfortunately one of the major bugs we are currently experiencing made that impossible. The environment was modeled and textured by Nick Zou, although I retextured certain pieces (most notably the walls immediately surrounding the arena, and the structures into which the doors are set). Animations were posed by Hana Ameerah, Shahd AlFakhry and Nick Zou. I was responsible for taking those poses, tweaking them to ensure that they communicated their respective actions effectively enough, and also set their timings. Again, HUD UI was designed by Marie Deslauriers and the icons were the work of Lee Pakkala. All of the programming - game mechanics, HUD, networking, as well as the construction of levels, animation trees, particle effects, etc. were handled by me.

Hopefully if I am given the chance to work on a project like this again in the future, I will be able to disperse the programming and game-engine-related responsibilities across more team members, instead of taking them on myself. I would have also certainly liked to have worked on more of the art and asset creation, but unfortunately, I did not have the time.

Sunday, February 19, 2012

Replication of Variables in UDK

I will try to make this as brief as possible. If you're interested in something with a little more depth, I strongly recommend you read through Replicating a Flashlight's State; it isn't very long either, and probably makes my post obsolete, but I felt like presenting my understanding on the matter.

Networking in UDK

Alright, here goes. My first somewhat educational post, and I declare that it shall be on the illusive topic of networking. This will primarily cover the basic issues of creating a server, connecting to that server and also creating a combination between a client and a server. But first, an introduction to the concept of a client and a server.

Thursday, February 2, 2012

UDK, TextureRenderTarget2D, SetExternalTexture() and Scaleform 4

May 18th, 2012 Edit: It appears that the May 2012 release of UDK fixes this issue (reference). Thanks to Steven Webster for letting me know!

Punch UDK in its stupid face!

Perhaps I'm not being clear enough. So a couple weeks ago, I decided to build the user interface for my Senior Project (a UDK based game) using Scaleform 4, a recent addition to Unreal. Up until the November 2011 release, UDK only supported Scaleform 3, which in turn only allowed developers to use ActionScript 2.0 when creating interfaces in Flash. The last time I touched ActionScript 2.0 was when I was in the eleventh grade. I think I made a pong game. So obviously, I was pleased to hear that I could use AS3, which I had learned to a reasonable extent only a few years ago.

Bad move.

Since then, I've been running into issue after issue, and it was really my own fault. I shouldn't have expected such fresh features to be well supported. A lot of major elements are quite broken. For the most part, there have been solid workarounds, but now I've run into something that I cannot avoid.

I've been trying to incorporate a preview window for 3D components for things like the inventory screen, where clicking on an item would load up a rotating view of the object. I found out how to do this, in theory - it involves taking what is essentially a camera (SceneCapture2DActor) and having it render directly to a texture (TextureRenderTarget2D). Then, SetExternalTexture() is used to replace an image texture in the Scaleform UI at runtime. Effectively, you are given a sneak-peak at something rendered from off screen. The technique relies heavily on the notion of dynamic textures, which can be used to create computer screens, water reflections, etc. (Check out these links for more information on Rendering to Texture and Swapping Render Targets into Scaleform UIs).

Unfortunately, where the plan fell through was at the very end - SetExternalTexture(), unfortunately, causes the whole program to crash when used with a TextureRenderTarget2D. I found some complaints about this on the Epic forums, but unfortunately it doesn't seem to be high on the list of priorities. People have been complaining about it since early December at least, and to my dismay, the January 2012 release (which came out today, or very recently) has the same problem.

So, I've decided to bite the bullet and revert to the October 2011 release of UDK, and switch out in favour of AS2. I'm really frustrated, but since I'm more familiar now with a lot of the processes and issues, I should hopefully be able to redo the work I did in the past couple of weeks in much less time. Unfortunately, I have a meeting with my Senior Project advisor on Friday, and I will definitely be falling short of my biweekly goals. Gat dangit.