Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Q: Displaying an image behind tiles (https://forums.graalonline.com/forums/showthread.php?t=134270365)

maximus_asinus 08-27-2016 02:07 PM

Q: Displaying an image behind tiles
 
I am trying to simulate a 2D side-scroller with an image displayed in the background that has a static position regardless of movement. I'm wondering if you can have an image draw under tiles, and if so how could this be done? Could I use this in combination with transparent tiles?

Kirko 08-27-2016 04:21 PM

This is one way of showing an image under tiles and yeah you need transparent tiles or you wont be able to see anything behind them

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
with (GUIContainer) {
    new 
GuiShowImgCtrl("Test") {
      
useownprofile true;
      
profile.modal false;
      
resize(00screenwidthscreenheight);
      
      
image "block.png";
      
zoom  50;
    }
  }

  
Test.pushtoback();



maximus_asinus 08-27-2016 05:41 PM

Quote:

Originally Posted by Kirko (Post 1739672)
This is one way of showing an image under tiles and yeah you need transparent tiles or you wont be able to see anything behind them.

Wow thanks for this.

I wish there were more readily available dev tools. It is very hard to do any dev work without a server like testbed, and there is very little documentation on GS2.

DustyPorViva 08-28-2016 11:20 AM

You will need to make sure your tiles are on layer 1 instead of layer 0 for this to work, which is the more annoying part of this.

Elk 08-28-2016 10:08 PM

or even higher, if you wish to have multiple image layers behind i think?

Crono 08-29-2016 06:08 AM

watchu workin on there bud?

maximus_asinus 08-29-2016 08:17 AM

Quote:

Originally Posted by Crono (Post 1739682)
watchu workin on there bud?

Just trying to get the ball rolling on a few event ideas on Classic. Nothing ground breaking.

DustyPorViva 08-29-2016 08:49 AM

Quote:

Originally Posted by Elk (Post 1739680)
or even higher, if you wish to have multiple image layers behind i think?

No it doesn't matter, tiles just can't be on layer 0 if you want proper transparency.

Crono 08-29-2016 09:09 AM

Quote:

Originally Posted by maximus_asinus (Post 1739684)
Just trying to get the ball rolling on a few event ideas on Classic. Nothing ground breaking.

never before seen : - )?

maximus_asinus 08-29-2016 03:14 PM

Quote:

Originally Posted by Crono (Post 1739686)
never before seen : - )?

I'm sure it has been done before. I am posting about it on Classic's official forum. I'll post a screenshot of my mockup when I get home.

maximus_asinus 08-29-2016 05:18 PM

Okay so this is just a mock-up. For now the tiles I'm using are from SMW, and the background is from Tetris Splash (I think). Nothing in this screenshot is indicative of the final product in that regard.

The end result would be an elimination gamemode mash-up of Donkey Kong Country, Pacman, and Mario.

Quote:

Originally Posted by Original Outline
The level would have sort of a gravity, think how most 2D games work in regards to swimming physics. You would navigate left or right with the arrow keys, have to tap A to move up, release A to sink, and S would be a sword attack.

In the middle of the level at a certain interval a crate would spawn, and inside the crate there would be a swordfish that you could ride around on. The controls would change, you would no longer sink, you'd move with the arrows keys (though the movement would be a bit slippery), and S or A would have to do a thrusting attack which would also give you a boost of speed.

The swordfish attack would be stronger than the regular attack. If you're attacked while riding the swordfish, you would be knocked off, allowing the other player the chance of getting on and using the swordfish. Repeatedly attacking the swordfish sans rider will have it dash attack, and eventually swim out of the level.


Crono 08-30-2016 06:11 AM

swim gani cute


All times are GMT +2. The time now is 11:34 AM.

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