[XP] XP Ace Tilemap

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

Previous topic - Next topic

Blizzard

January 14, 2016, 04:46:21 pm #80 Last Edit: January 14, 2016, 04:53:21 pm by Blizzard
Yeah, remember that I disabled some code in the Tilemap? I disabled Plane. It works now after I re-enabled it.

EDIT: About the text: I'm not sure why it doesn't work, but that text won't even display if I just reroute the outline drawing to the normal drawing. But it's not just that. I have a simple window that uses normal text draw calls, but it also doesn't display anything. IDK.

Also, I'm still getting hard crashes in XPA. :/ This simple event caused one:

Spoiler: ShowHide


Not sure what's happening. I could assume that my screen transition caused it, but that doesn't explain why it crashed on certain maps that don't have anything to do with it. Also, normal screenshots work just fine so I don't think that the transition that uses a screenshot causes it.

EDIT: I think I'll just keep XP with your Tilemap. I might finish my own Window system for the lulz, but I don't think XPA is an option for me. :/
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.

syldocaine

January 16, 2016, 10:00:06 am #81 Last Edit: January 16, 2016, 10:01:39 am by syldocaine
If you have trouble with XPA I would recommend you this script: http://forum.chaos-project.com/index.php/topic,12291.0.html

together with this line in Main:

Graphics.frame_rate = 60


Just activate the "Reduce Screen Flickering" option and you will get a similar 60 FPS performance even without XPA.

Blizzard

January 16, 2016, 01:42:06 pm #82 Last Edit: January 16, 2016, 01:43:39 pm by Blizzard
I actually wrote my own anti-lag system a long, long time ago, lol! http://forum.chaos-project.com/index.php/topic,104.0.html
I know the thing with the frame rate. I actually use it to speed up the game while debugging.

As I said, I'm getting a hard crash with XPA. I mean the one where the Windows dialog pops up and says "The application has stopped responding." I would just take too long to figure out what's wrong. I'm actually expecting that several things are causing this since it crashes on certain events, but also on map entry on certain maps.
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

@syldocaine
It's not just frame rate that you get from RGSS3. It's really the graphic processing and upgraded Ruby that I get the most out of. Regardless of the FPS on XP, there's way too much screen tearing.
Also, anti-lag just addresses the events on the map. In my Advance Wars Engine, I don't use events so I don't benefit from it. Yet I saw a massive improvement switching to XPA.

@Blizzard
The map entry error sounds like an invalid tile ID. I used this to help someone else out with my Tilemap:

class Game_Map
  alias check_invalid_tiles setup
  def setup(map_id)
    check_invalid_tiles(map_id)
   
    bitmap = RPG::Cache.tileset(@tileset_name)
    maxtileid = (bitmap.width / 32) * (bitmap.height / 32) - 1
   
    for x in 0...@map.data.xsize
      for y in 0...@map.data.ysize
        for z in 0...@map.data.zsize
          if @map.data[x,y,z] - 384 > maxtileid
            msgbox_p("[#{x},#{y},#{z}] = " + @map.data[x,y,z].to_s)
          end
        end
      end
    end
  end
 
end

If a message box pops up, then that's my fault for not writing better code.

The event issue, though, is something I'm not familiar with.

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

I'll try it out at some point and see if it helps. Though, as I said, it works fine in XP and only crashes in XPA.
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.

Blizzard

January 31, 2016, 02:03:45 pm #85 Last Edit: January 31, 2016, 02:26:09 pm by Blizzard
I tried it out, but it didn't help. I'm actually pretty sure it's not your script since the crash also happens if I try somebody else's Tilemap rewrite.
I tried switching the Window class for mine and if I use mine, it crashes right after loading instead of when I try to enter battle.
I also tried not using the screenshot.dll, but that didn't really help either.

I experimented a bit more and I'm pretty sure it's some sort of memory corruption. When I try to enter a battle, the crash can happen at two separate moments. One is somewhere still on top of Scene_Battle#main. And the other is somewhere during my own Bitmap#desaturate method (implemented using get_pixel and set_pixel). The memory corruption scenario makes a lot of sense since Bitmaps methods probably manipulate the most memory and my own Window class implementation has a stretch_blt method that does linear interpolation filtering which means a lot more set_pixel calls. I tried quickly overriding set_pixel and calling fill_rect in its place, but it didn't help so my memory corruption suspicion makes more sense than set_pixel being broken internally. I also tried disabling all rendering methods in Bitmap, but that didn't help either.
Now the big question is what is causing the memory corruption and where. It might not be Bitmap, but it's possible that some internal class has problems with memory management when combined with the garbage collector. I'll probably never figure it out so I think I'll give up on XPA for good. I just have way too much custom shit to be able to find the culprit just like that after some more testing.
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

Do all of these classes/methods exist in the latest game download? I could easily take a look at all of this for you.

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

I can give you CP unencrypted if you want.
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

Probably would be better than sitting here trying to get everything in an editable state.
I'll take that offer. :P

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

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.

orochii

Hello!

So, how is the hard crash issue going? I'm here because my game also gives me a hard crash. I'm using XP Ace and this tilemap.

Interestingly enough (?), it only happens in Windows 7/10. In my other PC (it has Windows XP), it doesn't happen. It seems to have something to do with map size or something, because the bigger the map is, the chance of getting a crash is higher.
Also my game has an autosave function every time you change map, so I get the crash, load the autosave, and go through the map with no problems.

The other interesting issue is that games run way faster on that Windows XP machine, even considering it has less RAM and an older CPU. But this is something that happens to me with vanilla VXAce so never mind.

Salut!

KK20

I'm pretty sure it's not related to the tilemap if it works on other OS's. I don't have a XP computer to test on unfortunately and I'm not sure if a VM counts.

Can you upload a demo?

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

Definitely check for the 24-bit PNG thing.
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

If he claims the maps crash when changing maps, but load up from saves just fine, then I suspect disposed Viewports.

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!

orochii

February 16, 2016, 10:04:54 pm #94 Last Edit: February 17, 2016, 03:25:30 am by orochii
I have a demo out. It's about 60Mb in size (the host doesn't need any registration to download).
http://gamejolt.com/games/drekiroekr-dusk-of-the-dragon/13780

And here is a savegame. Best-case scenario, just going into the town will crash the game. If that doesn't make it, just go up/north. And if it still has not crashed, well, I'll be amazed.
https://dl.dropboxusercontent.com/u/13006190/Slot1.rxdata

Most of the time are outdoor maps which crash. There is some weather and other sheet going there so there is a difference between out and indoors.

EDIT: Whoops, yeah, in the Slots folder. Part of my game's folder names are inspired in the good old No$GB directory names. Slot for saves, Snap for screens, if there was a need I would have Battery for the other saved stuff xD.

KK20

Stupid me not realizing I had to put the save file in the Slots folder. Anyways, after doing that and loading the game, I was able to reach the "End of the Demo" message which was the map all the way north as you said. Did this on my Windows 7 x64. So...can't reproduce.

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 17, 2016, 02:28:30 am #96 Last Edit: February 17, 2016, 02:29:34 am by Blizzard
Yup, that sounds like the viewports thing. Different RAM loads should cause different behaviors when deciding which memory address to allocate.
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

February 17, 2016, 02:36:32 am #97 Last Edit: February 17, 2016, 02:46:21 am by KK20
Added your script Blizz and made this little message box appear to tell us how many sprites failed to be disposed.

class Viewport
 
  alias dispose_xpa_sprite_fix dispose
  def dispose
    if @_sprites != nil
      msgbox_p @_sprites.size
      @_sprites.clone.each {|sprite| sprite.dispose if !sprite.disposed? }
      @_sprites = []
    end
    dispose_xpa_sprite_fix
  end

Loading from the save and going into town, all sizes were 0.
Going to the next map up north revealed one viewport having 25 undisposed sprites.

So it's looking probable.

EDIT: Sprites not being disposed are the Sprite_Bloodsplatter's, which are just the footprints in the snow.

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

Yo, I have a small feature request if you're up for it. It would be nice if there were black borders on the map edges with the highest Z-order, because tile chunks are kinda visible when using the shake screen animation.
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

I know I spent time working on that because I do remember seeing that happen before. Unless you're doing something that I never tested; not sure what you mean by "map edges with the highest Z-order".

Still working on fixing the float-value changes to the Tilemap's ox/oy, which I think I have down, but now the screen shake is screwed up again.

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!