[XP] XP Ace Tilemap

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

Previous topic - Next topic

KK20

Posting the in-progress build of Version 0.2: DOWNLOAD


  • One bug I noticed was vertical shaking while the screen is scrolling vertically. Going to have to math that one out some weekend.

  • Frame rate might suffer a bit if using the custom Plane class. Sad part is it might be more sprite lag than the actual drawing itself. Will take a look and see if I can improve upon it.

  • If using the XPA v2 distribution I posted, remove/comment-out Unlimited Resolution from your scripts list as I combined it with XPA Tilemap instead.



Give it a shot and report anything weird. I advise not replacing the previous tilemap version you have with this in your main project yet.

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

August 17, 2016, 01:15:13 pm #121 Last Edit: August 17, 2016, 01:19:54 pm by Blizzard
I think v0.2 finally fixed the crashes for me in the maps with screen-shake on.

I still experience a leftover glitch though.

top center: ShowHide


I have 3 hidden events positioned there in the top center of the screen. They are normal visible events and I'm hiding them below priority-5 tiles. So I'd still need that black border I spoke of earlier. xD
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

Fine :P I guess I'll try the easy-way then.

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!

kreiss

With an new project I have an error line 1090.
Maybe I did something wrong ?

KK20

August 17, 2016, 03:54:03 pm #124 Last Edit: August 17, 2016, 04:03:43 pm by KK20
wh = -> w, h, off = 0 { [w + off, h + off].pack('l2').scan /.{4}/ }

This line?

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!

kreiss


KK20

Yeah that's only valid syntax for Ruby 1.9.2. The v2 test linked above is for XPA games only. I haven't looked much into the XP compatibility yet, despite the first post.

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!

kreiss

Ow, too bad.=(

I hope you can export the new one into XP.

KK20

Why do you need this for XP anyways? There are plenty of other tilemap rewrites to use.

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!

kreiss

There are interesting things. (Zoom, fullscreen...)

G_G

Quote from: kreiss on August 17, 2016, 05:02:30 pm
There are interesting things. (Zoom, fullscreen...)


At that point, try and see if the Ace engine works with your project.

KK20

The zooming was done by LiTTleDRAgo in his separate version; it hasn't been put into the official version. I'm not sure if I want to either. VXA's engine allows resizing of the window along with resizing the graphics. Essentially, you can make your game resolution 320x240, make the game window 640x480, and you have a pseudo 200% zoom of your game. Or you can resize the window to the monitor's size, remove the window borders, and *boom* pseudo fullscreen.

XP's engine does not do that, so it would require more work to get it to the same level as it already is in XPA.

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

December 03, 2016, 07:36:17 am #132 Last Edit: December 03, 2016, 08:14:22 am by Blizzard
Yo, I found a compatibility issue with my encryption system and filenames. You might want to use something like this as additional safeguard.


#===============================================================================
# ** RPG::Cache
#===============================================================================

module RPG::Cache
 
  class << self
    alias :load_bitmap_tilemap_fix :load_bitmap
  end
 
  def self.load_bitmap(folder_name, filename, hue = 0)
    bitmap = self.load_bitmap_tilemap_fix(folder_name, filename, hue)
    if bitmap != nil && filename != ''
      bitmap.filename = filename
    end
    return bitmap
  end
 
  def self.autotile(filename)
    folder_name = 'Graphics/Autotiles/'
    path = folder_name + filename
    if !@cache.include?(path) || @cache[path].disposed?
      bitmap = self.load_bitmap(folder_name, filename)
      if bitmap != nil
        new_bitmap = self.format_autotiles(bitmap, filename)
        if new_bitmap != bitmap
          @cache[path].dispose
          @cache[path] = new_bitmap
          bitmap = new_bitmap
        end
      end
      return bitmap
    end
    return self.load_bitmap(folder_name, filename)
  end
 
end
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

Thanks, I'll take a look at it soon. Been wanting to work on this again.
Need to also change v0.2's way of handling updates to the data_table or bitmaps. Currently using Proc objects assigned to instance variables...which crashes when Marshal.dump is called when saving. Probably resort to an eval or making a ProcController class.

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!

KK20

January 27, 2017, 04:15:35 am #134 Last Edit: January 27, 2017, 04:21:07 am by KK20
Version 0.3 is coming along nicely now. Here are the things I plan for it to have:

  • Blizzard's request for black borders if the maps do not wrap. They are only 32 pixels thick, so don't vertically shake your screen more than that

  • Change the way autotile bitmaps are loaded, as Blizzard pointed out; call RPG::Cache.load_bitmap instead of directly calling Bitmap.new(filename)

  • The weird anonymous scripter's resolution breaker that I added to v0.2b has had many lines commented out. For some reason, I only need maybe 4 lines from it to work. Needs more testing

  • A new Plane rewrite...that's technically just reusing RM's implementation. Since Planes can only support drawing to a 640x480 dimension, the idea is to just make more Plane objects placed along the edges of the first Plane object (think of a patched quilt). Because of the above scripter's "hack", it was impossible to use the Plane class directly. But commenting out a certain line re-enabled its usage again thankfully!

  • Graphic bug with priority layers and configuring the max priority layers to be less than 5. When scrolling the map up, whole lines of tiles were suddenly erased.

  • Add my "F5 to double game window size" script (can change the button--only supports XPA/RGSS3)

  • Change the callback implementation to a CallBackManager module. In v0.2b, players could not save their games due to Proc objects attempted to being Marshal dumped.


and maybe others I can't recall at the moment. Might have it done this weekend.

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!

KK20

Version 0.3 Released~
DOWNLOAD HERE

I haven't tested this in vanilla XP yet, so I don't recommend doing that just yet. Over the next week or so I'll look into making it compatible.
But please do test and scope out for any bugs.

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!

LiTTleDRAgo

a lot of incompatible syntax

MAX_PRIORITY_LAYERS = 5 unless (1..5).cover?(MAX_PRIORITY_LAYERS)
# should've using include? instead cover? since rmxp didn't have that



  def self.resize_screen(width, height)
    wt, ht = width.divmod(32), height.divmod(32)
    #wt.last + ht.last == 0 || fail('Incorrect width or height')
    wh = -> w, h, off = 0 { [w + off, h + off].pack('l2').scan /.{4}/ } # <<<<
    w, h = wh.(width, height)                   #<<<<
    ww, hh = wh.(width, height, 32)             #<<<<
    www, hhh = wh.(wt.first.succ, ht.first.succ)#<<<<
    base = 0x10000000  # fixed?
    mod = -> adr, val { DL::CPtr.new(base + adr)[0, val.size] = val } #<<<<


quick fix (expired in one week) : http://pastebin.com/pgRdi7Fn

Blizzard

I'll wait for the tested version before I update.
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

@Drago: Ah, thanks about the cover? bit. Still not sure about the anon scripter part though. That was designed for RGSS3 specifically, so it shouldn't even be doing anything in XP projects, right? I'll need to omit that part entirely.

@Blizz: Should be fine for XPA. Doesn't hurt to just put __END__ at the top of the old tilemap.

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

February 05, 2017, 04:53:50 am #139 Last Edit: February 05, 2017, 05:02:40 am by Blizzard
Spoiler: ShowHide


I kept getting this in previous versions as well, but I hotfixed my copy of the script each time.

EDIT: I get this when I try to open the menu:

Spoiler: ShowHide


EDIT: Would be nice if there was some code to disable all weather-related code since I use a custom weather system.

EDIT: I also had this in the previous version, but I don't know why. xD It's in Game_Screen.


  def shaking?
    return @shake_duration > 0 || @shake != 0
  end


Might be my own code for compatibility.
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.