Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / tilemap editor

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Jul 2010 02:56 Edited at: 11th Aug 2010 01:44
I've been wanting to write a platform game for awhile and decided the other day I'll probably need an editor first, so that's where this project came from. (sorry no screenshots) Editor should run at 640x480 in window mode, options later on will let you set it to your liking.

Still largely a work in progress, but wanted to get it out there for a little feedback. Maybe hear what kind of options people would like. Frame rates are pretty good with a fully displayed map, all options are hard-coded at the moment. Map is 200x200 tiles with 16x16 tile size. So for the moment, any tileset you load is assumed to be made up of 16x16 tiles, actual dimensions of the image do not matter. For testing purposes, I've been using the RPG tileset recently posted here:
http://forum.thegamecreators.com/?m=forum_view&t=172576&b=4

The map's vertical scrollbar is functional, as is the divider bar. Load the tilemap (as many as you like), select a tile, then pasting your images to the map. I've only started 2 days ago, hence why there's so little functionality at this point, but I thought it was enough to demo the idea and hear back from you guys. The attached executable is a 2mb zip.

For those interested, a tileset is loaded into a memblock at which point it is then dissected into its individual tiles. The map's data, when stored in a file, will keep track of the order tilesets are loaded into the editor as to preserve the proper image numbers. Eventually, the image numbers will start at 1, with the editor offering an option to configure an offset value so as to not interfere with any code you may have already written in a game. For instance, you want the tile graphics to start at image 100 and increment from there rather than beginning at 1.

Once the map editor is complete, I'll begin on item placements (coins, keys, etc...) and enemy placement with simple path editing.

Another feature to be worked on is controlling which tiles are passable and non-passable. I'm thinking, each tile will by default be non-passable, right-clicking the tile from the right pane gives a menu to set passable/non-passable, affecting only those tiles yet to be placed. Individual tiles on the map can be right-clicked to control this as well (secret passable walls and whatnot).

My last idea is hot spots. These are locations you can set in the map, numbered with an ID, that you can use to add additional elements to the game not available in the editor. Say you want a transporter, when the character reaches that "hotspot", it'll trigger an action that you can then do whatever it is you want to do.

I'm still working out an idea about layers.

Update: 8-10
- Java-based editor in the works
- New plan to support code templates for very easy game creation

Update: 7-29
- Wrote map loader (Details in post below)
- Fixed bug in save map function
- Found new bug with popup menu
- Download the game engine demo now! Arrow keys to move, Press '1' or '2' to load different maps.



Edit: 7-26
- Added Save map function
- Began work on actual game functions: loadMap(filepath$), displayMap(), positionMap(x, y)
- Added bridge graphic to tileset

Edit: 7-25
- Added an overlay layer. These tiles are displayed over the character and can overlap existing background tiles.
- Ability to show bounding boxes of collision tiles.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Jul 2010 20:48 Edited at: 21st Jul 2010 20:48
Further progress last night, pretty much finished the main UI(scrollbars, bug fixes), except for the menus. Added a drop-down box to select the tile size you wish to work with.

Here's an early screenshot:



"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Attachments

Login to view attachments
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 21st Jul 2010 20:55
Looks very pro.
Lucky 13
16
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 22nd Jul 2010 00:53
I've been working on something similar for an RPG but have achieved nothing close to this. Very cool.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Jul 2010 01:20
I think I've decided to go with a 3-layer format for the map. Layer 1 is the background and displays behind the player's character and has no collision. Layer 2 is the character layer, anything placed on this layer is checked for collision. Layer 3 shows over top of the character and also has no collision. This setup should allow for more robust tile maps, such as colliding with a tree stump yet still being able to walk behind the trunk and leaves. It gives an added field of depth.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 22nd Jul 2010 17:49
Looking Great. My Rpg's Map Editor is still pretty primative. Nice! I've only looked at the screen tho,not at home.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Jul 2010 23:08 Edited at: 22nd Jul 2010 23:09
I took a break from the editor last night and tried my hand at making my own tileset. I think I'll use this set to make a mini game when I'm done, just to test stuff out. Don't suppose anyone can draw an animated bunny?




"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 30th Jul 2010 09:52 Edited at: 1st Aug 2010 13:16
Began working on the actual game engine.

Current Features:
- Sliding collision
- Multi-layer map (allows character to work behind tiles)
- Quick n' easy map loading
- 2 Game formats available; 1. platform with gravity, 2. top-down view
- Timer-based movement (i think i fixed all the bugs)
- Map scroll boundary

Aside from obviously drawing a different type of map, the only thing you really need to do to switch between a platform and top-down game is to enable gravity which has already been written into the engine.

To explain the "scroll boundary", sometimes you want the map to scroll before the player reaches the edge of the screen. Imagine an invisible box in the middle of the screen. When the player reaches the edges of this box, the map will scroll in that direction. If you want the player to stay at the middle of the screen at all times, make the bounding box the same dimensions as the player image.

Apart from initializing a few variables, the game loop simply looks like this:



And if you want to switch from a top-down rpg-like game to a Mario platform, then you only have to set 1 flag: _Params.gravityEnabled = TRUE


Try the attached demo of the game engine.
- Arrow keys to move
- Press either '1' or '2' to switch between two different map types.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Attachments

Login to view attachments
Frank C
13
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Houston TX
Posted: 30th Jul 2010 18:18
Downloaded and ran editor got a DirectX error, see attached screenshot of error and DirectX version installed.

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Aug 2010 00:04
There's actually more than 1 version of 9c, I believe TGC has had a topic mentioning this before. I suggest trying to update DX, might be a newer version of 9c than what you have. 9c has been updated and released several times between 2004 and 2008, and stupidly keeping the same version number. That's all I can think of.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Aug 2010 13:22
I updated the the platform test file, i forgot to include the maps and some of the image paths were absolute.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
leo877
16
Years of Service
User Offline
Joined: 6th Mar 2008
Location: san antonio, tx
Posted: 2nd Aug 2010 11:44
looks cool. love the old school test images. i while u had a tutoral about aomething like this. are you still using the same method are did u start from scracth. 2D Pixel-Scrolling Tilemap i still have that tutorial download. the pdf one was missing a part but the word document should be complete.


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Aug 2010 02:31
Started from scratch, mainly cause I had forgotten I wrote such a tutorial already. Last night I began working on a new collision system that will let me break from the basic squares of a platform. Theoretically, it would allow for sonic-type games, however, I have yet to get it to work properly.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Aug 2010 06:52 Edited at: 6th Aug 2010 06:53
Started working on a new editor, same thing but done in Java. It's a little behind the DB version but I've only been on it about a day.




"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Aug 2010 00:59
Updated the Java-based editor today. You can now rebuild the map, notifying you if the new size will clip any tiles that have already been placed. Also finally implemented the erase tool and ability to set the background color. You can also save the map, however, the background color is not yet stored with the current save format nor is the editor settings saved yet (tileset info).


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 11th Aug 2010 01:18
I don't think non dark basic wips are allowed here.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Aug 2010 02:50
Then we'd have to delete all the IDE threads. It's still related to DB as my editor is designed to create tilemaps for DB games.

I've attached the new editor if anyone wants to give it a try. Not even close to a "demo", but I like early feedback. If you hold SHIFT while dragging the mouse you can select multiple tiles to fill at a time.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Attachments

Login to view attachments
Frank C
13
Years of Service
User Offline
Joined: 3rd Jul 2010
Location: Houston TX
Posted: 17th Aug 2010 16:10
Looks good so far, tested it with normal png and bmp tile files; will it by chance read in the TST files you wrote the code for?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Aug 2010 05:21
I plan to write an interface for import/export plugins The TST format is simple, so I could easily throw that into the mix.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Login to post a reply

Server time is: 2024-04-26 22:25:41
Your offset time is: 2024-04-26 22:25:41