GameEngine2D

Reply

Level 1

Level 1
asdfADRIAN
Posts: 36
Registered: ‎15-05-2012
Message 1 of 6 (227 Views)
Accepted Solution

Prioritizing Foreground / Background Layers?

Sorry about all the question. Anyhow I have an issue about forground and backgrounds. There really isnt any commentation about this so if anyone could help me out that would be great. 

I have created a character and I have just recently implemented a scene into the foreground. I will later create a background layer.

 

Anyhow, the character is set behind the foreground and Im not sure how to fix this. Heres an image of what is going on. Also what is the limit to how many layers can there be in total? 

 

Thanks!

 

Come join The Freenode IRC at Channel #pss-dev!

I am merely a graphics designer who wants to program, go figure.

Please use plain text.

Level 1

Level 1
asdfADRIAN
Posts: 36
Registered: ‎15-05-2012
Message 2 of 6 (218 Views)

Re: Prioritizing Foreground / Background Layers?

[ Edited ]

Nvm got it working. Thanks to Telostia (telos157)in the IRC.

Just re-arange the layers in order as so. Where World is the main character and monsters. Where the top of the list is the layers furthest from the camera, and the layers on the bottom of the list, in this case Curtains, would be to the front of the camera. 

 

            Scene.AddChild(Background);
            // BEFORE -> Scene.AddChild(World);
            Scene.AddChild(EffectsLayer);
            Scene.AddChild(Foreground);
            Scene.AddChild(Interface);
	    Scene.AddChild(World); // Character Sprites <= After
	    Scene.AddChild(GameObjects);
            Scene.AddChild(Curtains);

 

Come join The Freenode IRC at Channel #pss-dev!

I am merely a graphics designer who wants to program, go figure.

Please use plain text.

Re: Prioritizing Foreground / Background Layers?

Scene.AddChild(node, order) will let you set this. Check the docs for a detailed description of how the order works.

Please use plain text.

Level 1

Level 1
asdfADRIAN
Posts: 36
Registered: ‎15-05-2012
Message 4 of 6 (211 Views)

Re: Prioritizing Foreground / Background Layers?

I knew there was one with a parameter! :\ 


Uhm where exactly are the docs? I cant find it. 

Come join The Freenode IRC at Channel #pss-dev!

I am merely a graphics designer who wants to program, go figure.

Please use plain text.

Re: Prioritizing Foreground / Background Layers?

[ Edited ]

Documentation can be found here:

 

Open Windows Start Menu

Goto:

Ps Suite | Documents | SDK Documents (English)

 

It wil start your webbrowser to show local documentation.

Allow blocked content in order to easily search (in upper right corner) for classes, methods etc. like for example the method AddChild.

 

Quite handy ... I use it regularly when searching for something I would like to use or need.

 

Please use plain text.

Level 1

Level 1
asdfADRIAN
Posts: 36
Registered: ‎15-05-2012
Message 6 of 6 (188 Views)

Re: Prioritizing Foreground / Background Layers?

[ Edited ]

How would I make a layer that mimics the platform ground? So lets say if there was a hole, the player would fall through. Or if there was a layer above then the player could jump up onto that platform layer?

 

Something like some sort of collosion, so if player collides with the sprite layer, he will stay on top..? Not sure how to word it.

Come join The Freenode IRC at Channel #pss-dev!

I am merely a graphics designer who wants to program, go figure.

Please use plain text.
This widget could not be displayed.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。






Recent News