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

Orthogonal projection of 2D map.

13 posts in this topic

Hi folks.
I am using SDL for my (first)2D game attempt, I am not using OpenGL, just SDL_FillRect and SDL_BlitSurface. For my 2D game I asked a lot of people and different people recommended different things, one side recommended to stick with SDL's BlitSurface, others recommended me to do it on OpenGL even if it was 2D. I think I will stick with just SDL for now, unless it is necessary. OpenGL is too hard for me at this point, especially when it requires more code to do the same thing I do with SDL with less functions.

Anyway, what I am trying to do is make my view/projection/map/whatever orthogonal, i.e I want the map to look like this game [url="http://fortune3.to/game/"]http://fortune3.to/game/[/url] where it looks as if the map and character are viewed under an angle. Another game like that is [url="https://s3.amazonaws.com/ld48/ld22/index.html"]https://s3.amazonaws...ld22/index.html[/url]. My map is tile-based right now, I use these sheets [url="http://i.imgur.com/4cURq.png."]http://i.imgur.com/4cURq.png.[/url]
The red,green and..not sure what the other color is, square are what I walk on, the other things are the walls.

For my character I use these [url="http://i.imgur.com/sUAE4.png"]http://i.imgur.com/sUAE4.png[/url] Nothing fancy, at all. I just found them randomly and google, and decided to use them.
When you mash that, it looks like this [url="http://i.imgur.com/LlPCt.png."]http://i.imgur.com/LlPCt.png.[/url] The tiles it feels as if I am looking from above, but the character as if I am looking from the side. What I want it to look like is the games I showed you, not the same textures obviously, but I hope you got the point. But I have no idea whether a code change is needed, or the sprites need to be changed, or both.

Now, let me say this, the programming language I am using is C, because I have over a year experience with it, whereas C++ or say C# I have none, plus I don't like them, so using some game library/game engine which is written in C++ is not on my agenda(It's possible to mix C and C++, but you get why I don't want to use it). Actually, I want to write my own engine, just for myself of course, so I can use it for other projects. If possible, spare me the talk how C++ is better [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]. Edited by farmdve
0

Share this post


Link to post
Share on other sites
It might be useful if you could post a screenshot or two of the games you are trying to imitate. The first link wants me to install Java which I won't do, and the second link is broken.
0

Share this post


Link to post
Share on other sites
You are the second person to interpret it differently. Some say it's Axonometric, others tell me it's Orthogonal. Anyway, you can see the difference here http://gamedev.stackexchange.com/questions/22277/difference-between-orthogonal-map-and-isometric-map

So definitely orthogonal.
0

Share this post


Link to post
Share on other sites
Well, these http://i.imgur.com/ZZ5fx.jpg http://i.imgur.com/EfZY3.jpg http://i.imgur.com/9zTuH.png

The textures are not the same, but to me it looks like the map or something is being viewed under an angle. Hopefully those clear it up.
But I have no idea if the textures or the code or both need to be changed. It would also be nice if I can be pointed to to a code example, if it's not too much to ask :) Edited by farmdve
0

Share this post


Link to post
Share on other sites
Ah, that. Yeah, that's not really any consistent projection. That type of map typically just implements a basic layered square tile map and draws it back-to-front using an orthographic projection matrix. No rotation around the Z-axis, no special coding required at all. Any basic layered tile map tutorial should tell you what you need to know. Those types of games typically fake the camera angle simply by the way the sprite graphics are drawn, rather than through positioning of an in-game camera or any kind of tricky coding.
0

Share this post


Link to post
Share on other sites
[quote name='farmdve' timestamp='1355753606' post='5011699']
Would you mind pointing me to such a tutorial?
[/quote]

It would have to be an art-style tutorial for how to draw pixel sprite graphics.
From the gamecodes perspective, its just square 2D sprites in a tilemap, without any projection at all. Edited by Olof Hedman
0

Share this post


Link to post
Share on other sites
Considering there are a lot of open source 2D games, and artists sharing their work, I've yet(whole week) to find tiles/sprites that are drawn the way I explained above. I am not an artist, I am not blessed with much accuracy and trust me, I can barely draw a 2D head, let alone whole tiles and sprites the way I want them to.

The character sprites I've found so far seem to have an animation for moving right, but not left. Edited by farmdve
0

Share this post


Link to post
Share on other sites
The sprites you have probably assumed the game would 'flip' the sprites horizontally at runtime. Left is can be seen as the same as right, just mirror image opposites. Another option is to flip the sprites in an image editor. Even MS Paint has a flip option.
0

Share this post


Link to post
Share on other sites
I tried flipping the image with GIMP and pasting the flipped images on to the sprite sheet. But something is wrong. When the object moves right, the movement is jerky. When it moves left, it's smooth. Edited by farmdve
0

Share this post


Link to post
Share on other sites
Are you sure it is an exact mirror of the original? If you don't align the images in the spritesheet an exact distance (usually) then the actual texture will be slightly bigger than the sum of all the animation frames, meaning the frame width/height will be calculated incorrectly Edited by dAND3h
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