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.

AppGameKit Classic Chat / making a new tiled loader

Author
Message
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 16th Jan 2015 22:48 Edited at: 13th Mar 2015 11:20
Why am I making a new one. Well the tmx loader did not support multiple sprites like this one does. Some things that make this program different is that you have to set the path where all your spritessheets exist. Make sure that you use the same path, and put all your pictures in the same directory to get the best results.

I have added an export feature that allows the user to export spritessheets that have been tested at 1024 by 1024 pixel format. The sprites them self are 32 by 32 pixels each in the test version of the program that I used. This means that the program was not optimized by pictures that are not of 1024 by 1024 pixels.

Setting the path is easy when you go to the mfc dialog there is a set path input box that allows a user to input the path that all pictures of the tmx file are located.

This loader also currently only supports orthogonal maps from tiled. I have a portion of the program that read isometric maps, but the program does not do any thing with it. That is why I provided the code in the second post so you can add this section if you want, or I might do it myself when I am board.

The current problems with this loader also include users not using power of 2 images. Even though you can import these images, and the output is correct you will get a image that dose not look like the tmx version in tiled.



As you can see this is the test tmx city I made.


Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 16th Jan 2015 23:15 Edited at: 17th Jan 2015 19:52
ops misspelled tiled. Well I also share the source code since there is another version. Make sure you have Microsoft c++ professional 2008.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 17th Jan 2015 19:57 Edited at: 13th Mar 2015 11:04
i added layers in this version.

In the downloaded code I offered change the code in menuhandle.cpp to this. This also tells you how I exported the data to opentowrite command offered by agk. The export feature is not that hard to understand. I made it as simple as possible. the export first output is how many layers there are in the sprite sheet. Then the second output should be how many sprites are on that layer and so on.



Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 17th Jan 2015 20:55 Edited at: 13th Mar 2015 11:00
The reason why this is a quicker method then loading tiled directly is because it leaves the 0's out of the layers, and it saves the data about the sprites that are used in the tmx file like frame, x data, y data.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 30th Jan 2015 06:18 Edited at: 13th Mar 2015 10:45
added a video of the tmx loader in action. The program loads tmx files pretty quickly.

One thing that you need to know about the loader is that in loads from the path that you specify where all the pictures of the tmx files are located.

Another thing I found use full in this program is that I can see how the tmx file will look in agk, before I use it. You also can use tier one or tier two to open the export because I save it in agk save format.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 30th Jan 2015 09:05
The video says it's private, so we can't see it!

Onwards and sometimes upwards
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 30th Jan 2015 14:57 Edited at: 30th Jan 2015 15:01
Made it public.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 12th Mar 2015 03:04 Edited at: 13th Mar 2015 11:05
that is why I exported the data in agk file format so It actually is a lot easier to deal with in the end.

change this in the spriteimport cpp file to the directory all your spritesheats are located.

foldername="c:\\users\\shawn\\pictures\\";


or

type it in the gui interface as so


Well that image didn't turn out.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Attachments

Login to view attachments
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 12th Mar 2015 03:10 Edited at: 13th Mar 2015 10:48
To export the data simple goto the menu then export it. I did not use the latest agk build to build this in c++. The exporting porton of the program allows users to export the data to agk file format that can be easily be read by both tiers.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Login to post a reply

Server time is: 2024-04-25 04:35:27
Your offset time is: 2024-04-25 04:35:27