488 reputation
214
bio website
location Munich
age
visits member for 2 years, 9 months
seen Aug 18 at 13:19

Sep
12
comment Custom extensible file format for 2d tiled maps
Indeed a basic interface IMapFileParser which exposes functions both classes TMXMapFileParser and WhateverMapFileParser would be a good point for extensibility for other formats (long term thinking), as well! But I will have to work on my concepts and that will take me quite a while - Smiješno slučajnost, ali moram te razočarati. Ja ne živim u Srbiji. :(
Sep
12
comment Custom extensible file format for 2d tiled maps
I will have my current XML concept based a bit on the TMX map format and then read all files with RapidXML - later on I will move on to some custom binary file format.
Sep
12
comment Custom extensible file format for 2d tiled maps
@DanielCarlsson: As mentioned in the accepted answer below I will stick to XML at the beginning to have something handy to debug and work with. Later on I will move on to a custom binary format. Nevertheless upvoted because XML is awesome in combination with the RapidXML libs in C++.
Sep
12
accepted Custom extensible file format for 2d tiled maps
Sep
12
comment Custom extensible file format for 2d tiled maps
Quite a bunch of examples - TOP! Now I will stick to XML to create some basic levels to debug/work with and eventually I will move on to such a binary format you described for the raw mapfile holding the data and pack this file with both the tilesets (png etc.) and the scriptfile(s) into a zip to have everything structured in better way. It will be up to writing code, that actually reads such binary data - but that is another topic in my story... thanks!
Sep
12
comment Custom extensible file format for 2d tiled maps
You are just saving ... let's say IDs for the tiles, but what about their metadata? How should I save whether tiles are passable or not? What about triggers and maybe even scripts/code/function calls associated with them?
Sep
11
asked Custom extensible file format for 2d tiled maps
Sep
10
answered Lost transparency in SDL surfaces drawn manually
Sep
10
asked Lost transparency in SDL surfaces drawn manually
Sep
10
comment How do you pack resources in a game when you have too many of them?
My first idea would be to find a suitable library like the (quite outdated...) zziplib to store all my usual assets in a zip file and then load them in my game through a custom content pipeline foe the engine. What you are basically looking for at the beginning is a way to load files from a zip file to memory to be able to use them in your game. Concerning the dlls it is quite difficult because they usually have to be in the same dir as the executable or the Windows or System32 dir which is NOT recommended! How about a SFX archive to extract to TEMP and run from there?
Sep
10
comment How do you pack resources in a game when you have too many of them?
How do you understand the term resources? Assets like images, sounds, ... or do you include DLLs in this term?
Sep
10
revised How to use caching to increase render performance?
Added some information for a possible boost of performance
Sep
10
accepted How to use caching to increase render performance?
Sep
10
comment How to use caching to increase render performance?
I really appreciate your efforts! Concerning for_each vs. generic for loop I haven't been able to notice differences in performance right now with small test maps, though I will stick to your suggestion! A custom SDL_BlitSurface method is quite... difficult for now but I will keep that in mind. And last but not least the direct rendering: I don't know why I haven't rendered all static tiles layer by layer to one big cached surface for each layer so that I do not need to iterate over EVERY tile over and over again. Dynamic entities will need this though it is just small share :D
Sep
9
comment How to use caching to increase render performance?
@MaikSemder: I thought this should be obvious enough that the CPU is constantly at 13% usage (inspected just by watching the task manager for a first impression) when (in my current test) redrawing every few msecs about 80 tiles (combined with the repetetive creation and deletion of my ImageToRender objects) in comparison to drawing it once and then idling while there are neither animations nor movement or any input. Why should I waste resources this obviously when it can be handled much better? Furthermore drawing nothing to the screen actually results in CPU usage of < 1%.
Sep
9
asked How to use caching to increase render performance?
Aug
22
asked Fix broken Portal 2 Chapter Handling in my Mod
Aug
3
accepted Texturing voxel faces separately
Aug
3
awarded  Commentator
Aug
3
comment Texturing voxel faces separately
I was able to draw the RenderTarget2D and assign it to the cube but it does not wrap automatically! What is the general approach to wrap this cube map around the cube?