How do i make a level with tiles?
#1 Members - Reputation: 137
Posted 09 September 2012 - 12:43 PM
#2 Members - Reputation: 608
Posted 09 September 2012 - 03:32 PM
#3 Marketplace Seller - Reputation: 9303
Posted 09 September 2012 - 04:09 PM
http://www.gamedev.net/topic/629742-2d-overhead-tiling-engine/page__p__4970743#entry4970743
If neither of these links help you, if you ask specifically what part you are having difficulty with, we're happy to help.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
#4 Members - Reputation: 137
Posted 11 September 2012 - 02:25 PM
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, 11 September 2012 - 02:27 PM.
#5 Marketplace Seller - Reputation: 9303
Posted 11 September 2012 - 03:35 PM
Maybe this will help you load the maps. Scroll down to the fourth post or so, and there's a SFML 2.0 compatible version.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
#6 Members - Reputation: 137
Posted 11 September 2012 - 03:54 PM
#7 Marketplace Seller - Reputation: 9303
Posted 11 September 2012 - 04:09 PM
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.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
#9 Members - Reputation: 116
Posted 16 September 2012 - 09:45 PM
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.
http://www.mapeditor.org/
Not sure if it will help for your game though.
#10 Members - Reputation: 283
Posted 17 September 2012 - 02:52 PM
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:
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);
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, 17 September 2012 - 03:01 PM.
#12 Marketplace Seller - Reputation: 9303
Posted 20 September 2012 - 01:55 PM
SDL is a 'C' programming language API, that is usable in C++ and uses a functional interface.
SFML is a native C++ programming language API, using object-oriented principles and RAII.
They are both good APIs, but it's bad advice to go hopping from API to API (or language to language as some people also suggest), whenever a wall is encountered, especially when that wall exists in both APIs and switching wouldn't solve your problem anyway.
The issue you were having, was how to load a Tiled Map Editor map file in C++. That's a C++ issue, not a SDL or SFML issue. Both SDL and SFML are not natively familiar with Tiled Map Editor... and both have 3rd party integration with that format.
In my personal opinion, you should stick with what you are already using.
Edited by Servant of the Lord, 20 September 2012 - 01:55 PM.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
#13 Members - Reputation: 283
Posted 20 September 2012 - 02:53 PM
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.
#14 Members - Reputation: 137
Posted 24 September 2012 - 11:29 AM
#15 Marketplace Seller - Reputation: 9303
Posted 24 September 2012 - 12:20 PM
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 Source engine. (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 Crystal Space and C4 engine, with various licensing terms and reasonable costs for commercial releases.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal






