Giter VIP home page Giter VIP logo

mkxp's Introduction

mkxp

Discord community: https://discord.gg/A8xHE8P
Matrix space: https://matrix.to/#/#rpgmaker:mapleshrine.eu
Further links: https://mapleshrine.eu

mkxp is a project that seeks to provide a fully open source implementation of the Ruby Game Scripting System (RGSS) interface used in the popular game creation software "RPG Maker XP", "RPG Maker VX" and "RPG Maker VX Ace" (trademark by Enterbrain, Inc.), with focus on Linux. The goal is to be able to run games created with the above software natively without changing a single file.

It is licensed under the GNU General Public License v2+.

Prebuilt binaries

Linux / Windows
OSX by Ali

Should I use mkxp

mkxp primarily targets technically versed users that are comfortable with Ruby / RGSS, and ideally know how to compile the project themselves. The reason for this is that for most games, due to Win32-API usage, mkxp is simply not a plug-and-play solution, but a building block with which a fully cross-platform version can be created in time.

Bindings

Bindings provide the glue code for an interpreted language environment to run game scripts in. Currently there are three bindings:

MRI

Website: https://www.ruby-lang.org/en/

Matz's Ruby Interpreter, also called CRuby, is the most widely deployed version of ruby. If you're interested in running games created with RPG Maker XP, this is the one you should go for. MRI 1.8 is what was used in RPG Maker XP, however, this binding is written against 2.0 (the latest version). For games utilizing only the default scripts provided by Enterbrain, this binding works quite well so far. Note that there are language and syntax differences between 1.8 and 2.0, so some user created scripts may not work correctly.

For a list of differences, see: http://stackoverflow.com/questions/21574/what-is-the-difference-between-ruby-1-8-and-ruby-1-9

This binding supports RGSS1, RGSS2 and RGSS3.

mruby (Lightweight Ruby)

Website: https://github.com/mruby/mruby

mruby is a new endeavor by Matz and others to create a more lightweight, spec-adhering, embeddable Ruby implementation. You can think of it as a Ruby version of Lua.

Due to heavy differences between mruby and MRI as well as lacking modules, running RPG Maker games with this binding will most likely not work correctly. It is provided as experimental code. You can eg. write your own ruby scripts and run them.

Some extensions to the standard classes/modules are provided, taking the RPG Maker XP helpfile as a quasi "reference". These include Marshal, File, FileTest and Time.

This binding only supports RGSS1.

Important: If you decide to use mattn's oniguruma regexp gem, don't forget to add -lonig to the linker flags to avoid ugly symbol overlaps with libc.

null

This binding only exists for testing purposes and does nothing (the engine quits immediately). It can be used to eg. run a minimal RGSS game loop directly in C++.

Dependencies / Building

  • Boost.Unordered (headers only)
  • Boost.Program_options
  • libsigc++ 2.0
  • PhysFS (latest hg)
  • OpenAL
  • SDL2*
  • SDL2_image
  • SDL2_ttf
  • my SDL_sound fork
  • vorbisfile
  • pixman
  • zlib (only ruby bindings)
  • OpenGL header (alternatively GLES2 with DEFINES+=GLES2_HEADER)
  • libiconv (on Windows, optional with INI_ENCODING)
  • libguess (optional with INI_ENCODING)

(* For the F1 menu to work correctly under Linux/X11, you need latest hg + this patch)

mkxp employs Qt's qmake build system, so you'll need to install that beforehand. Alternatively, you can build with cmake (FIXME: add cmake instructions).

qmake will use pkg-config to locate the respective include/library paths. If you installed any dependencies into non-standard prefixes, make sure to adjust your PKG_CONFIG_PATH variable accordingly.

The exception is boost, which is weird in that it still hasn't managed to pull off pkg-config support (seriously?). If you installed boost in a non-standard prefix, you will need to pass its include path via BOOST_I and library path via BOOST_L, either as direct arguments to qmake (qmake BOOST_I="/usr/include" ...) or via environment variables. You can specify a library suffix (eg. "-mt") via BOOST_LIB_SUFFIX if needed.

Midi support is enabled by default and requires fluidsynth to be present at runtime (not needed for building); if mkxp can't find it at runtime, midi playback is disabled. It looks for libfluidsynth.so.1 on Linux, libfluidsynth.dylib.1 on OSX and fluidsynth.dll on Windows, so make sure to have one of these in your link path. If you still need fluidsynth to be hard linked at buildtime, use CONFIG+=SHARED_FLUID. When building fluidsynth yourself, you can disable almost all options (audio drivers etc.) as they are not used. Note that upstream fluidsynth has support for sharing soundfont data between synthesizers (mkxp uses multiple synths), so if your memory usage is very high, you might want to try compiling fluidsynth from git master.

By default, mkxp switches into the directory where its binary is contained and then starts reading the configuration and resolving relative paths. In case this is undesired (eg. when the binary is to be installed to a system global, read-only location), it can be turned off by adding DEFINES+=WORKDIR_CURRENT to qmake's arguments.

To auto detect the encoding of the game title in Game.ini and auto convert it to UTF-8, build with CONFIG+=INI_ENCODING. Requires iconv implementation and libguess. If the encoding is wrongly detected, you can set the "titleLanguage" hint in mkxp.conf.

MRI-Binding: pkg-config will look for ruby-2.1.pc, but you can override the version with MRIVERSION=2.2 ('2.2' being an example). This is the default binding, so no arguments to qmake needed (BINDING=MRI to be explicit).

MRuby-Binding: place the "mruby" folder into the project folder and build it first. Add BINDING=MRUBY to qmake's arguments.

Null-Binding: Add BINDING=NULL to qmake's arguments.

Supported image/audio formats

These depend on the SDL auxiliary libraries. For maximum RGSS compliance, build SDL2_image with png/jpg support, and SDL_sound with oggvorbis/wav/mp3 support.

To run mkxp, you should have a graphics card capable of at least OpenGL (ES) 2.0 with an up-to-date driver installed.

Dependency kit

To facilitate hacking, I have assembled a package containing all dependencies to compile mkxp on a bare-bones Ubuntu 12.04 64bit installation. Compatibility with other distributions has not been tested. You can download it here. Read the "README" for instructions.

Configuration

mkxp reads configuration data from the file "mkxp.conf". The format is ini-style. Do not use quotes around file paths (spaces won't break). Lines starting with '#' are comments. See 'mkxp.conf.sample' for a list of accepted entries.

All option entries can alternatively be specified as command line options. Any options that are not arrays (eg. RTP paths) specified as command line options will override entries in mkxp.conf. Note that you will have to wrap values containing spaces in quotes (unlike in mkxp.conf).

The syntax is: --<option>=<value>

Example: ./mkxp --gameFolder="my game" --vsync=true --fixedFramerate=60

Midi music

mkxp doesn't come with a soundfont by default, so you will have to supply it yourself (set its path in the config). Playback has been tested and should work reasonably well with all RTP assets.

You can use this public domain soundfont: GMGSx.sf2

Fonts

In the RMXP version of RGSS, fonts are loaded directly from system specific search paths (meaning they must be installed to be available to games). Because this whole thing is a giant platform-dependent headache, I decided to implement the behavior Enterbrain thankfully added in VX Ace: loading fonts will automatically search a folder called "Fonts", which obeys the default searchpath behavior (ie. it can be located directly in the game folder, or an RTP).

If a requested font is not found, no error is generated. Instead, a built-in font is used (currently "Liberation Sans").

What doesn't work (yet)

  • Movie playback
  • wma audio files
  • The Win32API ruby class (for obvious reasons)
  • Creating Bitmaps with sizes greater than the OpenGL texture size limit (around 8192 on modern cards)*

* There is an exception to this, called mega surface. When a Bitmap bigger than the texture limit is created from a file, it is not stored in VRAM, but regular RAM. Its sole purpose is to be used as a tileset bitmap. Any other operation to it (besides blitting to a regular Bitmap) will result in an error.

Nonstandard RGSS extensions

To alleviate possible porting of heavily Win32API reliant scripts, I have added certain functionality that you won't find in the RGSS spec. Currently this amounts to the following:

  • The Input.press? family of functions accepts three additional button constants: ::MOUSELEFT, ::MOUSEMIDDLE and ::MOUSERIGHT for the respective mouse buttons.
  • The Input module has two additional functions, #mouse_x and #mouse_y to query the mouse pointer position relative to the game screen.
  • The Graphics module has two additional properties: fullscreen represents the current fullscreen mode (true = fullscreen, false = windowed), show_cursor hides the system cursor inside the game window when false.

mkxp's People

Contributors

ancurio avatar blacklotus avatar carstene1ns avatar cloudef avatar cremno avatar daverball avatar elizagamedev avatar jaidenalemni avatar lacc97 avatar mathewv avatar mook avatar reinuseslisp avatar urkle avatar vmedea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mkxp's Issues

Porting a VxAce game help!

I'm trying to port a game I'm working on to Linux so that a friend of mine can play it, unfortunately I know nothing of coding, and don't have the slightest idea how to go about using mkxp. I've spent a good few hours searching for any form of tutorial on how to use it, but to no avail. Could someone please help give me a step by step instructions understandable by a newbie like myself, be it working from the files downloadable here, or working off those in TheMirrorLied, if that would be easier to do?

Bitmap blit blending algorithm (bitmapBlit.frag) is not 100% accurate for color values.

According to my personal tests, the resulting alpha value is correct for all inputs (srcAlpha, dstAlpha, bltAlpha*), however, the color value is just an approximation as I have yet to successfully reverse-engineer the algorithm behind it. The approximation is written to favor text display (with eg. manual shadows, or at half opacity) as much as possible, but many visible irregularities remain and the code itself is quite ugly. Note that in case of blitting with bltAlpha = 1.0 on a cleared surface (the vanilla way text is displayed in RMXP games), no blending is necessary and the source is directly copied into the destination (ie. a literal blit).

The color value has 4 inputs: srcColor, dstColor, srcAlpha*bltAlpha and dstAlpha, The results get especially confusing once the alpha values start deviating from 1.0.

(*bltAlpha is the 'opacity' parameter passed into the blt functions, or the alpha value of the font used when drawing text).

Pokemon Essentials tilemap broken

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

adding a 'lib' folder inside the game dir to $LOAD_PATH

Under windows and linux, mkxp's $LOAD_PATH aka $: variable is an empty array []; adding a folder, lib into this array would allow game developers to create custom ruby extensions with native interfaces (eg, written in c/c++ with ruby bindings) and load them from the lib folder with require 'foobar', where foobar is foobar.dll/so/dynlib inside the lib folder.

Implement F12 generated "reset" exception

The 'Graphics' and 'Audio' module will each have to implement their respective reset functions, putting them back into the state they were in right after creation.

The console will probably end up being spammed to death by ruby warnings due to all the redefenitions when executing the game scripts anew. Another option might be to completely shut down ruby and reinitialize it with all the mkxp gear instead, then start executing game scripts again.

More info here (in German): http://www.rpg-studio.de/scientia/RGSS/Reset
Some info on problems in RMXP impl (in Japanese): http://www.tktkgame.com/tkool/memo/rgss/reset.html

OpenGL side roadblocks to GLES2 port

Let me preface this with mentioning that I have zero experience working with ES / on mobile. These are just observations I made while looking at the GLES2 specification and docs.

No 32bit index buffers (only 16 supported on ES2) (_DONE:_ 295e0e5)

The main user of that is Tilemap, where vertex counts often reach multiples of the 16bit limit. This should be resolved with the rewrite to only upload vertices that are on screen.

No PixelStorei(GL_PACK_ROW_LENGTH / SKIP_PIXELS / SKIP_ROWS) support (_DONE:_ b734617) (Allowed when GL_EXT_unpack_subimage present)

Easy to work around, create temporary SDL_Surface as intermediate and SubImage from that.

No VAO support (_DONE:_ efb2fd2) (Allowed when GL_OES_vertex_array_object present)

Creating a meta path that uses VAOs on desktop GL and BindBuffer/AttribPointer calls on ES is probably not worth it. Just use the latter on both platforms.

No framebuffer blits (_DONE:_ a26c739)

This is a big one. Obviously this will have to be emulated on the ES side via quad draws. There's one place (transition rendering) that draws to a renderbuffer, that needs to be converted to texture too.

Npot textures don't support wrapped sampling (GL_REPEAT) (_DONE:_ 20e46a9) (Allowed when GL_OES_texture_npot present)

Used in Plane class. Maybe reuse TileQuads utilities?


If you have any other observations / comments / additions, feel free to add them.

cant cmake on XUbuntu13.10

When I git clone the mkxp and then cd to the directory of it.
I make cmake . ,then it have some errors,I have tried to resolve some.Now it have 3 errors that I can not resolve.

xiaoji@xiaoji-KZ231AA-AB2-a6721cx:~/mkxp$ cmake .
-- checking for module 'physfs>=2.1'
-- package 'physfs>=2.1' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:81 (pkg_check_modules)

-- checking for module 'SDL2_ttf'
-- package 'SDL2_ttf' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:83 (pkg_check_modules)

-- checking for module 'SDL_sound'
-- package 'SDL_sound' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:85 (pkg_check_modules)

-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- program_options
-- Configuring incomplete, errors occurred!

I have install libphysfs1 libphysfs-dev libsdl-sound1.2 libsdl-sound1.2-dev libsdlttf2.0-0 libsdl-ttf2.0-dev

Audio narrations/dialogs do not always play till the end

I have seen this issue with some games and I'm not sure what exactly causes them, but in case a game has an audio narration or dialog, sometimes it plays completely, sometimes it stops at near the end.
The odd thing is that it does not always happen, it happens once, you quit mkxp, run it again, it does not happen, quit it, run it again and this time it stops playing at another time!
I have a guess that it is somehow related to events and their stop time, but I don't know how to make sure.
Here is a free demo of a game having this issue just after starting a new game:
http://freebirdgames.com/forum/index.php?topic=5543.0
(It requires some script fixes to make it compatible with mkxp, I can send the fixes to you if you don't have time for it).
It happens with both my builds of mkxp and the one from To The Moon's official Mac port.

RGSS3: Add BGM/BGS fade-in effect when resuming playback with pos!=0

I kinda forgot to add that when doing the RGSS3 Audio work. The fade-in progresses over one second, and the volume doesn't rise linearly, but by square-ly:

float fadeVolume = prog*prog; // with prog [0;1]

bgmpos1

(RMVXA updates the progression every 20ms, but we can just stick to our trusted 10ms interval).

Inconsistent button codes

I have added this simple code in the update method of Scene_Map:
Array.new(30){|index| index}.each { |i|
if Input.trigger?(i)
print i
return
end

I got very strange results!
A = 17
Z = 18
D = 16
S = 15
Q = 14
W = 11
X = 12
C = 13
Esc = 12
Space = 13
Shift = 11
CTRL = 22
ALT = 23
F5 = 25
F6 = 26
F7 = 27
F8 = 28
F9 = 29
Down = 2
Up = 8
Left = 4
Right = 6

Note only all letters except C has a wrong code with respect to https://github.com/Ancurio/mkxp/blob/master/src/input.h, some aren't even supposed to be supported like Space which triggers a C. I have been unable to find a key which triggered the code 21 for Shift.

I thought this was related to keyboard region so I switched my Belgian keyboard to US but that didn't affect the results.

Unless you didn't tested your button codes, which I doubt, perhaps it may be related to the Apple Keyboard or Mac OS X in general?

Cannot load Scripts.rxdata

The first script can be successfully read, but when it tries to read the next one, it has 2 situations (both not good):

  1. Crashes on the rb_ary_entry() func. call
  2. No crash, but the data seems corrupt and will be ignored by the program

Thus, the program only executes the script that on the top of the script pack and quits immediately (w/ or w/o SIGSEGV)

The script pack can be read successfully by the following programs:

  • Eb's proprietary RGSS engine
  • MRI 1.9 & 2.0

also, a simple test was done using MRI 2.0's irb...

irb(main):001:0> Marshal.load(IO.binread('Scripts.rxdata')).each { |scr| puts scr.class }
Array
Array
...

Porting from QtCore to libstdc++/boost

QtCore is nice and handy, but at the same time bundles a lot of unused functionality. Using libstdc++ for simple containers and boost for hash/set/program_options allows for a more targeted usage of dependencies.

This is a raw set of notes for porting:

QVector -> std::vector
  Constructor(int size) -> same
  ::operator[] -> same (use size_t for indices)
  ::resize() -> same
  ::size() -> same
  ::count() -> ::size()
  ::constData() -> &vector[0] (::data() is C++11)
  ::data() -> &vector[0]
  ::clear() -> same
  ::append() -> ::push_back()
  ::operator<< -> ::push_back()
  ::reserve() -> same
  ::contains() -> (use std::find)
  ::isEmpty() -> ::empty()
  ::first() -> ::front()

QList -> std::vector (sufficient in most cases)

QStack -> std::stack
  ::pop() -> ::top() + ::pop()

QLinkedList -> std::list
  ::takeFirst() -> ::front() + ::pop_front()
  ::prepend() -> ::push_front()

QHash -> BoostHash (wrapper class)
QSet -> BoostSet (wrapper class)

QByteArray -> std::string
  Constructor(const char *cstr) -> same
  ::constData() -> ::c_str()
  ::operator[] -> same

QSettings -> boost::program_options(?)

qDebug() -> Debug() (#include "debugwriter.h")

Mac OS X Building Instructions

Note: This was originaly an issue ticket about my troubles trying to compile mkxp on Mac OS X. I have succeeded in doing so by now, but I don't know where else I could write the instructions I wanted to share with people, so I wrote them here. Feel free to move them wherever suits you, this issue ticket probably isn't the best place, sorry.

I had a lot of troubles building mkxp on Mac OS X so I'll explain the procedure to everyone interested.

Unfortunately, I'm pretty sure I already forgot some part of what I did. At least you have some kind of guideline to start from! Let me know if you encounter problems building mkxp on Mac OS X using these instructions, I'll check what I did that isn't described here and I'll fix it.

To compile mkxp on Mac OS X, you first need to install MacPort (http://www.macports.org/), because it will help getting some of the depencies.

Use MacPort to install the following dependencies:

  • boost
  • glew
  • zlib
    The syntax is sudo port package, like sudo port boost.

Get libsigc++ sources from their website: http://libsigc.sourceforge.net/ and compile it.
Decompress the archive, then run the following commands:
./configure
make
make install

Do the same for latest pixman that you can find at http://cairographics.org/snapshots/.

Again, the same for:

PhysFS is a bit different, you need Mercurial (http://mercurial.selenic.com/) to be able to download it.
Use the command: hg clone http://hg.icculus.org/icculus/physfs/
Which will create a physfs folder containing the sources. Enter it and build physfs like the previous dependencies.

SDL_Sound is more tricky, you need to use the command:
hg clone http://hg.icculus.org/icculus/SDL_sound/
Which will create a SDL_sound folder. We now need to patch SDL_sound sources with the provided patches for mkxp.
First enter the directory using the command cd SDL_sound.
Then patch the sources using the following command, where, PATH is the path to the folder of your mkxp sources where the pkgconfig.patch lies, for me it is /Users/Malorne/mkxp/patches/SDL_sound:
patch < PATH/pkgconfig.patch
Now you can compile SDL_sound like you did with previous packages.

Now you have all the depencies! Congratulations!
In mkxp root sources folder, use qmake -spec macx-g++.
If everything went fine, you should now have a file called Makefile. Unfortunately, I don't know why but qmake generates a wrong Makefile, at least for Mac OS X.
You have to edit the Makefile to replace "-lGL" by "-framework OpenGL" and "-lboost_program_options" by "-lboost_program_options-mt".

You can now make it, you should then have a mkxp application in the form of a mkxp.app application folder.
You have two possibles ways of running your game with mkxp on OSX.
Either you copy the mkxp executable file that is at mkxp.app/Contents/MacOS/mkxp and you put it at the root of your game files, or you put your game files into the mkxp.app/Contents/Resources/ folder.

I prefer the second way, as it will yield a nice runnable application containing all the required files to run your game, which is the standard way applications are bundled on OSX.

If you encounter any problem building mkxp on Mac OS X, let me know !

I don't get this error at all

Exception `NoMethodError' at (RMX-OS) Script:1322 - undefined method `CON' for #
<RMXOS::Network:0xd5046f8>

It's throwing a no method error for a argument in a method call.

Here's the call in question:

self.send('CON', RMXOS::VERSION, RMXOS::Options::GAME_VERSION)

Here's the self.send method:

def self.send(*args)
      if self.connected?
        message = make_message(*args)
        @socket.send(message + "\n", 0)
      end
    end

SDL_sound-patched-hg vs SDL2_mixer, ideas and questions.

Just doing a bit of reading around, and researching options for adding midi support to mkxp, and I keep on coming back to SDL2_mixer, which I had previously used for midi support in my prior abortive attempt at a native rgss player for linux, so I have to ask regarding the reasoning for using the patched sdl sound library.

Last Scenario

I believe Last Scenario uses the RPG Maker XP.
When I try to play it with mkxp I get this:

ruby:1:in `eval': Section007:289: syntax error, unexpected ( arg, expecting keyword_do or '{' or '('
...s = otherweaponstr > -1 ? str (true) + otherweaponstr * 1.5 ...
... ^
Section007:289: syntax error, unexpected ':', expecting keyword_end
...(true) + otherweaponstr * 1.5 : str
... ^ (SyntaxError)
EventThread termination requested
RGSS thread ack'd request after 0 ms
Shutting down.

I'm not sure if this is some kind of limitation or if this can be fixed.

Providing full keyboard input (Win32API emulation)

The following user32.dll functions are commonly used in scripts to query keyboard keys:

GetKeyState: Queries the current state of a key, and also whether keys such as caps lock are toggled on

GetAsyncKeyState Queries the current state, but also reports whether the key was pressed inbetween calls (so key presses are never missed due to timing)

GetKeyboardState: Like GetKeyState, but copies the state of all virtual key codes into a 256 byte array

The first two functions take Virtual Key Codes as parameters, which from what I understand, act similarly to SDL scancodes (ie. raw identifiers of physical keys, unaffected by keyboard layouts). The first few codes represent the mouse buttons, which are already available via mkxp's Input module extensions.

The way to enable implementing these that I currently have in mind is this: A single new function (let's call it raw_key_states, either under the System or Input module) returns a 512 byte string into which all SDL scancode states are memcpied into. We already keep such a state array anyway, so the new code literally amounts to a few lines.

For GetKeyState, we just translate the windows key code to the corresponding SDL one and return the byte in the array. I'm not sure if it's worth to do extra work for the special GetAsyncKeyState behavior of not missing events; in practice, the RGSS Input functions act like GetKeyState too. As for the state of toggled keys (capslock, numlock etc.), I don't think anyone makes use of this so it's not worth considering either. One thing I'm not sure of yet is how often to retrieve the raw SDL keystate array. In my current code I hook into Graphics.update and refresh one shared array there once per frame. I assume that a game that doesn't call Graphics.update very often or not at all cannot do anything useful anyway, so that shouldn't lead to complications where script code expects completely fresh key states.

For GetKeyboardState one would just iterate through all available Windows Key Codes and write the result of GetKeyState into the provided string buffer.

Here's the tentative patch for mkxp to implement raw_key_states, and here's my current win32api wrapper script that makes use of it.

If you have any comments / ideas / suggestions, please post them!

Problems in RMX-OS, Input.update

def self.update
      # get current language layout
      @language_layout = GetKeyboardLayout.call(0)
      # get new keyboard state
      GetKeyboardState.call(@state)
      # this special code is used because Ruby 1.9.x does not return a char
      # when using String#[] but another String
      key = 0
      @state.each_byte {|byte|
        # if pressed state
        if (byte & DOWN_STATE_MASK) == DOWN_STATE_MASK
          puts 'yoloth'
          # not released anymore
          @released[key] = false
          # if not pressed yet
          unless @pressed[key]
            # pressed and triggered
            @pressed[key] = true
            @triggered[key] = true
            @repeatedKey = key
            @repeatedCount = 0
            puts "pressed key:" + key.to_s
          else
            # not triggered anymore
            @triggered[key] = false
          end
          # update of repeat counter
          if key == @repeatedKey
            @repeatedCount < 17 ? @repeatedCount += 1 : @repeatedCount = 15
          end
          # not released yet
        elsif !@released[key]
          # if still pressed
          if @pressed[key]
            # not triggered, pressed or repeated, but released
            @triggered[key] = false
            @pressed[key] = false
            @released[key] = true
            if key == @repeatedKey
              @repeatedKey = -1
              @repeatedCount = 0
            end
          end
        else
          # not released anymore
          @released[key] = false
        end
        key += 1
        #puts 'key:' + key.to_s
      }
    end

This is the update method in question, it's working fine in vanilla rpgxp, the rpgvx ace player and arc.

The problem is that this piece of code always returns false:

if (byte & DOWN_STATE_MASK) == DOWN_STATE_MASK

While it should return true when a key is being pressed.

I have tried changing several things but none have worked so far.

Missing/Duplicated Autotile issue.

autoglitch

They say a picture is worth a thousand words, so i did a print-screen of my RMXP editor and the game running with the system to show it in action. As my pic says, it appears that the auto-tile fragment in index position 22 is using the one in index position 20.

This occurs within all the other auto-tiles. And you wouldn't really see this unless you used an auto-tile with a sort of 3Dish wall effect. It isn't noticeable with grass or land tiles at all.

bplaced errors out

Not quite an issue with the code, but hosting of the precompiled versions for TML and TTM on bplaced seems to error out when I try to follow the links to them. Any ideas on how they work?

Using MKXP to Port Games

So If I'm trying to port Pokemon Omicron from http://www.pokemonzetaomicron.com to Linux using MKXP. Would I be better off trying to build a solution from the "Mirror Lied" tarball, or compiling myself? Or would there be some sort of in-between recommendation for your average A to B port?

Random graphical glitches on OS X

I'm encountering three unrelated (?) graphical glitches when running mkxp on OS X.

The first two are explained here.

The third issue is that, on occasion, pressing keys will not graphically update the title screen. The sounds will still play, and you can still select other menu options, but the menu graphics don't change. This seems to only last during the title screen.

One of these games uses an rgssad archive, the other doesn't, so that seems to be irrelevant.

I'd be happy to help debug this issue if you need someone to test things out.

Font sizes are broken

Yep.

https://github.com/Ancurio/mkxp/blob/dev/src/font.cpp#L119:

// FIXME 0.9 is guesswork at this point
font = TTF_OpenFontRW(ops, 1, (float) size * .90);

this mostly works when substituting the compiled-in Liberation Sans for Arial, at the default size of 22, but is otherwise horribly broken. I have tried to determine the font scaling factors for both SDL_TTF and RMXP (using the char '_'), using the resulting ratio to compensate for the difference, but it turns out the ratio is different for each font; at the moment I'm just at an dead end. I'm not even sure how RMXP does font rendering (I'd guess DirectWrite??) RMXP uses GDI for font rendering. There must be something like a hint hidden in the metadata on how to scale fonts correctly.

UTF-8 equivalence issue on OS X with pathCache

It seems that RPG Maker/Ruby expect NFC filenames, but OS X normalizes filenames with (an outdated and frozen variant of) Unicode NFD on the filesystem. Here's an article explaining the difference, since I only learned about this topic after experiencing issues with filenames transferred from OS X to Linux.

As a result, the path cache generated by MKXP for files not in RGSS archives on OS X will be incorrect for filenames with decomposed characters (which are very common in Japanese games). Disabling pathCache seems to work around this, but it still seems to randomly cause some graphical issues (sometimes the title screen BG is missing, sometimes the menu doesn't update when the cursor is moved, sometimes it works perfectly; I can't tell if this is actually related to the path cache, but I haven't ever experienced these problems until now).

A suggested fix: OS X comes with a version of libiconv which can handle both NFC UTF-8, which is used by the regular old "utf-8" codec, and OS X's particular variant of NFD, which is used by the "utf-8-mac" codec. When the target host is OS X, all filename data returned by external libraries should be run through iconv to be normalized as NFC. When accessing files, outgoing filenames are automatically normalized by OS X, so iconv shouldn't be necessary for that.

MKXP build for Android

More of an issue tracker than anything else. I'll see if I can get a compile going, and report back on where I can get the code running and broken, and how I can otherwise put off actually getting things done. Anyone who cares to join me, get something running, or take credit for stuff already done can do so here.

GLShim to mobilize MKXP

As I understand it, the bottleneck to port games to mobile platforms be it ARM based linux or pure Android is that MKXP requires Open GL calls. Could we use a project like GLShim, https://github.com/lunixbochs/glshim, to bypass that requirement and open up all sorts of new platforms to play with?

Oh! Ko! issues (possibly general RGSS3 issues)

I'm really impressed by the pace of progress regarding RGSS2 and RGSS3!

I have tried Oh! Ko! game on my latest build of mkxp and it starts fine and the first few scenes are alright, but when you start to control the game some strange blue lines appear, like in this screenshot:
https://app.box.com/s/u9b1ln3vnpo24xteap0a

You can download Oh! Ko! from this link:
https://www.dropbox.com/s/d97obkdobkz2t79/Ko.exe

I know RGSS3 support is still work in progress, I just thought maybe you are not aware of this particular issue.

Missing game files

Every RPG Maker game I try to play, I encounter missing game file errors when running the mkxp players. I don't get this error when I run the default excutable that the game comes with. Is there a way I can fix this?

Correction to WINDOW Class's Cursor Rectangle

Your resident werewolf here, and I recognize what appears to be the basis for the window class due to a very familiar glitch. Can I assume that you may have used Selwyn/Squall's window class script from 2006?

Let me explain.

Selwyn's window class assumes that the cursor rectangle 'border' area is only 1px thick, but RMXP's border was set to use a 2px wide border. Using an RMXP windowskin that uses a 2px wide border is oddly distorted, particularly the right-most side. I experienced it with Selwyn's system and with mkxp.

Selwyn's original version of the cursor rectangle class set up rectangle areas as such:
@rect['cursor_up'] = Rect.new(129, 64, 30, 1)
@rect['cursor_down'] = Rect.new(129, 95, 30, 1)
@rect['cursor_left'] = Rect.new(128, 65, 1, 30)
@rect['cursor_right'] = Rect.new(159, 65, 1, 30)
@rect['upleft'] = Rect.new(128, 64, 1, 1)
@rect['upright'] = Rect.new(159, 64, 1, 1)
@rect['downleft'] = Rect.new(128, 95, 1, 1)
@rect['downright'] = Rect.new(159, 95, 1, 1)
@rect['bg'] = Rect.new(129, 65, 30, 30)

Though it should have been:
# Rectangle Corners
@rect['cursor_up'] = Rect.new(194, 96, 28, 2)
@rect['cursor_down'] = Rect.new(194, 126, 28, 2)
@rect['cursor_left'] = Rect.new(192, 98, 2, 28)
@rect['cursor_right'] = Rect.new(222, 98, 2, 28)
# Rectangle Sides
@rect['upleft'] = Rect.new(192, 96, 2, 2)
@rect['upright'] = Rect.new(222, 96, 2, 2)
@rect['downleft'] = Rect.new(192, 126, 2, 2)
@rect['downright'] = Rect.new(222, 126, 2, 2)
# Rectangle Background
@rect['bg'] = Rect.new(196, 100, 24, 24)

And the routine that Selwyn used to draw the rectangle was unfortunately:
self.bitmap = Bitmap.new(@width, @height)
rect = Rect.new(1, 1, @width - 2, @height - 2)
self.bitmap.stretch_blt(rect, @skin, @rect['bg'])
self.bitmap.blt(0, 0, @skin, @rect['upleft'])
self.bitmap.blt(@width-1, 0, @skin, @rect['upright'])
self.bitmap.blt(0, @height-1, @skin, @rect['downright'])
self.bitmap.blt(@width-1, @height-1, @skin, @rect['downleft'])
rect = Rect.new(1, 0, @width - 2, 1)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_up'])
rect = Rect.new(0, 1, 1, @height - 2)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_left'])
rect = Rect.new(1, @height-1, @width - 2, 1)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_down'])
rect = Rect.new(@width - 1, 1, 1, @height - 2)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_right'])

When again, it should have been:
# Define cursor bitmap
self.bitmap = Bitmap.new(@width, @height)
# Handle background
rect = Rect.new(1, 1, @width - 2, @height - 2)
self.bitmap.stretch_blt(rect, @skin, @rect['bg'])
# Handle corner placement
self.bitmap.blt(0, 0, @skin, @rect['upleft'])
self.bitmap.blt(@width-2, 0, @skin, @rect['upright'])
self.bitmap.blt(0, @height-2, @skin, @rect['downleft'])
self.bitmap.blt(@width-2, @height-2, @skin, @rect['downright'])
# Handle side placement
rect = Rect.new(2, 0, @width - 3, 2)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_up'])
rect = Rect.new(0, 1, 2, @height - 3)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_left'])
rect = Rect.new(2, @height-2, @width - 3, 2)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_down'])
rect = Rect.new(@width - 2, 2, 2, @height - 3)
self.bitmap.stretch_blt(rect, @skin, @rect['cursor_right'])

As you can tell, I do have some insight. If you want a newer 'revised' version with an animated hand cursor, I can supply my version's code too.

-DerVVulfman ( http://save-point.org/ )

Requirements for midi playback support

A library to support midi files in mkxp ideally:

  • accepts events passed with a delta time (not real time)
  • renders audio chunks on demand
  • works fine with longer pauses in between requests to generate chunks
  • has an option to apply a pitch factor to each processed note event
  • (optional) has static utility functions to parse events from the bytestream

The requirement of manually feeding events is there so the "0x6F" control value change event, which marks the loop start, can be detected, and event parsing can be restarted from this position in the byte stream (very cheap, as just a file seek).

libfluidsynth

  • API for loading sound fonts present
  • Is a real time synthesizer, so doesn't really fit the desired model (must be fed events/notes in real time)
  • Pitch on each note event can be manipulated
  • Has a glib2.0 dependency

SDL_Sound / timidity fork

  • Haven't spotted any API for feeding events directly yet
  • Also no API spotted for loading custom sound fonts (maybe via the config file??)

WildMidi

  • Uses GUS patches (no soundfont support)
  • Can open midi files (either by filename, or as memory buffer)
  • No way to feed events directly
  • Not sure if global pitch settable

Unable to use Socket library

Exception `SocketError' at (RMX-OS) Script:771 - getaddrinfo: Either the applica
tion has not called WSAStartup, or WSAStartup failed.

I've googled around for this error but nothing relevant came up.
I've tried recompiling Ruby several times in the hopes that it would fix it but no luck so far.
Here is the output of $LOADED_FEATURES:

["enumerator.so", "G:/Pokemon_NoxMK/lib/zlib.so", "G:/Pokemon_NoxMK/lib/socket.so", "G:/Pokemon_NoxMK/lib/socket.rb"]

It would be great if mkxp support other encoding than UTF-8.

There are still many games that are localized and encoded with charset other than UTF-8 like SHIFT-JIS or euc-kr, but since mkxp only supports UTF-8, many strings are broken thus I cannot play those games. Is there any way to specify encoding manually?

Can´t compile

In file included from /home/khkramer/mkxp-master/src/main.cpp:36:0:
/home/khkramer/mkxp-master/src/gl-fun.h:54:152: error: conflicting declaration ‘typedef void (* GLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*)’
 typedef void (APIENTRY * GLDEBUGPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam);
                                                                                                                                                        ^
In file included from /usr/local/include/SDL2/SDL_opengl.h:80:0,
                 from /home/khkramer/mkxp-master/src/gl-fun.h:25,
                 from /home/khkramer/mkxp-master/src/main.cpp:36:
/usr/local/include/SDL2/SDL_opengl_glext.h:2182:26: error: ‘GLDEBUGPROC’ has a previous declaration as ‘typedef void (* GLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, const void*)’
 typedef void (APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
                          ^
make[2]: *** [CMakeFiles/mkxp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/mkxp.dir/all] Error 2
make: *** [all] Error 2

I'm pretty new to compiling C++ programs, so could this be a mistake on my end?

Issues in Last Scenario

I open this to address every issue I find in the game playing it with mkxp.
1)
In the hex mini games the tiles have a black grid over it.
2)
The status bar that shows information about spells/items/what you just stole/.... is missing
3)
When fighting the "smiley enemy" in the ether well the game crashes sometimes with:

Script 'Scene_Battle 4' line 155: NoMethodError occured.
undefined method 'id' for nil::NilClass

This happens only if I attack with the first character. (this error happens really quite often throughout the game, but the second comment seems to fix it completly.

When flying over the edge of the world(map) you get:

Script 'Sprite_Worldmap_Small' line 54: NoMethodError occured.
undefined method `alpha=' for nil:NilClass

My best guess right now is that it's either different rounding or get_pixel behavior.
Changing line 50 to

if i < 1 or j < 1 or i > 174 or j > 139

solves the issue.
5)
Some tiles are displayed wrong.This mostly happens outside with water tiles.
I will later on post a screenshot and maybe a savestate.(Problem is you can't pass this tiles even though you should be able to)

TABLE class. RMXP's dup and clone params missing

It isn't that the commands aren't present. But their function was to retrieve the data contents is not present. You can try this statement within the Spriteset_Map class to see my point:

p $game_map.data[7,6,0]
my_dup = $game_map.data.dup
p my_dup[7,6,0]

In a normal RPGMaker XP project, this method would twice print the tile ID of a floor tile at the 7/6 location in the map.

However, it runs into a massive problem when run within mkxp. The question I asked myself was... WHY?

As the data field in $game_map is a table, I ran an additional check to ensure the issue was with the Table class.

s1 = Table.new(2,2)
s1[0,0] = 1
s1[0,1] = 2
s1[1,0] = 3
s1[1,1] = 4
p s1[0,1]
s2 = s1.dup
p s2[1,1]

A very simple test. I created a 2x2 table with data in each field. When I ran this within RPGMaker XP, it would retrieve data from both the original and duplicate tables. With mkxp, it again suffered an error. This again puzzled me. I looked at some info on the Table class, and it was a child class of the Object class that has both .dup and .clone commands......

So I did one more test. You COULD get a response from the below version, returning that a table exists...

s1 = Table.new(2,2)
s1[0,0] = 1
s1[0,1] = 2
s1[1,0] = 3
s1[1,1] = 4
p s1
s2 = s1.dup
p s2

And there in gave me an answer. I could get a response with both .dup and .clone indicating that it was actually copying the whole table itself. But once you try to retrieve contents from the duplicated/cloned table, you get an error. Both dup and clone were supposed to return a table with the contents, but that was where it failed. It duplicated the table, but not the contents as it is supposed to

It would have been nice if the 'Standard Library / Built-In Classes' part of the RMXP help file mentioned that the Table class was a child of the Object class. I tested the other object children and most are working fine. ;) Well, mebby not the Font class (duh), and I honestly wouldn't know how to test the IO, Viewport or Window classes. :P

[Compile] The compiler complains about OpenAL stuff

I'm using debian sid with OpenAL 1.14, g++ 4.8
It gives me the following error message:

[  1%] Building CXX object CMakeFiles/mkxp.dir/src/audio.cpp.o
In file included from /home/user/src/mkxp/src/al-util.h:26:0,
                 from /home/user/src/mkxp/src/audio.cpp:29:
/usr/include/AL/alext.h:139:22: error: ISO C++ forbids declaration of ‘ALCboolean’ with no type [-fpermissive]
 typedef ALCboolean  (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context);
                      ^
/usr/include/AL/alext.h:139:22: error: typedef ‘ALCboolean’ is initialized (use decltype instead)
/usr/include/AL/alext.h:139:22: error: ‘ALC_APIENTRY’ was not declared in this scope
/usr/include/AL/alext.h:139:35: error: ‘PFNALCSETTHREADCONTEXTPROC’ was not declared in this scope
 typedef ALCboolean  (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context);
                                   ^
/usr/include/AL/alext.h:140:9: error: ‘ALCcontext’ does not name a type
 typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void);
         ^
In file included from /home/user/src/mkxp/src/al-util.h:26:0,
                 from /home/user/src/mkxp/src/audio.cpp:29:
/usr/include/AL/alext.h:282:9: error: ‘ALCdevice’ does not name a type
 typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*);
         ^
/usr/include/AL/alext.h:283:21: error: ISO C++ forbids declaration of ‘ALCboolean’ with no type [-fpermissive]
 typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
                     ^
/usr/include/AL/alext.h:283:21: error: typedef ‘ALCboolean’ is initialized (use decltype instead)
/usr/include/AL/alext.h:283:21: error: ‘ALC_APIENTRY’ was not declared in this scope
/usr/include/AL/alext.h:283:34: error: ‘LPALCISRENDERFORMATSUPPORTEDSOFT’ was not declared in this scope
 typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum);
                                  ^
/usr/include/AL/alext.h:284:27: error: expected ‘)’ before ‘*’ token
 typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei);
                           ^
make[2]: *** [CMakeFiles/mkxp.dir/src/audio.cpp.o] Error 1
make[1]: *** [CMakeFiles/mkxp.dir/all] Error 2
make: *** [all] Error 2

Using Qmake will produce the same error

GL debug warnings emitted from glBlitFramebufferEXT

Console output

Tikilou, I need you to create a core dump at the point where the warnings are emitted. To do that, start the executable through gdb:

gdb ToTheMoon.amd64

set a breakpoint at the debug message proc:

break DebugLoggerPrivate::writeLine

then run the game by typing r end pressing enter. Shortly after the game should freeze as the debug point is reached (and the gdb prompt appears again) saying something like "breakpoint 1 reached". Now dump the core:

generate-core-file

which will generate a file named "core." (you can quit gdb by entering q then y). Please upload it somewhere and post it here.

Can't compile it !

After install all depends and qmake, on Ubuntu 13.04 or ArchLinux, same problem :

tikilou@tikilou-desktop:~/mkxp$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_KEYWORDS -DBINDING_MRI -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -Isrc -Iruby/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/GL -I/usr/include/pixman-1 -I/usr/local/include/SDL2 -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o main.o src/main.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_KEYWORDS -DBINDING_MRI -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -Isrc -Iruby/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/GL -I/usr/include/pixman-1 -I/usr/local/include/SDL2 -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o audio.o src/audio.cpp
In file included from src/audio.cpp:27:0:
src/filesystem.h:74:13: erreur: invalid abstract return type for member function ‘FileStream FileSystem::openRead(const char_, FileSystem::FileType)’
src/filesystem.h:31:7: note: because the following virtual functions are pure within ‘FileStream’:
In file included from src/filesystem.h:25:0,
from src/audio.cpp:27:
/usr/include/SFML/System/InputStream.hpp:59:19: note: virtual sf::Int64 sf::InputStream::read(char_, sf::Int64)
src/audio.cpp:53:13: erreur: cannot declare field ‘MusicEntity::currentData’ to be of abstract type ‘FileStream’
In file included from src/audio.cpp:27:0:
src/filesystem.h:31:7: note: since type ‘FileStream’ has pure virtual functions
src/audio.cpp: In member function ‘void MusicEntity::play(const QByteArray&, int, int)’:
src/audio.cpp:126:80: erreur: cannot allocate an object of abstract type ‘FileStream’
In file included from src/audio.cpp:27:0:
src/filesystem.h:31:7: note: since type ‘FileStream’ has pure virtual functions
src/audio.cpp: In member function ‘sf::SoundBuffer& SoundEntity::allocateBuffer(const char_)’:
src/audio.cpp:438:62: erreur: cannot allocate an object of abstract type ‘FileStream’
In file included from src/audio.cpp:27:0:
src/filesystem.h:31:7: note: since type ‘FileStream’ has pure virtual functions
src/audio.cpp:437:15: erreur: cannot declare variable ‘data’ to be of abstract type ‘FileStream’
In file included from src/audio.cpp:27:0:
src/filesystem.h:31:7: note: since type ‘FileStream’ has pure virtual functions
make: *_* [audio.o] Erreur 1

Proper method to convert .mid audio?

I had previously converted the midi audio for RMXP to ogg for the sake of my PlayOnLinux wrapper script, but it seems mkxp doesn't like the way I did it. I don't suppose you have any suggestions?

mkxp find only *.mp3 files when using filenames without extension

I try to port a RPG Maker XP game but some resources is in a shared directory "c:/Program Files/Common Files/Enterbrain/RGSS/Standard/".
This shared directory contains some jpg, png and ogg files, but when I copy the ogg files in the work directory, the game can not find the file. If I rename an ogg file by setting the extension to mp3, there is a SDL_sound error, if I convert the ogg file to mp3 file, it is working fine.

Make SDL_sound as shared library

Because mkxp need a modified SDL_sound library, why may not we compile it as a shared library (in ./lib for example) ?
I think this should be interresting because we could make some hacks in SDL_sound and timidity++ code (like you say to not have a config file hard coded in the system dir).

Font objects should accept either a string or an array of strings for their "name" property

From the spec:

The font name. The default is "MS PGothic".
Include an array of strings to specify multiple fonts to be used in a desired order.

Currently, only strings are accepted. The easy solution would be to process a passed array in the binding, and only forward the first available font name to core mkxp.

The "correct" solution would be to actually turn the "name" property into a string array. This comes with a whole lot of other problems though (eg. what to do when the array contains non-string objects), as I see no way to cleanly translate this behavior to C++.

Cmake doesn't read my installed packages

-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- checking for module 'sigc++-2.0'
-- found sigc++-2.0, version 2.4.0
-- checking for module 'pixman-1'
-- found pixman-1, version 0.32.6
-- checking for module 'physfs>=2.1'
-- package 'physfs>=2.1' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:341 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
CMakeLists.txt:88 (pkg_check_modules)

-- checking for module 'vorbisfile'
-- found vorbisfile, version 1.3.4
-- checking for module 'sdl2'
-- found sdl2, version 2.0.3
-- checking for module 'SDL2_ttf'
-- found SDL2_ttf, version 2.0.12
-- checking for module 'SDL2_image'
-- found SDL2_image, version 2.0.0
-- checking for module 'SDL_sound'
-- package 'SDL_sound' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:341 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
CMakeLists.txt:93 (pkg_check_modules)

-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- program_options
-- Found OpenAL: /usr/lib64/libopenal.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- checking for module 'ruby-2.1'
-- package 'ruby-2.1' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:341 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
CMakeLists.txt:284 (pkg_check_modules)

-- Configuring incomplete, errors occurred!

I have the libraries and development files of all of these packages, but cmake is unable to read it. I would try using qmake, but Fedora 21 doesn't yet have a package for it. Is there a way you can add a normal configure script into the master branch?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.