Scrolling Game Development Kit Forum
SGDK Version 2 => Help, Errors, FAQ => Topic started by: bluemonkmn on 2009-06-20, 07:57:59 AM
-
This is a list of only the most useful and frequently asked questions/topics. This message/list will be updated as I see fit, but feel free to suggest topics in replies in this thread.
1. Displaying messages with character portraits in them (http://gamedev.enigmadream.com/index.php?topic=1248.0)
2. Why won't the help file work? (http://gamedev.enigmadream.com/index.php?topic=1400.0)
-
most asked question: why does the player goes through walls? :laugh: (at least i think this was it.)
-
Actually, I don't see anybody asking about that particular question for SGDK2 in here. That's kind of surprising though. Is everybody figuring out their solidity problems on their own? I see a couple questions related to solidity, but not the simple question of why the sprite is going through walls. Maybe the documentation is good enough to answer this question.
-
mh, can't remember right, it's been too long. but there WAS a question that was asked a hundred times... the solution was just to have one specific rule right after another one. you even called it yourself the nr.1 question :laugh:
-
How to limit FPS/enable VSync?
I'm following the first tutorial, and the triangles moves incredibly fast, and I get 1000's of FPS. Halp!
Thanks.
-
How to limit FPS/enable VSync?
Add a rule anywhere in your project (somewhere that will execute only once per frame) that calls "LimitFrameRate". The sample project does this in the Overlay map in a plan called "Animate". The tutorial neglected to suggest this.
-
Works great, thanks.
-
If the bytes per tile is set to 1 for a map, is this for the RAM (in RAM) representation of the Map or the compiled representation of the map?
What I'm asking is, if I have a map with 1 byte per tile, does this mean that this is how much space in running memory the map is taking per tile, or is this the amount of memory the map takes when the project is compiled to memory?
I think this is a relevant question when dealing with HTML5 projects!
-
Byes per tile determines how much memory is consumed per tile in the compiled game *and* in RAM *and* in any saved game files generated while playing the game (with the SaveGame function). However the HTML representation may take more than 1 byte per tile in some cases. If you need more detail about that, I can explain, but you may be able to figure that out on your own by looking at the generated HTML. You can kind of see the maps in the code easily because I made a point of representing maps layers as JavaScript strings in a way you could kind of see in a text editor.
-
That's pretty cool bluemonkmn, so what if I change the character encoding of the HTML file?
Is it safe to use a minimal encoding like ANSI with the generated HTML files? Will I lose map information?
What encoding do the HTML files use by default?
-
Whenever I have the choice I go with UTF-8 encoding, as, I believe, does .NET in general. So it's most likely UTF-8, which is usually 1 byte per character for English text. Changing the encoding should have little effect as long as JavaScript interprets its strings to have the same content at run-time. UTF-8 and ANSI should result in the same content for the kind of code generated by SGDK2.