Started by aliasbody, July 15, 2014, 08:48:34 PM
0 Members and 1 Guest are viewing this topic.
Quote from: handsource-dyko on July 16, 2014, 07:18:37 AMYou could create a big bitmap, but this has many disadvantages. Editing is complicated and for the collision detection you need to create a seperate map. I'd recommend to use tiles, much more memory efficient, edit friendly (you can store the references to your tile in an array).I have done my own map editor for malvado, and due to the way the game works (with big bitmaps) not very straight-foreward in design.Tilemap editing is much easier and efficient.
Quote from: handsource-dyko on July 17, 2014, 07:24:58 AMTilemaps can be very flexible too, it depends on how you implement them. Multi-layer tiles with transparancy is possible. You can create big bitmaps in memory and use map_putxnp or something like that to copy them onto the bitmap in memory. Works fine for the more static backgrounds. For more dynamic parts, you could use sprites. When it comes to collisions with tiles, you can also use the hardnessmap methode (as a seperate tile layer). Did you know that most 2d games even with multi-layer backgrounds and appealing levels such as rayman, earthworm jim and many others simply used tiles? There no different really them super mario bros 1, but they use more layers, and more tile sets.1. You can use both, but FPG's are very efficient and conveint.2. You can use map_get_pixel with tiles as well, if you create seperate "collision tiles" that are hidden from view.
Quote from: handsource-dyko on July 17, 2014, 11:48:16 AMYour observation is quite accurate. The mountains where earthworm jim and the cow stand on are tiles. The collision hardnessmap are probably tiles as well (that's how jazza jackrabbit 2 does it). The background beneath could also be tiles, or a bitmap (either solution is possible).There are indeed a lot of tiles, but if you examine those games closer, you can see repition. A good example is a sega megadrive game called "mick and mack global gladiators" ( [size=78%]http://www.mobygames.com/game/genesis/mick-mack-as-the-global-gladiators[/size] ).This game was made with a tool called TUME (The Universal Map Editor) [/size][size=78%]http://en.wikipedia.org/wiki/TUME[/size] [/size][size=78%]http://games.greggman.com/game/tume___the_universal_map_editor/[/size]Also, earthworm jim was made with this tool. It was originally developed for the amiga, but was also ported to dos. The software is a bit of an historical artifact though, but it works with dosbox if you're curious to look what those development tools where like.
Quote from: handsource-dyko on July 18, 2014, 07:50:10 AMMost of the examples (except the last one) are likely to be tiles. Some games had very big tilesets. The carrots in Jazz Jackrabbit 2 are also tiles.I have this game, and it comes with an editor, so I can confirm this. The tilesets for this game are quite comprehensive.A lot of games would put the tileset itself on a bitmap, load that in, and then copy each grid block to memory (so that you get individual bitmaps in memory). The editors also work this way. They take the tileset bitmap, and since it's a fixed size grid, use a routine that copies bitmap segments of 16x16 pixels to memory. The bennu function map_block_copy can be used for that.
Quote from: handsource-dyko on July 18, 2014, 10:28:46 AMTile sizes are usually the same throughout the entire game. The designers simply make a choice to use 16x16 or 32x32 depending on the artwork and technical restrains. Some systems only supported on or two tile sizes, so the devs had to use that size imposed by the graphics hardware. Big objects are simply composed of standard tiles as well. The graphic designers simply devide a big object into A grid and you'll get some unique tiles. Some systems also imposed limitations on sprite sizes, and they used a similair technique. In Bennu, big spites are no problem, they can be any size you want.You can avoid map_block_copy if you already have an fpg file with individual tiles. Map_block_copy is more intended to copy portions of a bitmap to another bitmap. As it is possible to create fpg's and bitmaps in memory, this can be usefull.
Quote from: handsource-dyko on July 18, 2014, 12:52:09 PMFpg's are conveint. They can have zlib compression, (depending on the application they where created with). I don't know if png's are any better in terms on memory usage (well, if you compare them using the same bith depth). An fpg is just a container format based on the bennu map format (so if you have 200 small 32x32 bitmaps in them shouldn't really matter compared to a spritesheet png with the same contents). I don't know wich format has more overhead. I don't think it is that critical, maybe splinterGU can tell you wich format is more memory efficient considering the same amount of graphic content.Generally, I recommend to use a tileset for each level and load them as needed. You then unload the previous tileset first. (bennu has unload_map and unload_fpg functions).
Quote from: handsource-dyko on July 18, 2014, 03:51:59 PMUnfortunatly there is not equivaliant to fenix-fpg for bennugd (at least not the old fenix 0.84 gui based one). Your best bet would be to use fpedit with wine. Or install a virtual machine with windows. Wine is probably more conveint. However, since you can perform all fpg managment operations with bennu functions, you could also create your own commandline tool. Bennu has functions to work with commandline arguments. It is not so complicated to generate an fpg from graphics in a directory. Some people have made fpg editors with bennu. I have once made a special drawing tool for malvado that works with fpgs.When I do general fpg editing, fpgedit and smartfpg edit are the tools I use. Fpgedit is written in freepascal/lazarus, so a potentional linux port could be made. I have contributed to the translations of it. I believe it has a version optimized for use with wine.