Showing posts with label Technical Logs. Show all posts
Showing posts with label Technical Logs. Show all posts

Saturday, March 31, 2007

HANDLING THUMBSTICKS' INPUT VALUES

Remember Shawn's Trilogy? As a bonus, he has posted a handy tip for hooking the values returned by thumbsticks to your game's physics calculations.

From Shawn's post: "... Good analog control has a huge impact on the feel of a game, and massaging your input values can do wonders to make things feel more controllable and responsive ...".

Read on!

Wednesday, March 28, 2007

THE "... SUCK" TRILOGY

Shawn Hargreaves has published a series of three posts declaring war to keyboards, gamepads and those handy little friends: computer mice!

He mentions the awful truth of these peripherals as far as game programming is concerned.

From Shawn's posts: "... Gamepads, like keyboards, are not perfect. They are designed to be cheap, sturdy, and nice to hold: accuracy comes second ...".

You can find the installments here:

The posts give useful advice on how to deal with keyboards and gamepads as well as explains how XNA makes our lives easier for reading thumbsticks' absolute positions.

Enjoy!

Monday, March 26, 2007

TIPS: "SOFTWARE EFFICIENCY AND OPTIMIZATION - PART 2"

The awaited second part of the series is now available on "Advice From the Swamp" blog.

This time Thomas explains the initial How To's for benchmarking your algorithms and methods -and includes two source code samples.

From Thomas post: "... If benchmarking shows your algorithm has problems without implementation optimizations, you are probably better off with a different algorithm. Which isn't to say that these sorts of optimizations aren't still useful. But it's better to do these selectively, once you have your code implemented and have profiled it to find specific problem areas. We'll look at how to use a profiler to find these problem areas next week, in Part 3 ...".

Cannot wait for part 3 ... :)

Saturday, March 24, 2007

"SOME CODE IS MORE EQUAL THAN OTHERS"

No, it's not Confusio ... it's Shawn Hargreaves striking back on the topic of optimization.

In his latest post, Shawn talks about how to priorize and optimize things when dealing with different kind of programming, plus he opens the x-files of his life and reveals some dirty secrets of his past.

From Shawn's post: "... This is one of the reasons I like having a content pipeline that separates build time data processing from my runtime game code. The more computations I can move from my game into a custom content processor, the less product code I have to write. Processors are internal utilities that only ever have to run on my computer, so I can get away with all kinds of shortcuts that would never be acceptable if I was doing this processing as part of my shipping game code. ...".

I agree. What is more, for those of you who may think that the content processor could turn out to obstruct the creation of a game editor (say, for the PC platform) by using the XNA Framework, I'm afraid that you are forgeting something: "MS Build" console application and the "XNA Content Builder Application" comes to the rescue when you need to import content "on-the-fly" (unless of course you decide to make your own "dynamic" loader).

Cheers!

Friday, March 23, 2007

NEW XNA BLOG: "ADVICE FROM THE SWAMP"

There's a new blogger in the XNA Community: Thomas Aylesworth (you can also see screenshots and or download his game: "Space Invasion").

And he's opened with a great subject ...one of the topics that Shawn likes most :) ... Software Efficiency and Optimization (Part 1).

As you an see this is the first installment of a series so stay tuned to his blog.

Cheers!

AN AD-HOC 3D PRIMER

Things have been a bit quiet in the XNA world lately -like a calm before the storm, so I decided to post some useful links for those who want to do the first steps into 3D and thus, need to understand some basic concepts.

First things first, mathematical concepts: undertanding vectors and matrices. You will learn how to operate with both as well as understand some relevant concepts like the difference between dot and cross products. Of course, further separated reads can be found on vectors and matrices.

Assuming that you've got that clear, you can then move onto the next concept: coordinate systems. What's the difference between local and world coordinates? What's tangent space? You'll get a first glimpse to these concepts, dont' worry.

Now enters transformation matrices. So, what's a transformation matrix? You will learn that in order to get the desired and or correct 3D projection, the order how you operate with matrices is the key.

Ok, let's take a larger step here, ... this topic is not particularly referred to 3D only, but it comes very handy when you want to build a game engine and start dealing with parent and children objects moving along together and thus, with matrices concatenation: scene-graph.

Implementing a scenegraph varies on a per-project basis, but if you understand the basic concepts you will do well, even if you don't (want to) call it a scene-graph in your source code or want to avoid its whole implementation but still preserve its functionality.

Well, as you can see, this is just an ad-hoc primer, built by just browsing the web with the help of search engines, so if you don't have money to buy a good book on the subject you will find that Internet is a great place to find the information you need if you're patient while searching.

Have a nice read ...

Thursday, March 22, 2007

NVIDIA GDC'07 PRESENTATIONS AVAILABLE FOR DOWNLOAD

nVidia has released for public access the slides presented during GDC 2007, which cover among other things: rendering tips and tricks, Direct3D 10 topics, and a preview of the features included in the long awaited FX Composer 2.

The slides are available in PDF files and can be found here.

By the way, for those that heard some rumors about FX Composer 2 coming out next month, the slides are clear, and I quote:

  • Public Beta, early April 2007
  • Final Release, early May 2007
Cheers!

Sunday, March 18, 2007

KYLE SCHOUVILLER ON 2D COLLISION DETECTION

Kyle has posted a nice read with tips useful to face the task of inplementing Collision Detection in Two Dimensions.

From Kyle's post: "... Use the Separating Axis Theorem. Use a space-division scheme, like a Quadtree. Use multiple levels of collision detection to avoid unnecessary testing. Use a common bounding structure for all objects so they can interact generically. Those are things I learned when I did it. ...".

Stay tuned!

Saturday, March 17, 2007

ARE 'FOREACH' LOOPS THAT BAD FOR YOUR GAME?

Lately, many developers have been asking about any performance issues that the use of "Foreach" loops could bring to their XNA-based games, both in the PC and XBox360 platforms.

As a result of all those questions, Cornflower Blue decided to carry out its own research with the help of the "CLR Profiler" tool.

From Eli's post: "... I wanted to get the whole story. Plus, this was an ideal reason to learn to use the Windows and Xbox 360 CLR profiling tools, which I've put off doing for some time. So, I figured I'd do just that: do a foreach loop over a bunch of collections, use the profilers to see if I'm making garbage, and hopefully we'd all learn something in the process. ...".

It's a nice read, but most important, the results Eli's obtained are quite interesting, so go ahead, pay a visit to "Foreach, Garbage, and the CLR Profiler" and read on.

Enjoy!

Friday, March 16, 2007

THE NIGHTMARE OF PROGRAMERS: DOCUMENTING SOURCE CODE

Let's face it! There are some tasks that most programers avoid doing and leave them as a "sticky" ToDo entry, and one of them is to document all the software elements in the source code they are working on: classes, structs, properties, operations/methods, etc.

Why can't any programer take the proper time to execute this task? The quick answer: because it's too boring ...

... and please bear in mind that we are leaving out any references to other aspects of the task, like how hard is to find common rules to follow (and learn them by heart) and, of course, writting the proper words or explanation so that any person (including yourself at a later time) can understand what is going on with that particular piece of code.

Well, exactly a week ago Eric ("TehOne") and I exchanged a couple of messages about tools that make your life easier when you want to document source code (by the way, having read the code of his mouse component, one realizes the great benefits of properly commenting source code).

There used to be an open project called "nDoc" (I bet you know it) which never reached a beta stage for v2 (which would support the whole .NET Framework 2, once released the final build).

Unfortunately, the project was abandoned on the alpha stage. But luckily, Microsoft came to the rescue with "Sandcastle": a console application that builds documentation from the xml files that the Visual Studio IDE generates by request (even in the express editions).

"Console application"? Yes, you've read it. And I know what you're thinking: "Why things have to be so complicated?". Well, to answer that let me tell you that there exists some open GUI projects that will ease the task, being -in my honest opinion- one of the most useful and easy-to-use applications: the "SandCastle Help File Builder".

The beauty of it is that it really works and does a great job with any XNA-based programs, but there are some things that you must know though:

  • The process verifies any dependencies for the assemblies you want to document, so you have to specify whether you want to include the documents of these dependencies in the final help file or not. In case of the latter, you have to manually add the assemblies to the dependencies' collection in the GUI.
  • Sometimes, when you want to open the "Namespaces" form -so as to tell the GUI which namespaces must be documented and which ones must not - you may find that that an exception is thrown by the application and not all the namespace or none are listed. If that is the case, you can edit with the notepad the project file (".shbf"), adding the missing namespaces:

<namespaceSummaries>
<namespaceSummaryItem name="NamespaceRoot.MyNamespace1" isDocumented="true">This is an example.</namespaceSummaryItem>
<namespaceSummaryItem name="NamespaceRoot.MyNamespace2" isDocumented="false" />
...
</namespaceSummaries>

Now, you may say "Ok, but I still have to type the whole comments, explanations and links to all those "see" and "seealso" references (like, say, complete namespaces)" in VS IDE. Right. But there's exist an add-on for Visual Studio that -even though it does not miracles in some cases- makes the task a lot easier: "GhostDoc". I must admit that never used this add-on, but for what I can see and read in this site it seems to be a great tool. However, it does not support express editions ... :(

To sum up, take your time to comment the code, find the method that suits you, but don't leave the task as an "never-ending" ToDo entry; just believe me you won't regret it.

Take my case for instance, it took me two days to properly comment the source code of my Warm-Up Challenge entry! (And yes, I'm still working on it -on my sparetime- even though the challenge is over ... Why? Becuse it helps me learn and implement my-own "best practices" on designing and implementing a game with XNA -either for the main compo or any other compo to come). And by "properly" I mean the way I want to see the comments on the final documentation.

So remember: do as I say, not as I do ... or did, actually ... ;)

BTW, if someone happens to know any program like GhostDoc that works with VS Express editions please drop a comment (and or message to my email address). Ditto for any free application/add-on that helps building Design Class Diagrams of .NET applications.

'till later.

Friday, March 09, 2007

MOUSE2D GAME COMPONENT FROM TEHONE.COM

TehOne.com has published a mouse component for XNA.

From TehOne's post: "Here is my Mouse2D DrawableGameComponent. I started out just wanting to be able to put a custom Mouse pointer/cursor on the screen instead of the windows mouse. From there the code just seemed to keep evolving more and more. After I got my custom pointer on the screen, I wanted to then place a Texture2D where it clicked (this was mostly for debugging etc, but I think turned out to be useful for other things). I could see this feature being used in map editors maybe, or something where you want to give the user the ability to design what they see on the screen."

You can download the source code and or a demo game, and check the online documentation ... and please, don't forget to read the license.

"As always, I would really appreciate some feeback on this. I'm sure people can make use of this code (especially beginers). And I'm even more sure that it can be improved with input from others (especially those with more experience then me)."

Let's give the guy some feedback.

Tuesday, March 06, 2007

NEED OBFUSCATOR FOR .NET? - PART 2

Remember this post?

Well, on XNA GSE's forums there's a new thread -regarding the same matter- where Jim Perry has posted a very useful link to a site with a list of available obfuscators for .NET (as well as discontinued ones).

The beauty of the site is that for each obfuscator listed, you will also know which versions of the .Net framework it works with (included the compact framework), whether there's a free version to download, when it was last updated, the vendor, etc.

Hope it helps, bye!

[BTW, I have tried to find a comparison chart in the Internet (independent from any vendor) with no success so far ... :( ]

Saturday, March 03, 2007

XNA & WINFORM

Ziggy has published a tutorial (sample included) that shows how to combine the XNA Framework with WinForm's elements.

From Ziggy's post: "In this example I have created a simple application that creates an XNA Device object and renders a triangle on the screen. This sample supports screen resizing and uses a scroll bar to rotate the triangle around in a circle."

Nice one!

[For those that want to dig into this subject, don't forget to check this post by Shawn Hargreaves on the matter].

THE IMPORTANCE OF TRANSITIONS

Shawn Hargreaves has published a nice post about the importance of transitions.

From Shawn's post: "... While I was writing the menu system, the lead artist, a grizzled young man named Johnny Christmas, gave me a piece of advice I never forgot. "Listen here, young lad", quoth he: "the secret to making a game feel polished and professional lies in the transitions ...".

Stay tune to Shawn's blog for upcoming articles on the matter.

Now, that's it! It's late and I'm tired soooo ... hoooawmmn ... I need to sle .. ep, can .. nnot ... re..each .... my ...bb.. ed ... zzz ... zzz ... zzz ...

RPG ZERO: LEVEL SEGMENT'S NEW PALETTE AND BADGUYS

New update available for the "RPG Zero" series.

Man, the eyecandy included in this game -which is under development- is quite amazing.

You can read what's going on with this project here (as well as watch a demo video of the cave).

Cannot wait for a demo build!

Wednesday, February 28, 2007

"THEZBUFFER" IS NOT OVER!

"TheZBuffer is not to be considered dead until I say so", the Zman said. Thus, this is throwing away any speculation over the IRC.

Not a believer? Just browse to TheZBuffer's site and read all the avalanch of new posts published these last days.

There's an interesting read about the future of managed code and DirectX, plus a whole summary of posts, entries and articles regarding threading in games.

Also you may find a link to a discussion of Home Brew Platforms at Pensive Gamer - XNA's competition ("Barriers and Predictions").

Happy read!

Tuesday, February 27, 2007

DOES BENNY REST SOMETIMES?

Wow, man, Benjamin Nitschke's on fire!

He's recently published a very long but yet helpful post about "Skeletal Bone Animation and Skinning with Collada Models in XNA". I wonder what happened with that "... The blog posts will not be as long as before ..." ;)

Is that it? Heck no!

Benny has recently announced that he will be attending this year GDC (March 5-9, San Francisco) and will be joining XNA's "Dream Team" so as to face the following superhuman XNA challenge: build a game at the conference!

Benny's idea: a Zelda-like multiplayer RPG. In 3-4 days? Yeap. I have only one question: are you out of your mind?!!! ... :)

Go Benny go!

Saturday, February 24, 2007

RPG ZERO: GETTING BETTER AND BETTER

Gamey Little Hacker had promissed to post comments related to development of 'RPG Zero'. Remember?

Well, according to this new post things are going better and better as you can see in this awesome video:

Ok, no skeleton-based animations yet. Who cares? The eye-candy is there, the gameplay seems really catchy and it is data-driven.

So GLH, just keep up the good work!

UPDATE: 'COLLISION DETECTION FOR 3D MODELS'

Lately, for a little while, things had gone a bit quite in Sharky's blog.

Well, silence is now gone and a new update of the source code of the three-part tutorial is available here.

What's new: optimizations, basically. For instance, you can pass the ModelMesh’s original BoundingSphere to run a proximity test, in order to avoid checks on every frame for the rest of bounding spheres.

Nice Sharky!

Wednesday, February 21, 2007

BENJAMIN NITSCHKE'S NEW BLOG

Benny's back! Yeap, it's true ... he has given his blog a new look plus he plans to post more often.

From his blog: "Well, I was posting less and less on this blog and this gonna change now. From now on I will try to post often, maybe even daily. The blog posts will not be as long as before, I will just talk about what's on my mind each day. Initially this blog was started as a little diary for me and I will return to that initial idea."

In addition to his projects, Benjamin plans to comment on FxCop stuff, CgFX, using Collada in XNA, and so on.

Welcome back!