• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Krohm

Allowing mixed handiness. Or maybe not.

2 posts in this topic

I guess everyone got an idea of what coordinate systems conventions are supposed to work.
[source lang="cpp"]
^ y
| z
| / left handed (D3D9)
| /
| /
+- - - - - - - - - -> x

^ y
|
| right handed (GL, Bullet...)
|
|
+- - - - - - - - - -> x
/
/
/z[/source]

I have a component which encodes hierarchical rigid transforms using right-handed (GL) coordinate system. Problem is I now have an asset which requires the other kind of coordinate system as well (both are required in the same asset). I don't want to upgrade the transform management component to arbitrary transforms because of the redundancy involved and I don't want to have to support scaling as it has non-trivial implications in my system. The goal was to support rigid body transforms only. Albeit negating z is a scale by -1, from a certain point of view, this is ... some kind of odd rigid transform, one that becomes invalid just because the convention chosen has the unfortunate implication of putting z the wrong way.

While supporting this case appears necessary, from a 10,000ft view, what this asset really does (was intended to do) is to encode a generic coordinate system which is still non-scaling, this coordinate system was not intended to render but rather to be passed to scripts and in a certain sense, it got some elegance.
It's worth noticing the accompanying script does not work on this data as a rigid transform or a coordinate system, it rather mangles the three vectors somewhat independently, yet it appeared natural to try to abuse the rigid transform system to encode this information.

[b]I'm inclined to add a flag to just negate z on need so this can become supported.[/b]
However, I'm rather torn on what's really happening. The convention is that only rigid transforms would be supported, and transforms are currently right handed and this does not qualify as a transform, albeit having an apparent "rigid" feel. After closer scrutiny, there [i]might[/i] be a way to work around this issue (by encoding 4 points and extracting vectors, let's call this [i]point system[/i]) but I had to agree this feels quite more cumbersome to handle (not to mention it requires quite some work as this code path is currently not implemented).

So in general, I feel this bitter taste of "something going bad" but I cannot quite objectively justify it. On the other hand, this asset is invalid... albeit the notion is useful.

Do you think I should allow mixed handiness or request the asset (and script) to be reworked using the point system?
0

Share this post


Link to post
Share on other sites
Yes, this is exactly the point.
I have, at the very least, a [b]documentation problem[/b], the [i]current wording does not mention handiness[/i] (not near there at least) and encourages in thinking about independent vectors being packed into a matrix with no scaling nor shear rather than a rigid transform. And if I would encode them as a 3x3 matrix instead of a quaternion, it would likely work as expected as far as the core features (not the scripts) are concerned. Moving the axis in the correct place would not be a problem but I have no idea on how to rewrite the documentation to avoid that from happening especially as nobody ever wanted to encode a transform for real but pack three vectors instead.
It is clear the system was abused for good, it really appeared to slip through the cracks.

I have been thinking at the options I have including roughly estimating the work required. I cannot really see a way to reliably pour handiness information in the scripts without turning them in a real mess. So adding a bit to swap the axis would just move the bug to another piece of code.

[b]Fixing the asset[/b] appears to be the only viable way. Problem is there's a very specific reason for which the Z axis has been flipped. I could [u][b]{1}[/b] modify the script so I include a data-specific fix[/u] (pull out matrix and multiply z *= -1 if this transform point is [i]PROBLEMATIC_TRANSFORM_NAME[/i]). It sounds somewhat ugly but after all the script is already data dependent when polling for a specific resource name and transform name so perhaps this is not as bad as it sounds. Invalid transforms will have to be rejected by the filter, as there's no way to make them work nor to fix them automatically.
Transitioning to [u][b]{2}[/b] the "point system" would allow to encode those vectors[/u]; which are really named arbitrary parameters. The script would need to be modified as well, more or less on the same magnitude. Except the code implementing the "point system" is not there but with some re-factoring I should be able to get it working at a fairly reduced cost.

Thank you for your quick reply. I think I should probably go for {2}, this thing is not a transform and should not go through the transform system. I'm very tempted to go the quick {1} route but I'm afraid I have to bite the bullet.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0