Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Feature request (https://forums.graalonline.com/forums/forumdisplay.php?f=194)
-   -   More tilelayers[] functionality needed (https://forums.graalonline.com/forums/showthread.php?t=134263560)

0PiX0 06-14-2011 08:40 PM

More tilelayers[] functionality needed
 
I am developing a platformer / sidescroller. The blocking tiles in my level are above layer 0. I do not want to place blocking tiles on layer 0 beneath my other tiles just to create the blocking effect. My projectiles use tiletype(tx,ty) to check collisions, but there is no support for tiletype above layer 0.
Quote:

Originally Posted by Stefan (Post 1421409)
It's made so that tile layers above zero are not blocking because they are for decoration

Please add support for level.tilelayers[i].tiletype(tx,ty).

I would rather not have to create a scripted version using level.tilelayers[i].tiles[x,y] since that would be much less efficient.

Also, please add support for parallax scrolling.
http://en.wikipedia.org/wiki/Parallax_scrolling
Perhaps something like this:

level.tilelayers[i].parallaxscrolling = true;

Then the layers could be scrolled by simply adjusting the x and y of each tilelayer:

level.tilelayers[i].x++;
level.tilelayers[i].y++;

This would allow me to create effects such as repeated scrolling backgrounds, moving clouds, etc. without using multiple npcs.

WhiteDragon 06-14-2011 08:43 PM

Neat suggestions. +1

Cubical 06-14-2011 10:24 PM

Quote:

Originally Posted by 0PiX0 (Post 1654741)
Also, please add support for parallax scrolling.
http://en.wikipedia.org/wiki/Parallax_scrolling
Perhaps something like this:

level.tilelayers[i].parallaxscrolling = true;

Then the layers could be scrolled by simply adjusting the x and y of each tilelayer:

level.tilelayers[i].x++;
level.tilelayers[i].y++;

This would allow me to create effects such as repeated scrolling backgrounds, moving clouds, etc. without using multiple npcs.

Zero(zokemon) already accomplished this on Atexia somehow. I think it was a mixture of tilelayers and an image behind them. it was pretty sweet.

DustyPorViva 06-14-2011 10:37 PM

Quote:

Originally Posted by Cubical (Post 1654752)
Zero(zokemon) already accomplished this on Atexia somehow. I think it was a mixture of tilelayers and an image behind them. it was pretty sweet.

He coded his own tile rendering, it was all showimgs.

0PiX0 06-14-2011 10:42 PM

Quote:

Originally Posted by Cubical (Post 1654752)
I think it was a mixture of tilelayers and an image behind them.

Images cannot be displayed behind tiles, so it must have been more complex. Things like this should be kept as simple as possible, which is why I am asking for a practical method to be implemented. :)

DustyPorViva 06-14-2011 10:45 PM

Quote:

Originally Posted by 0PiX0 (Post 1654757)
Images cannot be displayed behind tiles, so it must have been more complex. Things like this should be kept as simple as possible, which is why I am asking for a practical method to be implemented. :)

They can be, but it's not a simple process.

0PiX0 07-07-2011 08:08 AM

Bump.
 
Stefan, please add support for parallax scrolling in tilelayers.

It's not like I can script a giant loop that changes 4096 tiles per scrolling tilelayer and moves them every 0.05 of a second. x_x The loop limit would definitely be exceeded. If anyone has any ideas for a workaround that doesn't involve showimgs as tiles, I'm all ears.

Thanks. :)

oo_jazz_oo 07-07-2011 08:16 AM

What if you set layer 0s alpha to 0, then created a gui image and placed it behind the GraalControl object?

No clue if this would work, but it seems logical....kinda.

DustyPorViva 07-07-2011 09:03 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1657759)
What if you set layer 0s alpha to 0, then created a gui image and placed it behind the GraalControl object?

No clue if this would work, but it seems logical....kinda.

It does work, and has been done for a while for background images. It's not exactly the smoothest process though.

0PiX0 07-07-2011 04:49 PM

Thanks!
Seems to be working so far. :)

zokemon 07-11-2011 11:47 AM

Haven't logged on here in years and the first thread I look at, I see my name! Wow guys, I feel so warm and fuzzy inside.

Sorry, to bring up a slightly old topic and go off topic (even though it was the newest).

On that note, have tilelayers made any advancements since my adventures with them?

Crow 07-11-2011 12:54 PM

Quote:

Originally Posted by zokemon (Post 1658346)
On that note, have tilelayers made any advancements since my adventures with them?

Nope :(

zokemon 07-12-2011 08:55 AM

Quote:

Originally Posted by Crow (Post 1658352)
Nope :(

Sad.

Hezzy002 08-22-2011 06:16 AM

I love how people have to hack things in, and have to discover things on their own (Even though it's running in a ****ing sandbox that Stefan should know everything about) and Graal is actively developed. Pathetic.

xXziroXx 03-22-2012 06:38 PM

Bump. This would be INCREDIBLY useful to make levels really come to life. Also being able to draw tilelayers above players would AMAZING.


All times are GMT +2. The time now is 08:52 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.