Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
512 stars 130 forks source link

Pokemon Essentials tilemap broken #49

Closed khkramer closed 9 years ago

khkramer commented 9 years ago

Here's what outdoor maps look like:

alt

While indoor maps seem to render fine.

The console outputs tons of these:

[GLDEBUG] glTexSubImage2D has generated an error (GL_INVALID_VALUE)

But it's not outputting why it's generating an error exactly so I don't know where to look for fixing this.

EDIT: The game also seems to freeze for a second or so when it outputs one ot those gldebug errors

khkramer commented 9 years ago

I replaced the tilemap script, the opengl errors are gone now but now only autotiles and events are rendered.

While indoor maps still seem to be fine.

Also does mkxp allow games rendering at higher than 640x480 since I can't seem to do so.

alt

It renders like this on the regular rgss player though:

alt

Ancurio commented 9 years ago

Can you set a breakpoint on arbDebugFunc in debuglogger.cpp and tell me where the mkxp code is calling the GL from?

Also, can you provide me with your modified Scripts.rxdata so I can reproduce this locally? Otherwise it's going to be hard to diagnose the exact problem origin.

Also does mkxp allow games rendering at higher than 640x480 since I can't seem to do so.

No, RGSS doesn't allow that. Games that render at higher resolution either use visual tricks, or manipulate the window outside RGSS with via Win32 calls.

khkramer commented 9 years ago

I don't think I can set breakpoints as I cross-compiled the .exe on Lubuntu.

Here's my current scripts.rxdata but it's still dependant on Win32API for a few small things though.

I managed to get 1280x720 resolution in the end by editing Graphics.cpp and recompiling, is there a way to get the resolution value from the config file or the scripts?

Ancurio commented 9 years ago

You can define new config file entries in config.cpp/h.

khkramer commented 9 years ago

Thanks.

I want to include you in the game credits, because if you hadn't made mkxp our game would've been doomed.

How you would prefer to be mentioned in the credits?

Ancurio commented 9 years ago

Wait, so you did manage to make the Tilemap work?

khkramer commented 9 years ago

No, not yet.

How can I generate a GDB file for MKXP so I could set the breakpoint you mentioned?

Ancurio commented 9 years ago

(I'm assuming you're using cmake) To enable debugging symbols, run cmake -DCMAKE_BUILD_TYPE=Debug. Do you have a gdb installation ready on your target system?

khkramer commented 9 years ago

When I start the game with GDB I can't really continue since I'm getting this:

Program received signal SIGILL, Illegal instruction.

And the game freezes before it even started, no problems whatsoever without the debugger though.

sorlok commented 9 years ago

At that point, you should be able to run "bt" or "bt full" to get a backtrace, which should point you to the code that generated the illegal instruction.

Ancurio commented 9 years ago

@khkramer From googling it seems that you can bypass this by typing handle SIGILL nostop noprint into gdb before starting the program. However, from debugging a different Pokemon Essentials game from another user which also triggers these GL errors, I think I already know where they're originating from, so that should be fixed in a later commit. However fixing these GL erros should not change what you're seeing on screen.

khkramer commented 9 years ago

That's weird.

My guess was that they'd be the cause of the 'faulty' rendering, the only part I really need from the Essentials tilemap though is the 'connections' between maps.

khkramer commented 9 years ago

Found an alternative tilemap script that does work.