Author Topic: Morgengrauen's problem thread  (Read 7568 times)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Morgengrauen's problem thread
« on: 2007-11-07, 08:07:56 AM »
oh man, i tried so hard, but here occour problems i can't solve with my lack of logic...

1. the player sprite isn't in the middle of the screen
player sprite: 64x64 pixel
map scrollable size: 0;0 or 2048;2048 (i don't see the difference!)
map view: 0,0,800,600
scroll margin left/right: 360
scroll margin top/bottom: 260
i created the rule "scroll player into view" like it was shown in the tu.

=> the player sprite moves too close to the bottom and right than it should do. strange, the margins should hold it almost in the middle of the screen. don't know why.


2. one layer is not visible
i have three layers:
earth in the foreground to walk on, zIndex:1
hills in the middleground, zIndex: -1
sky in the background, zIndex: -2

the hill layer is visible in my editor when i edit the earth layer. but not when i play in debug mode. don't know it that is important, but it's a tiny layer, which is is virtual size lengthened to be at same width like the earth layer. and it has an offset to take it down.


3. the sky layer doesn't scroll like i want it to
it doesn't matter what scroll rates i do (-5 f. e.) , it scrolls with my player and the earth layer.


yeah, that are my main problems at this time. i thougt it would be easier. do i misunderstand something very fundamentally?
i tried and changed so many values but nothing worked.

there are two  more questions: why isn't that cool feature from version 1 not available? i mean that you could just choose for a sprite: input device, or follow left wall and such things... now i have to script the easiest things. would it be possible to me, to use that feature from version 1, and copy the vb code in my version 2 game?

i will upload my game here http://www.burg-halle.de/~st2210/sgdk/meins1.zip, maybe that will help to solve the problems... in advance, thank you very much

edit: now i've set up the game in sgdk1... everythings works fine... that's annoying. i am a little bit scared of bothering you too much. but i want to make a game as a semester project and need to make advantages. and i guess you want informations about bugs and so on...
« Last Edit: 2007-11-07, 09:05:59 AM by Morgengrauen »

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Morgengrauen's problem thread
« Reply #1 on: 2007-11-07, 09:40:50 AM »
First of all, ZIndex should be a positive number or 0, I think.  Negative values are outside the supported range (which is a problem that you are allowed to use negative numbers there).

Second, scroll rate for the player sprite layer should be 1,1, generally.  Scroll rates should then be between 0 and 1 for slower or larger than 1 for faster scrolling.

Finally, the ScrollableSize of the map needs to be set.  This can be done through the Map Wizard.

Speaking of wizards, I noticed that it's impossible to set an offset greater than the small view given in the layer wizard.  Another thing to think about, BlueMonk.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Morgengrauen's problem thread
« Reply #2 on: 2007-11-07, 10:38:58 AM »
thank you very much, durnurd.
i am sorry i don't understand what you mean with " it's impossible to set an offset greater than the small view given in the layer wizard. "

in the past hour(s) i messed around with values. despite it looks all very simple, the sgdk2 is very tricky to use sometimes.
i figured it out now.
i didn't understand the scrolling rates first. 1 means = move so fast like the player. right?
the scroll rate for the hills were set false, therefore they the went invisible (down out of sight) when i moved the player down.
please please please bluemonk, don't allow people to use false values.

it ist quite confusing to have misc units in one manager window. you could make it easier if you would write "virtual size in pixels" similar to "size in tiles". and when i use the wizzard, then there's a note: layer soandso wastes so much units. what are the units there? pixels, tiles or what?
« Last Edit: 2007-11-07, 11:12:22 AM by Morgengrauen »

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Morgengrauen's problem thread
« Reply #3 on: 2007-11-07, 11:43:43 AM »
i am sorry i don't understand what you mean with " it's impossible to set an offset greater than the small view given in the layer wizard. "


That's just a message for BlueMonk.  It's something he should look into for fixing.

Scroll rate is the ratio of layer scroll rate to overall map scroll rate.  This is why you'd want to have the layer the player is on to have a scroll rate of 1, so that scroll rates on other layers are ratios to the speed of the player as well as the map overall.  When calling a scroll function, it scrolls the map, and to figure out where to display each layer, it multiplies the position of the map display by the scroll rate of that layer, and the result is the position of the layer display.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Morgengrauen's problem thread
« Reply #4 on: 2007-11-07, 05:31:48 PM »
the scroll rate for the hills were set false, therefore they the went invisible (down out of sight) when i moved the player down.
please please please bluemonk, don't allow people to use false values.

When you say "False" are you referring to the German word "Falsch"? :)  I think that translates better to "Bad" in English.  In any case, can you clarify what you mean by "False values"?  What values were you using?  what was wrong with them?

it ist quite confusing to have misc units in one manager window. you could make it easier if you would write "virtual size in pixels" similar to "size in tiles". and when i use the wizzard, then there's a note: layer soandso wastes so much units. what are the units there? pixels, tiles or what?

Why would you want virtual size in pixels and layer size in tiles?  I thought you just said that "misc units" (different units?) in the same window was confusing, so making virtual size be in pixels would be more confusing, not less confusing.  SGDK2 expects SizeInTiles and VirtualSize both to be in Tiles.  Is this confusing?  Did the help text at the bottom of the window help?

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Morgengrauen's problem thread
« Reply #5 on: 2007-11-08, 09:27:52 AM »
first quote:
yes i referred to "falsch". i meant, when there is no negative value allowed, then the user (me) shouldn`t be allowed to type that in. there should be an error message, at least when i start the debug mode. i used negative values for the Zindex and scroll rates either, and didn`t know why it`s not working. 
(so bad value would be good english?)

quote 2:
hm, i am at a convention and will a few days not work with the sgdk2.
i cannot install the sgdk here and take a look at the help. but i thought to have read in the help, the VirtualSize were in pixels?! ah wait...now i remember... they ARE in tiles.
i meant the offset. just write into that manager window: VirtualSize (in tiles); Offset (in pixels). yeah.

never mind that wizzard thing at the moment, there was something strange with it what i didn`t mention till now. next week i will look closer to it.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Morgengrauen's problem thread
« Reply #6 on: 2007-11-08, 06:08:54 PM »
first quote:
yes i referred to "falsch". i meant, when there is no negative value allowed, then the user (me) shouldn`t be allowed to type that in. there should be an error message, at least when i start the debug mode. i used negative values for the Zindex and scroll rates either, and didn`t know why it`s not working.

Negative values are allowed in ZIndex.  I just tried it and it worked fine.  Negative values are also allowed in scroll rate.  I just tried that and it worked fine too.  Maybe they didn't have the effect you expected, but they do work.  I don't know why you would want to use negative values for scroll rate, but I see no reason to prevent it.  My philosophy is don't prevent the user from doing things that work... because I never know when some odd setting might be useful.  Someone's game could maybe take advantage of a negative scroll rate even if I can't imagine how it would be used.  So I don't think I should make up arbitrary rules just because I don't think some setting is useful.  I should leave it open for the user to decide what they want.

(so bad value would be good english?)

Yes

i meant the offset. just write into that manager window: VirtualSize (in tiles); Offset (in pixels). yeah.

It already says "pixels" when OffsetX and OffsetY are highlighted.  When OffsetX is being edited, the bottom of the window says "Determines the number of pixels by which the left side of the layer is offset from the left side of the map (when map is at 0,0)".  I think that's pretty good -- most programs wouldn't even give you that much info on the UI, and you'd have to go to the help file to find that kind of information.  It this still not good enough?  Does every label of every property have to have documentation about the full meaning of the property right next to the field?  That would make a very cluttered screen.  The other problem with putting "in pixels" next to the property name is that all these properties exactly represent the properties of a layer object (then you know exactly what the names of the properties are if you want to access the properties of a layer from the code editor).  But of course property names can't have spaces and punctuation in them.  So I think it's best to leave the details and documentation separate from the label, and just leave the label to be exactly the name of the property.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Morgengrauen's problem thread
« Reply #7 on: 2007-11-08, 09:35:51 PM »
The wizard does not allow negative values for Scroll Rate or ZIndex.  Setting the scroll rate negative gives the message, "Invalid entry for Horizontal Scroll Rate" as soon as you try to advance to the next screen.  ZIndex, on the other hand, does not pop up a message saying it's a bad value, but when it reaches the summary, it shows that the ZIndex will be set to 0.  The Number Selector for ZIndex does not go below zero, but you can type the number in manually (it will have no effect in the end)
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Morgengrauen's problem thread
« Reply #8 on: 2007-11-09, 06:40:10 AM »
So the wizard is a little more restrictive (and should maybe be adjusted to handle negative Z-Index better), but the main window still allows and supports all values.  I guess it's natural that the wizard wouldn't be quite as flexible as the detail window.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Morgengrauen's problem thread
« Reply #9 on: 2007-11-09, 04:50:14 PM »
i have used negative zindex's all this time not realising that was not what you were meant to do. -.-
Good thing it worked. =D

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Morgengrauen's problem thread
« Reply #10 on: 2007-11-12, 11:46:00 AM »
sooooo.......... i'm back. :-)

negative scroll rates:  i tried it and it gave a very special effect to me... a funny thing. could imagine using it for bad things outrunning the player and awaiting him than at the finish. i used then a negative offsetX so the layer is first on the left side of the player.
negative z-indexes: yeay, worked as fine as the positive ones.
i think i had so many probs with that because various problems occured at the same time and i lost track.
i must remember to try just one thing at a time, otherwise the bug hunt gets complicated.

VirtualSize (in tiles); Offset (in pixels).
ok then, i noted the hint now. the thing is, sgdk2 runs fullscreen by me and the screen is so big (;D) it was out of sight and mind. will check it now.
i also noted the notation of the properties. this was a very good thought of you und is sure helpful.