AGS Engine

Further development of AGS engine

Feature Issue: Add room OffsetX and OffsetY on the screen

Pages: [1]

jomalin

  • AGSer
  • Posts: 12
« on: 03 Dec 2014, 06:55 »
Trying to mimic the Maniac Mansion behaviour in AGS, i realized that AGS does not have a "basic" feature: the ability to draw rooms on a desired X and Y position on the screen.

Please, look at this image for a better understanding:


You can see Maniac Mansion layout is like this:
- upper black border of 16 pixels
- room image (where you move the characters and the action take place)
- lowest black border of 56 pixels (where the verbs are)

The real room image is just this:


So for this example, in Maniac Mansion, rooms are drawn at position (X,Y) 0,16 on the screen.

OK, now, suppose we make the verbs panel smaller because we have change the Font or we want to show the room without the upper black border... ¬°Now we need to retouch ALL the room images one by one, save and reimport them! (because now they should be at position 0,0 instead of 0,16).

To solve this, the solution is to add an X Offset and Y Offset properties for each room (and having the image rooms without borders). So in this way, we only need to change that X and Y offset position for each room instead of remaking all the room images and reimporting them. Or even better, if can get and set those properties by scripting, it can be made in seconds only by using two constants in our Global script (suppose Xoffsetrooms, Yoffsetrooms constant/variable names) and set all the rooms by code to those values.

So this suggestion will add 3 advantages:

1) THE BETTER ONE: If we redefine/change only the interface (panel size, verbs/font size, etc) we don't need to edit EACH background image to adjust them to the new position, save them all and import all again on AGS. This feature will allows us to have "dynamic interfaces" (positions can be changed) if our backgrounds images are saved without borders and if AGS implement the "room position" attribute.

2) Clear rooms (they dont have "hardcoded" black borders)

  So we will import background images as:
 

  Instead of:
 

3) We save hard disk space for EACH background image (no borders = less pixels)


I have created that modified scene over Maniac Mansion to represent why this is very useful.

The original room position (X, Y) is 0, 16:


Imagine now we decided to do a new interface, so we don't have written verbs, actions take in place by hitting right mouse button that change the icon/action (walk, use, etc) and the room starts at 0,72 (because we want to show the Maniac Mansion logo permanently over it):


So, we only need to change the position of the room from 0,16 to 0,72. We don't need to edit EACH room image in a graphic editor to move it down, save them, and import all again in AGS. "Room position" attribute does it for us very quickly. All rooms size are 320x128 instead of 320x200 (with borders), so we can move them as we want on Y axis.

NOTE: this was also treated in this post: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51332.msg636501382#msg636501382
« Last Edit: 14 Jul 2018, 12:42 by jomalin »

Radiant

  • AGSer
  • Posts: 5,211
  • Return once more to the Two Kingdoms!
« Reply #1 on: 03 Dec 2014, 13:59 »
This is why you design your screen layout before you put a lot of work into room art. You might as well say that AGS has no way of converting a low-res 256 color image into a high-res high-color image just because I've suddenly decided that my game should run on a higher resolution :P

.rhavin

  • AGSer
  • Posts: 14
« Reply #2 on: 21 Dec 2014, 16:14 »
This is why you design your screen layout before you put a lot of work into room art.

No, this not comparable. Separating room-space and gui-space is programmatically logical but might be (i dont know the code) easy or hard to implement in the engine. But it is a logical way to do things and i was even a bit surprised finding out that it has not been implemented that way.


I'd suggest it that way:

Have X,Y,W,H (defaulting to 0,0 and w,h of the games resolution) as setting for the whole game witch will be automatically the default setting for new rooms. Further have X,Y,W,H for any room, defining the space occupied by the rooms background-image. That way, you wont break existing code and give creators the ability to have smaller or bigger rooms without resulting in big image overhead and larger files.

Further i'd suggest those parameters be controllable by script. changing x,y might be usefull to simulate earthquakes or that something *mighty* (that statue in the adjacent room did wake up??) happens.
« Last Edit: 21 Dec 2014, 16:27 by .rhavin »

Crimson Wizard

  • AGSer
  • Posts: 8,530
« Reply #3 on: 21 Dec 2014, 17:05 »
Yes, that might have sense, except one small thing --

Further i'd suggest those parameters be controllable by script. changing x,y might be usefull to simulate earthquakes or that something *mighty* (that statue in the adjacent room did wake up??) happens.

The room position in the game's "physical area" and room position on screen are separate things. The "shake" effects are achiveable with camera movement. In AGS it is called "viewport", and there are script functions SetViewport and GetViewportX/Y, as well as ShakeScreen function.
« Last Edit: 21 Dec 2014, 17:05 by Crimson Wizard »

jomalin

  • AGSer
  • Posts: 12
« Reply #4 on: 16 Jun 2016, 19:32 »
Any news?
« Last Edit: 11 Jul 2018, 18:07 by jomalin »

jomalin

  • AGSer
  • Posts: 12
« Reply #5 on: 14 Jul 2018, 13:51 »
Please, consider this suggestion when you can. Thanks

Crimson Wizard

  • AGSer
  • Posts: 8,530
« Reply #6 on: 14 Jul 2018, 14:10 »
Please, consider this suggestion when you can. Thanks

Hi jomalin, sorry for no replies. We did not have much workforce available for a long period of time, and most effort was put into other tasks. But now there is some activity there again, so hopefully we can add something like this.

Just recently I was thinking about possible solutions for this problem, and my take on this is custom room viewport, which would let you define where the "camera" looking into the room is located on screen, and how large it is.
This is described here: https://github.com/adventuregamestudio/ags/issues/473

This is similar to what .rhavin suggested few years ago.

There could be other, possibly simplier solutions that would work in your particular case, maybe we will consider them also.
« Last Edit: 14 Jul 2018, 14:17 by Crimson Wizard »

jomalin

  • AGSer
  • Posts: 12
« Reply #7 on: 03 Jul 2017, 07:27 »
Any idea if this will be implemented? It's a basic feature AGS does not have yet.

Issue updated by Crimson Wizard
« Reply #8 on: 03 Dec 2014, 13:05 »
  • Version changed from AGS 3.3.2 to Future version

Issue updated by Crimson Wizard
« Reply #9 on: 16 Jun 2016, 21:23 »
  • Priority changed from 2 to 3

Issue updated by Crimson Wizard
« Reply #10 on: 14 Jul 2018, 14:15 »
  • Status changed from New to Confirmed

Pages: [1]

Issue Details

  • Reported
    03 Dec 2014, 06:55
  • Updated
    14 Jul 2018, 14:15
  • View Status
    Public
  • Type
    Feature
  • Status
    Confirmed
  • Priority
    High
  • Version
    Future version
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Rooms

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011