Not logged inGosu Forums
Forum back to Help Search Register Login
Up Forum
Topic "QuickRPG" remake By DivineDominion Date 2009-08-01 12:53
Sorry mates, vacation was over but now I've got time again.  Of course that's a lame excuse for not supporting you, I'm really sorry for that!

I wonder why I didn't include the 'fps.rb' file in the repository ... that's really stupid.  I changed the source a lot since then, like implementing event dispatching and sending messages between the various parts of the game logic.  Since then, my 'fps.rb' is way too much altered to work with the old GitHub source. 

The new bundle is just not finished yet.  I'll work on it soon after I finish my last essay for university.

You can download a 2x-movement-speed patch with fixed main.rb included (same file as further down in this post).


Well, speeding up the character really won't be that easy.  The old code relies on the tiles being 16 pixels in each direction.  Animation takes 16 steps, the character moves 16 pixels during each cycle, the camera scrolls 16 pixels as well when triggered (there's no direct link between char movement and map scrolling, they just behave the same :)).

When I finish my current setup, it should by far be easier to modify movement speed.

For now, download the modified files and overwrite the old ones.  The FPS-fix is already included.  The char moves twice as fast then.  I think the real problem is the graphics' sizes and the huge map.  On no console would you find that big a map, it just takes too long to travel and there's too much space between stuff.  I'll fix contents when the engine is ready.


Here's the changes to apply manually:

REPLACE 'player.rb'
class Player < Char
  def initialize(image)
    super(0, 0, image)
  def update
    animate! if animating?

    walk! if walking?
    if @step >= 16
      @step = 0
      @step += 2
    return [@x, @y]
  def walk!
    raise "not walking" unless walking?
    if @step >= 16
      @walking = false
      return :finished
    # Move on screen
    case @direction
    when :up
      @y_off -= 2
    when :down
      @y_off += 2
    when :left
      @x_off -= 2
    when :right
      @x_off += 2
    if @y_off < 0
      @y_off += 16
      @y -= 1
    elsif @y_off > 15
      @y_off -= 16
      @y += 1
    if @x_off < 0
      @x_off += 16
      @x -= 1
    elsif @x_off > 15
      @x_off -= 16
      @x += 1

map.rb : ll. 391 -- 409, replace 'Map::animate_scrolling'
  def animate_scrolling
    if @steps >= TILE_SIZE
      @scrolling = false
      return :finished
    case @direction
    when :up
      @scrolled_y -= 2
    when :down
      @scrolled_y += 2
    when :left
      @scrolled_x -= 2
    when :right
      @scrolled_x += 2
    @steps += 2
Topic Mac deployment using the .app template w/o gosu doesn't work By DivineDominion Date 2009-03-26 11:22
Oh well, that's stupid of me, I think. Probably you should rename the template to "... Template in which you have to put gosu.bundle and all your sources + media to have a" :)
Topic Mac deployment using the .app template w/o gosu doesn't work By DivineDominion Date 2009-03-26 00:52

I "deployed" my current project using the .app template shipped with gosu for Mac. On my machine, everything runs like a charm -- although "ruby" points to ruby 1.9.x (which doesn't work from the shell) and I have to invoke /usr/bin/ruby manually for 1.8.6 -- but in the end I have no clue how the template works whatsoever, so nevermind.

However, the .app doesn't start on a friends machine. It's hard to tell why: he has a 1yr old MacBook Pro (OS 10.5.6) without XCode installed. Another guy I know has XCode and had to run "gem install gosu" to launch my application. After all: what is the .app template good for if it's not running on machines without gosu installed? :)

Topic "QuickRPG" remake By DivineDominion Date 2009-03-26 00:42
Good point :)


Please keep in mind that I didn't translate the texts to English yet (picture #2). They don't mean anything, though, so don't worry.

I didn't point out that the game's native resolution was 320x240 and I didn't bother to implement 2x (or more) zoom after rendering just yet. If it's not playable for you at all (no speed limit might be an issue as well *sigh*) just drop me a line with the reason and I'll try to fix it soon :)
Topic "QuickRPG" remake By DivineDominion Date 2009-03-24 15:25
[] []

Back in 2001 it took me a week to create an RPG walkaround-demo in Blitz Basic. I never finished anything comparable after that.

It took me 2 days with Ruby and gosu to re-create the engine. I had no original source left, so it took me a while to figure out how I saved the maps, how the scripts worked and such. Still I'm not sure how NPC walking cycles used to be configured.

You can grab the current source from my project where I put the old Win32 binary -- which shouldn't run on your PC since it attempts 320x240 in fullscreen mode (!!! what a stupid idea that was ...). 640x480 was supported as well but I lost the binary. The OSX .app is obviously new and works fine.

If you like you could as well modify the contents of this walkaround demo by taking a look at the scripts. Without a map editor it's not possible to create new maps. Take a look at the project Wiki on where I might explain the .map format in the future.

As of today, 2009-03-24, the code was a lot of "hacking". Blitz Basic, the game's initial language, didn't support OOP so there's a huge gain of readability and structure. Yet, I just wanted to re-implement every feature possible. Refactoring will be the next item on my to do list right after "figure out how NPC-initialization scripts work" and "time animations (i.e. slow down)". :)

Comments appreciated, though I doubt you'll be able to make it through that code just yet.


From project (cutting edge!)
Packed qrpg.tar.gz (updated regularily but not as often as the github repository)
Patch (NEW): FPS.rb missing, 2x movement speed:

Later modifications to this post

Okay, download on doesn't work or so it seems. Added a TAR.GZ archive.

Added two small screenshots of the current app. You can trigger FPS count by hitting "F" and the on-map-debugging-stuff by hitting "D".
The archive only contains the deployed Mac OS X .app file. To get the sources, please use the link to and download everything from there, seems
to work again.

Translated game content and added NPC movement. They don't collide, though. I'll OOP-ify the game further to implement this.

Added a patch for faster char movement and fixed that 'fps.rb' was missing in the archive.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill