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

Map editor

5 posts in this topic

Hello,

 

I'm thinking about creating my own map editor, with my own saving to file code etc. My goal is something like this : http://www.youtube.com/watch?v=_Wpc1c7syTA .

 

I'll be using tiles, as a tile could be the size 70x30 (not sure yet). Since I need way more horizontal lenght, cause I will only use it for platformers. I wonder how it is possible that he can create tiles on every place on the map. Is he using tiles, and have the picture of the tile start at given coordinates? Or is this a right way to do it?

 

So instead of a tile having 1 picture, it now has a picture at a given coordinate inside the tile.

 

Grz

1

Share this post


Link to post
Share on other sites

Well there are many ways to do this. You can break down your map into a grid and load only cells that are visible. Each cell would have a list of picture IDs, their coordinates and any other special parameters such as portals/fire/etc... Then it simply becomes a matter of fetching a handle to the actual picture from the loaded ID. 

0

Share this post


Link to post
Share on other sites

He is definetly not using tiles because game object have no alignent in the scene. You're probably confused between 'tile world representation' and 'tiled textures'.

 

tile world representation - that means that he is using tiles to place object. each object lies on a tile. 

 

tiled textures - one texture can contain one ore more images. each image can represent different object(or some part of an object). Each different image on the texture is called tile. Later in code a tile is defined with structure that looks like this { textureName: 'example-grass-tiles.some_extension, tileTopLeftPoint (0,0), tileBottomRightPoint(50, 50) ; }.

 

So when he displays a tile he is writing something like this : 

Draw(objectPosition, myTile.texture, myTileTopLeftPoint, myTileBottomRightPoint); //a tile defined by myTile variable is going to be drawn at point objectPosition);

1

Share this post


Link to post
Share on other sites

He is definetly not using tiles because game object have no alignent in the scene.

I agree he's not using tiles in the general sense, but I do think they have some sort of alignment. This is so from the fact that all blocks are fitting properly with each other.

They're most likely block assets of varied sizes that were all painted under the same grid.

 

To create those assets, the artist sets up in his painting program an infinite grid with a spacing of 32x32 pixels, for example, and draws freehand but under that reference grid and with some game-design established constraints, such as "platform heights that are two grid cells high", "slopes that always finish in exact cells" etc.

219p8wz.jpg

 

On the editor, you just need to snap these blocks under a grid of the same size as the reference one used by the artist (in this case, that grid of 32x32 spacing), so they fit together.

Edited by Kryzon
0

Share this post


Link to post
Share on other sites

He is definetly not using tiles because game object have no alignent in the scene. You're probably confused between 'tile world representation' and 'tiled textures'.

 

tile world representation - that means that he is using tiles to place object. each object lies on a tile. 

 

tiled textures - one texture can contain one ore more images. each image can represent different object(or some part of an object). Each different image on the texture is called tile. Later in code a tile is defined with structure that looks like this { textureName: 'example-grass-tiles.some_extension, tileTopLeftPoint (0,0), tileBottomRightPoint(50, 50) ; }.

 

So when he displays a tile he is writing something like this : 

Draw(objectPosition, myTile.texture, myTileTopLeftPoint, myTileBottomRightPoint); //a tile defined by myTile variable is going to be drawn at point objectPosition);

 

ok thanks guys. So if I understand everything: My map class, will have an array with all the tiled textures, like a square in the map. In this square i will code my tiles. But there could be overlapping between these squares right?

 

In code

class Tile // ur struct
{
    POINT leftTop, RightTop; // the x,y from the square (tiled texture)
}

class TiledTexture
{
     List<Tile> m_currentTiles; // all tiles from this square
}

class Map
{
    const int texture_size = 150; // so a square is 150x150, for example
    TiledTexture[][] m_textures;
}

class Camera
{
     // checks which tiled textures are visible and draws those.
}

Is it also a good idea, that when a tiled texture IS visible, instead of drawing all textures one by one, make one big texture of it and draw that to the screen?

0

Share this post


Link to post
Share on other sites

You need additional file to express where tiles are locaded.

you can use something simple like

<tile_name> <texture_name> <TopLeftCoords> <BottomRigthCoords> or

<tile_name> <texture_name> <TopLeftCoords> <WidthAndHeight> or watherver

 

Example file :

 

myTileDesk.txt :

grass1 grass_tex.bmp 0 0     50 50

grass2 grass_tex.bmp 50 0    100 50

rock1  rock_tex.bmp 0 0       50 50

 

 

Also if you prefer you can use different file that describes tiles for each texture it is up to you

 

 

Later in code:

 

Tile

{

std::string name;

Texture* pTexture;

RECT coords;
}

 

class MyTileManager
{

 

public :

 

Tile* GetTileByName(char* tileName);

 

   private:

vector<Texture> textures;

vector<Tile> tiles;

 

}

 

and probably later

 

DrawTile(Tile*, xPos, yPos);

 

Or some similar structure

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