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

How do i make a level with tiles?

14 posts in this topic

Hi, I am using C++ and SFML2.0 and c++ Visual 2010. I want to make a level out of tiles but do not know how to. So far this is what I have done. I got 1 tile type and i am putting it together in photoshop to make a map. I then separate each string of tiles and put them manually into the code. So for one map i will be making over 30 Sprites and turn them into blocks and draw them out, then i will have to make boundaries for them separately. This takes a very long time and i am sure that there is a much faster way for example using xml but i don't know how to put that into the code. If you need the code just ask and i will post. Also just to clarify i dont want to make a tile engine which automatically makes them like minecraft. I want to make a puzzle map like bloody trapland so I will have to place them myself. Please help, urgent.
0

Share this post


Link to post
Share on other sites
Have a look at [url="http://www.gamedev.net/topic/622801-sfml-tile-maps/"]http://www.gamedev.net/topic/622801-sfml-tile-maps/[/url]. If you want specific answers like code, then you will have to post your program.
1

Share this post


Link to post
Share on other sites
I'd recommend reading this thread also, where I've explained the basic idea: [size=2](At the risk of turning this forum into someplace that just responds with links)[/size]
[url="http://www.gamedev.net/topic/629742-2d-overhead-tiling-engine/page__p__4970743#entry4970743"]http://www.gamedev.net/topic/629742-2d-overhead-tiling-engine/page__p__4970743#entry4970743[/url]

If neither of these links help you, if you ask specifically what part you are having difficulty with, we're happy to help.
0

Share this post


Link to post
Share on other sites
i have already seen [url="http://www.gamedev.net/topic/622801-sfml-tile-maps/"]http://www.gamedev.n...sfml-tile-maps/[/url] and don't want this. i recently made a map using "tiled map creator" but it is only one layer will i need more than one? if so why(just so i know when to do it)? I am completely new also i am using SFML 2.0 not 1.6. The 2nd post helped a bit. Also just some background info. I am 16 and started learning c++ in july and have finished a book and online tutorials, i will still have to go over it to understand it better. I am learning at home as i am in school still doing A-Levels if you know what that is. I am completely new to SFML but i am picking it up quite quickly. This is just a little project that im doing so i can build a strong and solid base before i go to uni in 2 years time. plan to go into game development. sorry got a bit sidetracked.

so once again i have built a map using "Tiled map creator" i am just using one tile but has one layer , i dont know if i need more, if so tell me. i want to know how i can load that map which is in a weird format into my game using sfml 2.0. Edited by rishan1996
0

Share this post


Link to post
Share on other sites
Whether you need more layers or not depends on how you are designing your own game.
Maybe [url="http://en.sfml-dev.org/forums/index.php?topic=3023.0"]this[/url] will help you load the maps. Scroll down to the fourth post or so, and there's a SFML 2.0 compatible version.
0

Share this post


Link to post
Share on other sites
i tried that before but did not understand how to install tinyxml and didnt understand it much. i am talking about the level.cpp and .h i will take a look again and try to understand it but on the weekend i dont have that much free time.
0

Share this post


Link to post
Share on other sites
Well, sometimes you run into walls. That's the time when you need to figure out how to get around or over the wall, instead of turning around and leaving thinking it a dead end.
If you couldn't figure out how to install tinyxml, that's the time to keep on trying to figure it out until you succeed, breaking each problem into tiny pieces and researching online how to get over that specific problem, step by step, until you succeed. If a specific problem gives you trouble, and after you've researched it and still can't find a solution, then post on a forums asking for help with that specific step (and mentioning what you've already tried).

I've never used tinyxml personally, but most libraries you don't "install", you download and then link to.

There will always be walls in your way; the skill you need to learn is how to get over them.
1

Share this post


Link to post
Share on other sites
Yes that was what i was thinking last night, as that will be a valuable skill and a great skill for a game developer/programmer.
0

Share this post


Link to post
Share on other sites
Hi,

Have you looked at Tiled Map editor? Its a free tile-based map editor with open-source. It has integration via xml and .Json I believe.

[url="http://www.mapeditor.org/"]http://www.mapeditor.org/[/url]

Not sure if it will help for your game though.
1

Share this post


Link to post
Share on other sites
Have you thought about a class or struct consisting of character arrays containing numeric letters to determine which tile to be used in conjuction with a function call to a scene renderer?

What I would do is create a class for the tiles, create a class for the scene renderer, and pass the appropriate tile/tiles as many times as you would like by simply sending an argument of which tile, how many tiles, their positions, to the scene renderer which then draws them on to the screen when necessary, and deletes the garbage(memory)needed when the tiles are offscreen or not shown, etc.

I'd say that SDL(SimpleDirect Media Layer)is a pretty easy library for blitting images to a window.

In SDL you can accomplish an image to the screen as easy as:

[CODE]
typedef SDL_Surface * LOAD;
LOAD Screen = SDL_SetVideoMode(800, 600, 32, SDL_FULLSCREEN);
LOAD PlayerImage = "IMAGE.jpg";
SDL_BlitSurface(PlayerImage, NULL, NULL, Screen);
SDL_Flip(Screen);
SDL_Delay(3000);
[/CODE]

You can also add some more data to maybe flag certain tile types as "solid" so the playable character or enemy will not walk over or "through" it. Edited by Pointer2APointer
0

Share this post


Link to post
Share on other sites
Thanks guys i have found a way to use tiled map editor in a c++ program it was a precreated class file and header file and im using that. sdl does seam easier, what is the difference between sdl and sfml.
0

Share this post


Link to post
Share on other sites
I agree.

I was just simply suggesting my opinion on SDL.

However, the goal of accomplishing tile editing and use in a game wouldn't make a difference between SDL and SFML.

To succeed in game programming you have to sometimes make your own way for things to get done from the ground up.

Like some others, I think game engines are a waste. Simple 2-D applicable game programming doesn't need any special libraries or such for the aid of game development process other than one to supply higher-level access to graphics/windows(which is pretty much all I use SDL for).

I write all of my game's features, I/O, graphics, sounds, etc. from my own native coding, not external engines.

Point is, I'd recommend you use what works best, and make sure you integrate things on your own rather than just using pre-existing code to handle the majority of the tasks for you. The more you learn, the more power you have over programming.
1

Share this post


Link to post
Share on other sites
Yeah i know now how to intergrate the tiled maps now just asked for difference to make sure i picked the right language to start with and to use in the futer for programming. Also for future reference what would you suggest i use for making 3d games? could i still use sfml or will that be too difficult also i heard of Unreal Dev Kit and heard that borderlands used it but when i used it, it wasnt much programming with c++ at all it was just making a map much easier without me inputing code which i want to.
0

Share this post


Link to post
Share on other sites
SFML can be used with OpenGL. SFML and OpenGL are APIs.

Unreal Engine is a game engine, which is abstracted to a higher level.
I've never used Unreal Engine personally, but it's certainly more than just a level editor. You were probably just using that tool... but alot of the Unreal Engine logic is handled with scripting (which is just like programming). Further, it is made in C++, but the C++ access is reserved for the real Unreal licensees (which cost serious bank), if I'm not mistaken.

There are plenty of 3D engines for C++ if you're looking for them. For example, see the [url="http://source.valvesoftware.com/"]Source engine[/url]. (Which also has a level editor, but that's not the entirety of it, and yes, you can write C++ code with it). Other engines exist, like [url="http://www.crystalspace3d.org/main/Main_Page"]Crystal Space[/url] and [url="http://www.terathon.com/c4engine/features.php"]C4 engine[/url], with various licensing terms and reasonable costs for commercial releases.
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