[XP] XP Ace Tilemap

Started by KK20, November 02, 2014, 05:53:24 am

Previous topic - Next topic

Zexion

He posted the fix earlier, you have to add
    self.zoom_x = $game_map.zoom_x
    self.zoom_y = $game_map.zoom_y

in any scripts that change the zoom of sprite_character. Which isn't just limited to xas

G_G

November 24, 2014, 07:42:46 pm #41 Last Edit: November 24, 2014, 07:44:52 pm by gameus
Finally got around to testing this on the XP engine alone. I was getting a constant 39-40 FPS on an 800x640 resolution with a 100x100 map and increased weather effects. Priority level also set to 5. Though to be fair, my processor power probably has a lot to do with it.

Spoiler: ShowHide


Just to experiment, I changed the resolution to 1792x952 with that 100x100 map and same settings. Still getting max FPS. So I'm pretty positive it's my processor keeping up with it.

Large Image: ShowHide


I figured I would have had to switch to the VX Ace implementation in order to get these results considering how much slower Ruby 1.8 is.

Zexion

dayum 1792x952 o.o
My computer would explode

KK20

It always seems to me that XP can handle a large amount of graphics better than VXA can. You will probably get worse results trying the XPA method (especially if aiming for 60 FPS).

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

G_G

November 25, 2014, 05:34:07 am #44 Last Edit: November 25, 2014, 05:57:08 am by gameus
Just for shits and giggles I decided to try it out anyways. Still got some very promising results except for the fact that when the screen resizes in Ace's engine, it seems to cut part of the screen off. Could this be because I use Windows Blinds?

Spoiler: ShowHide


1280x720: ShowHide


This one had a huge frame drop, but still not terrible. xD
1792x952: ShowHide


EDIT: Screen cut off was apparently because of skinning my windows. Changed back and it works fine. It's weird though, I don't get any weird cut offs when using XP's engine.

EDIT 2: Kept it at 1280x720 with a shit load of events and screen flashing every 30 frames. XP Engine was keeping at a steady 39-40 FPS again.

Spoiler: ShowHide

Blizzard

1792x952 is not divisible by 32x32. :P At least 952 isn't divisible by 32.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I know,  but I was trying to keep the 16:9 Aspect Ratio.

Zangetsu

March 17, 2015, 09:30:04 pm #47 Last Edit: March 17, 2015, 09:59:08 pm by Zangetsu
I am using this script and changed my resolution to 896 x 576... but the problem is my message box floats in an odd place... any idea how to move it down to the bottom of the screen?

I am also using UMS :D

EDIT:
I should describe my problem more I think... I am using XP, and when I playtest I see the messagebox here: http://orig03.deviantart.net/7b07/f/2015/076/6/a/screenshot_2015_03_17_19_54_49_by_espada_kitsuki-d8m4tkc.png
No matter how I edit the UMS, I can't move the message box to the bottom of thes screen, I can't figure it out.

Please help :)
My name is Kitsuki.

Zexion

Well, now that the screen is bigger, the coordinates of the message box have to change as well.

Look for this line in the UMS script:
y = 480 - $game_system.window_height - 16

Change the 480 to match your screen height. Just remember that if you decide to change the resolution later you'll have to change this number again xD

Zangetsu

March 17, 2015, 10:40:18 pm #49 Last Edit: March 17, 2015, 10:47:55 pm by Zangetsu
Hm, for some reason it doesn't work  :???: That's odd... there's a lot of lines where 480 is writtenin the script, would I have to replace them all then?

EDIT:
I replaced all of the 480s in the script, it works now! :D Thanks for your help, it put me on the right path! uwu
My name is Kitsuki.

Otávio Rapôso

KK20, Drago Custom Resolution II has a lot less graphical glitches than your Tilemap script, but it's slower and it lacks the feature of centering the map on the screen. Could you adapt it (our your script) to make this PROS work togheter?

KK20


Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Otávio Rapôso

April 28, 2015, 07:04:05 pm #52 Last Edit: April 28, 2015, 07:06:28 pm by Otávio Rapôso
I just found that some glitches were caused by the Smooth Scrolling script. But now, without the script, there are new problems, like monster's events (I'm using BlizzABS) that become invisible. There is also a problem involving a time gap between entering a new map and centering the map on the screen. I'll be sending you the project that I'm using to test RMXP Ace with big resolutions (1366x768 in fullscreen, more precisely). It's actually a modification on Echoes of Time. Try to test the game with both the Smooth Scrolling script and without it. Try to use also Drago Custom Resolution script (it's already commented in the script editor). You can use my saved game if you want (just go back some maps). Here is the link to the files: http://www.mediafire.com/download/6iaus7gdhvg7dui/Echoes_of_Time.rar

EDIT: I forgot to change the SCREEN_RESOLUTION constant on the demo.

KK20

There's already been a discussion on smooth scrolling scripts in this thread. The solution is also provided but I have not uploaded the fix.

I also didn't test the tilemap with any outside scripts as my main goal was just to get something working and hope enough users would do the testing for me. Rest assured I will get back to updating the code sometime after I graduate from school in a few weeks.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Kise

May 02, 2015, 08:24:27 am #54 Last Edit: May 02, 2015, 12:31:06 pm by Kise
I have weird problem with this script, for some reason map with ID 21 started to make game crash with message "Rgss Player has stopped working", There where only four 'teleport' events... When I deleted those events, games keep crashing at launch with message 'can't find the specified procedure' I have no idea what is going on.

Details in RGSS player has stopped working error ( not english, but there is something about XPATilemap.dll)
http://postimg.org/image/8l5kofecr/

edit,
I just created a new map, and copied all mapping and events, it still don't work.
Deleted all events - still nothing.
Deleted all tileset elemtents from the map - game doesn't crash ;o

KK20

Then your tileset graphic is probably not of the correct proportions. Can you post the graphic?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Kise

May 03, 2015, 01:20:10 am #56 Last Edit: May 03, 2015, 02:13:09 am by Kise
Tileset is in correct proportions, I just checked it. It's 256x9696. And it's not some kind of special map, just another part of forest.

Okay, I replaced for test your rewrite with The King rewrite, and I'm not getting any errors.

KK20

It's something that I'm not really capable of checking out at the moment. Send me a demo anyways so that I can see if it really is a bug with the script. I do plan on updating this soon.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

January 07, 2016, 07:10:23 am #58 Last Edit: January 07, 2016, 07:14:15 am by Blizzard
I found a bug. When leaving the screen area and returning to it, it seems that additional blitting occurs over areas that were already blitted so the shadowed part of the graphic gets repeated.

initlal state: ShowHide


after moving so that part goes offscreen: ShowHide


I downloaded this yesterday so I am definitely using the most recent version. I did comment out some pieces of code regarding custom resolution, but that didn't affect this bug at all.

EDIT: You might not be able to reproduce with a tileset that uses 8-bit color and has keyed transparency and semi-transparency colors. You have to use a proper 32-bit PNG for this with actual semi-transparent pixels.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

Blizzard on RMXP? What is this madness??

Zexion pointed this one out to me a while ago. I was planning on updating the script and including that fix along with other new changes, but I slowly kept putting it off until I forgot about it. :T

This should go in the Tilemap#oy= method, close to the bottom of it.

    # If layer is too far up screen, need to move it down
    if @layer_sprites[0].y <= -(MAX_PRIORITY_LAYERS * 32) * @zoom_y
      shift_amt = (($resolution.height/32.0).ceil + MAX_PRIORITY_LAYERS) * 32
      layer = @layer_sprites.shift
      layer.y += shift_amt * @zoom_y
      layer.z += shift_amt
      layer.bitmap.clear
      @layer_sprites.push(layer)
      #KK20
      width = @layer_sprites[0].bitmap.width
      num = @layer_sprites.size
      @layer_sprites[num-5].bitmap.fill_rect(0,128,width,32,Color.new(0,0,0,0))
      @layer_sprites[num-4].bitmap.fill_rect(0,96,width,32,Color.new(0,0,0,0))
      @layer_sprites[num-3].bitmap.fill_rect(0,64,width,32,Color.new(0,0,0,0))
      @layer_sprites[num-2].bitmap.fill_rect(0,32,width,32,Color.new(0,0,0,0))
      @layer_sprites[num-1].bitmap.fill_rect(0,0,width,32,Color.new(0,0,0,0))
    end
    # If layer is too far down screen, need to move it up
    if @layer_sprites[-1].y > (($resolution.height/32.0).ceil * 32) * @zoom_y
      shift_amt = (($resolution.height/32.0).ceil + MAX_PRIORITY_LAYERS) * -32
      layer = @layer_sprites.pop
      layer.y += shift_amt * @zoom_y
      layer.z += shift_amt
      layer.bitmap.clear
      @layer_sprites.unshift(layer)
      #KK20
      width = @layer_sprites[0].bitmap.width
      @layer_sprites[0].bitmap.fill_rect(0,128,width,32,Color.new(0,0,0,0))
      @layer_sprites[1].bitmap.fill_rect(0,96,width,32,Color.new(0,0,0,0))
      @layer_sprites[2].bitmap.fill_rect(0,64,width,32,Color.new(0,0,0,0))
      @layer_sprites[3].bitmap.fill_rect(0,32,width,32,Color.new(0,0,0,0))
      @layer_sprites[4].bitmap.fill_rect(0,0,width,32,Color.new(0,0,0,0))
    end

I probably should get back into fixing up this script again...
Maybe after I'm done with Zexion's camera request.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!