• 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
greenpig83

Need algorith to rotate isometric image sprite !

10 posts in this topic

Hi I'm working with an isometric project. That require me, each unit animation need 8 direction (5 for flipping : E flip to W, NE flip to WE, SE flip to SW!). 

I've found many resource on net that are isometric, but not all 8 direction, some 6 direction (hexa tile game), some only 4...! 

So I think that because its isometric view, we can base on 1 direction and rotate to its closest direction (about 30 degree rotate)!  Of course it will not look nice (because we reverse engine it), but better than unit move to West, but his heads and legs heading NW. 

 

Here is an example of the dragon from MM8! 

This frame it's heading SE (south-East). 

m492Fa1_zps75c1b023.png

 

And this one is what I want to achive, heading E (East)

m492Fa2_zps59c1ab3a.png

 

Normally we lack the East,West direction because in isometric world! But just 1 is enough, because East can be flipped into West! North cant flipped to South...

Thanks! I think I can write my own this but it will take time and need time to make it look nice, so if there are already a solution I dont want to reinvent the wheel!

Edited by greenpig83
0

Share this post


Link to post
Share on other sites

I can't think of any real way to perform this rotation on the sprite itself, at least not that wouldn't just look like ass. Typically, you do the rotation when you create the sprite frames during development. For example, if the sprites are created from 3D models you simply set the camera, render, spin the camera, render, and so forth until all facing directions are rendered.

 

Note that using 5 frames and mirroring some of them does work, technically. However, it is a bit of a hack that assumes your characters are symmetrical. ie, look at older Zelda games, and note in particular how Link's sword and shield switch hands when he reverses direction, due to the mirroring. If you pre-render your sprites with accurate lighting, the lighting won't be accurate if you use mirroring either. If you really want it to look nice, I'd avoid mirroring unless hardware constraints force you to.

Of course I'm using mostly 5 frames and mirroring for my units. Because it saves quite alot (texture memory) and my units are quite small so it does look quite OK. I dont have the 3d mesh so I cant create the dir I want, and I cant afford real artist for my hobby project! The sprites for my project are mostly found on net, I'm not good enough to draw just 1 sad.png I found some very great sprites for my project, but it lacks East,West dir, and to see the cool units running with wrong heading like that, it make me sad sad.png

 

In theory, I think we can do this, because of isometric view, with some matrix for rotating ! Because the rotate angle (30-45 degree) is small and everything is fixed!

Edited by greenpig83
0

Share this post


Link to post
Share on other sites

You think you can take a 2D rendering of a 3D figure and compute a rendering from a different camera angle? How do you think that would work? Do you at least have depth information in the original image?

2

Share this post


Link to post
Share on other sites

You think you can take a 2D rendering of a 3D figure and compute a rendering from a different camera angle? How do you think that would work? Do you at least have depth information in the original image?

Of course it cant be perfect because we doing reverse here. Just as nice as possible. 

Let see this image : he's runing South_East (Down-Right) ! His spear heading Down-Right. I want to rotate he heading East. It will be about 30 degree! So first we will need to rotate he up, center at his body for example, so that his spear will looking East!

And it will need at least 2 rotation, and some interpolation because of hidden pixels! But as I said, the purpose is looking as good as possible not to recreate the 3d Model!

 

SO I dont want to spend time testing this. I hope someone did this before, so I can use his solution. 

running_zps553258a4.png

Edited by greenpig83
0

Share this post


Link to post
Share on other sites

Just did a little test with a simple solution. Not rotate the sprite, but move the pixel up! It will need a bit stretch but because the angle is small so it still look OK. 

I will optimize it later. When it run in an animation, it will look better !

 

horse_zpsbbce4221.png

0

Share this post


Link to post
Share on other sites

You are trying to generate a side view projection (i.e. east / west facing) from an isometric projection (i.e. south west / south east) projection?  This wont look good with complex objects - try it with your dragon instead of the horse.  There is just too much Z - axis information hidden in the rendered 2D sprite.  I'll admit though that horse example does look ok, if it is only to be used as part of an animation, and not a final state.

0

Share this post


Link to post
Share on other sites

Hi. what I had to do in my 2d rts was take the image of each direction and use that. it sux big time to do.

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