Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
1 2 3 Previous Next  
Search
Topic Map scrolling nightmare... By kyonides Date 2017-09-09 17:13
Guess what? I solved it, not thanks to you, guys -_- (Yeah, I'd say I'm a bit disappointed here... but the truth is that I ended up not needing your help at all! (Tongue sticking out XP))

I'm posting this as a second part of my "sorrowful scripting" story, you'll see it does make sense after all!

As I told some guy better known as DerVVulfman last night a solution we both had found long time ago for map scrolling would NOT work on KUnits Gosu, that truth hasn't changed, BUT some creativity was needed to solve this mystery. I had partially found a way to solve it.

# Pressing Down Arrow
@offset_y = [-@screen_y + 608 / 1.08, 0].min# Works but only if you hit the lower edge of the game window then you'd make it scroll

# Pressing Right Arrow
@offset_x = [-@screen_x + 800 / 1.042, 0].min# Works but only if you hit the right edge of the game window then you'd make it scroll

Don't ask me why they had to be those values or else the minimum command wouldn't ever work! (I tried replacing the screen coordinate plus the dimension divided by a weird value with an 8, it automatically chose 0 as result, changing it to max became a new nightmare! The map either got scrolled to the left hand side almost EXPONENTIALLY or a sign change in reverted it by pushing the map to the right hand side making it arrive in Japan!)

But there's always a catch...

What if in some case like when the offset is decreasing (by adding 8 to its actual value) or the remainder (2px?) was possible in one situation? I started trying to make it work and it didn't take me long to noticed it was perfect... almost.

# Pressing Left Arrow
@offset_x += [8, -@offset_x].min if @offset_x < 0 and @screen_x - @offset_x < Map.width * 32

Yes, every single tile is 32 pixels wide and high as well. Multiplying the corresponding dimension sounds quite logical... but not to our dear Ruby Gosu engine! It made the player vanish unless IT, not the player's sprite character, got close to the left edge of the game window. Then I thought I had to define it as Map.width * 16 so it would only do it if the offset was less than half the current map's width... It messed it up as well.

After several attempts I found out the perfect value HAD to be 23.5 and it would work on ANY map that was larger than the minimum width (25 tiles * 32 pixels). Minimum sized maps wouldn't complain at all. (Shocked)

I still had a serious issue to solve, how could I make it stop waiting for the sprite to hit the opposite edge before it scrolled right? (Or to the right hand side?) I wasn't slow at all, I quickly thought a conditional statement would take care of that important job! I was WRONG! (Ticked off) I messed up once again!

Then I had a clever idea, what if the solution I applied to it's opposite direction had a clue on what to do to fix the latter?

@offset_x -= [-8, @offset_x].min if @offset_x < 0 and @screen_x - @offset_x > Map.width * 26 # Yeah I first tried with 26 for a reason I've forgotten...

How weird! It didn't help me, the screen jumped suddenly without warning! How crappy! (Happy with a sweat)

Nope, 0 would make the jump look even more extreme, as much as to beat any X-Gamer while trying to break his bones while flying briefly in the air before dropping onto the floor hitting his legs or arms hard against it...

There was a revelation finally! (Very happy + Tongue sticking out) I had to modify it slightly so it would actually help me there solving my issue.

@offset_x = [@offset_x - 8, @offset_x-@offset_x].min if @offset_x < 0 and @screen_x - @offset_x > Map.width * 26

Got close... but not enough to what people would actually expect, something was missing... (Confused)

Gotcha! I had to include a calculation included in XP, that's all I had to do!

@offset_x = [[@offset_x - 8, @offset_x-@offset_x].min, (Map.width - 25) * 32].max if @offset_x < 0 and @screen_x - @offset_x > Map.width * 26

It should work fine now for sure, I took into account that Gosu has no such real_x coordinates so I had to multiply it by the actual tile width. Wait a minute! (Ticked off) Where did my stupid map go? It looked like it did break through to the other side, whatever that was! (Feeling sick)

After a while I had found an "imperfect solution", but it WAS a solution after all!

@offset_x = [[@offset_x - 8, @offset_x-@offset_x].min, -(Map.width - 25) * 32].max if @offset_x < 0 and @screen_x - @offset_x > Map.width * 26

Say what? (Happy with a sweat) "How's that gonna help you at all?" you may ask me now. Well, it sure did! Yeah, I DO mean it! It took it a few more pixels to react than expected but no signs of oblivion was ever seen!

But how could I make it react soon enough as if I had gone through an invisible trigger right in the middle of the game window? That was the moment when I started fiddling with the map width value by increasing or decreasing it over and over again...

@offset_x = [[@offset_x - 8, @offset_x-@offset_x].min, -(Map.width - 25) * 32].max if @offset_x < 0 and @screen_x - @offset_x > Map.width * 12.75

Yeah! I DID IT! (Winks) I still don't know what the best value was 12.75, but it sure works fine! (Laughing + Tongue sticking out)

And for a while this early morning (like till 2 o'clock) I was happy with the result until I found out something was missing there... Indifferent

No, wait a second! (Shocked) My second scripting epiphany had arrived! Laughing A missing part was not the ACTUAL issue here, but an extra part was indeed! (Happy with a sweat)

@offset_x = [@offset_x - 8, -(Map.width - 25) * 32].max if @offset_x < 0 and @screen_x - @offset_x > Map.width * 12.75

Yeah, guys, the part inbetween was completely useless at that point... (Happy with a sweat)

Hold on! I clearly stated earlier that such basic solution we scripters knew all about didn't help me there at all, didn't I? And you know what, I wasn't lying, I just ignored why it didn't and never would. My solution was completely customized and that's how it should have been from the very beginning! Shocked

But what did I do? (Sarcasm)

First of all it's not that similar, I don't call the map to get any scrolling variable, and I skipped any unnecessary calculations and I never ADD the current distance, which is easily determined in my project, it's always 8 (most of the time (Laughing + Tongue sticking out) ). Oh and I substract the extra tiles width as well!

MYSTERY SOLVED! Ruby Gosu does never add distance to move everything on screen, it substract all values in a flip! (Shocked)

Solving the issue with the map's height was no problem at all! A real piece of cake! (Very happy + Tongue sticking out)

Was it? (Confused)

Take a look at the actual scrolling code and see by yourself if that was an accurate statement or not.

class Player
  def update
   return if @halt
   @last_x = @screen_x
   @last_y = @screen_y
   return if moved?
   if Gosu.button_down?(Gosu::KbDown)
     @dir = @other_way ? 8 : 2
     return unless pass?
     @y += 0.5
     @screen_y = @y * 16
     @offset_y = [@offset_y - 8, -(Map.height - 19) * 32].max if @screen_y > Map.height * 8
     update_steps
   elsif Gosu.button_down?(Gosu::KbUp)
     @dir = @other_way ? 2 : 8
     return unless pass?
     @y -= 0.5
     @screen_y = @y * 16
     @offset_y += [8, -@offset_y].min if @offset_y < 0 and @screen_y - @offset_y < Map.height * 32
     update_steps
   elsif Gosu.button_down?(Gosu::KbLeft)
     @dir = @other_way ? 6 : 4
     return unless pass?
     @x -= 0.5
     @screen_x = @x * 16
     @offset_x += [8, -@offset_x].min if @offset_x < 0 and @screen_x - @offset_x < Map.width * 23.5
     update_steps
   elsif Gosu.button_down?(Gosu::KbRight)
     @dir = @other_way ? 4 : 6
     return unless pass?
     @x += 0.5
     @screen_x = @x * 16
     @offset_x = [@offset_x - 8, -(Map.width - 25) * 32].max if @screen_x > Map.width * 12.75
     update_steps
   end
   if button_down?(:enter) or button_down?(:return)
     Map.events.each do |event|
     blocked = block_pass?(event)
     next unless blocked
     event.react_now if event.react
     if event.button?
       event.activate
       @halt = true
       return
     end
   end
  end
end

class SceneMap
  def update_scene
    if @map_ticks > 0
      @map_ticks -= 1
      @map_texts.clear if @map_ticks == 0
    end
    @player.update
    @offset_x = @player.offset_x
    @offset_y = @player.offset_y
    Map.events.each {|e| e.update }
    @spriteset.update
    if press_quit?
      Game.cancel_se.play
      Game.setup(SceneKUnitsMenu)
      return
    elsif button_down?(:left_ctrl)
      Game.ok_se.play
      Game.setup(SceneKUnitsAchieve)
    elsif button_down?(:caps_lock)
      Game.ok_se.play
      Game.setup(SceneKUnitsFoes)
    elsif button_down?(:left_shift)
      Game.ok_se.play
      Game.setup(SceneKBookPages, id: 1)
    end
  end

  def draw
    @window.clip_to(0,0,@window_width,@window_height) do
      @window.translate(@offset_x,@offset_y) do
        @spriteset.draw
      end
    end
    @map_texts.each {|text| text.draw }
  end
end
Topic Map scrolling nightmare... By kyonides Date 2017-09-09 17:03
I was trying to implement a map scrolling system thanks to Gosu's translate method that semiautomatically handles tiles and events offsets making it easier for game developers to handle more ordinary stuff than usual while drawing a map. Sadly you end up watching how my player and his not so heroic team makes the map look larger and darker than expected. I'm not really used dealing with scrolling issues so I thought somebody here could tell me what I'm doing wrong here hopefully... For now solving the issue with the horizontal map scroll should suffice. I only commented those lines that somehow affect map scrolling.

This happens when I go left... (Those two lonely tiles denote the actual end of the map on the righthand side.) (Check out the first image I attached.)

And this is the disaster that takes place if I go right... (Take a look at the second screenshot if you ever dare...)

class Player
  def update
    return if @halt
    @last_x = @screen_x
    @last_y = @screen_y
    return if moved?
    if Gosu.button_down?(Gosu::KbDown)
      @dir = @other_way ? 8 : 2
      return unless pass?
      @y += 0.5#actual_speed
      @screen_y = @y * 16
      update_steps
    elsif Gosu.button_down?(Gosu::KbUp)
      @dir = @other_way ? 2 : 8
      return unless pass?
      @y -= 0.5#actual_speed
      @screen_y = @y * 16
      update_steps
    elsif Gosu.button_down?(Gosu::KbLeft)
      @dir = @other_way ? 6 : 4
      return unless pass?
      @x -= 0.5#actual_speed
      @screen_x = @x * 16
      ### Calculating the horizontal offset, Current direction: Left (4)
      @offset_x = [0, -@screen_x].min if @screen_x < Map.width * 16
      update_steps
    elsif Gosu.button_down?(Gosu::KbRight)
      @dir = @other_way ? 4 : 6
      return unless pass?
      @x += 0.5#actual_speed
      @screen_x = @x * 16
      ### Calculating the horizontal offset, Current direction: Right (6)
      @offset_x = [[-@screen_x + @last_x, -Map.width * 16].max, 0].min if @screen_x > Map.width * 16
      update_steps
    end
    if button_down?(:enter) or button_down?(:return)
      Map.events.each do |event|
        blocked = block_pass?(event)
        next unless blocked
        event.react_now if event.react
        if event.button?
          event.activate
          @halt = true
          return
        end
      end
    end
  end
end

class SceneMap
  def update_scene
    @offset_x = @player.offset_x # saving last horizontal offset
    @offset_y = [-@player.screen_y + @window_height / 1.08, 0].min
    if @map_ticks > 0
      @map_ticks -= 1
      @map_texts.clear if @map_ticks == 0
    end
    @player.update # Calling Player's Update Method and setting a new horizontal offset value
    Map.events.each {|e| e.update }
    @spriteset.update
    if press_quit?
      Game.cancel_se.play
      Game.setup(SceneKUnitsMenu)
      return
    elsif button_down?(:left_ctrl)
      Game.ok_se.play
      Game.setup(SceneKUnitsAchieve)
    elsif button_down?(:caps_lock)
      Game.ok_se.play
      Game.setup(SceneKUnitsFoes)
    elsif button_down?(:left_shift)
      Game.ok_se.play
      Game.setup(SceneKBookPages, id: 1)
    end
  end

  def draw
    @window.clip_to(0,0,@window_width,@window_height) do # Some sort of Viewport singleton command
      @window.translate(@offset_x,@offset_y) do # Scroll loop
        @spriteset.draw
      end
    end
    @map_texts.each {|text| text.draw }
  end
end
Attachment: kunitsgosumaperror01.png - RIGHT! It's a true mess indeed! (33k)
Attachment: kunitsgosumaperror02.png - A sorrowful blank space Left alone! (27k)
Topic KBookPages By kyonides Date 2017-09-05 02:29
This is my very own implementation of a book page flipping effect I've been finding everywhere, even on my cellphone's sfx... Thanks to Gosu's draw_as_quad feature it's possible to easily implement a readable book with Ruby Gosu.

Download Link: Click here!

I know the example images look kind of lame when I added some comments or labels, but it was a humble test anyway...
Attachment: kbookpages01.png - Opening Book (492k)
Attachment: kbookpages02.png (737k)
Attachment: kbookpages03.png (743k)
Topic Input update interval By kyonides Date 2017-09-05 02:24
OK, it seems to be something I need to carefully analyze in hopes of finding a not so heavy solution to make it happen... Perhaps I could use a Module to avoid using global variables...
Topic Input update interval By kyonides Date 2017-09-02 17:06
Sounds bad... What can you tell me about the transitions? What should I learn to implement them in my Ruby Gosu projects? (Don't tell me I can only do that via C extensions... -_-)
Topic How to compile or compress Ruby files By kyonides Date 2017-09-02 16:45
Well, in my KUnits Gosu project I've been implementing many features that require separate binary data files. I know in Windows there's a gem to pack everything into a single package, but is there anything I can do in Linux that could pack all those data files in a single one? (Not including ruby script files...)
Topic Input update interval By kyonides Date 2017-09-02 16:34
I see, but I HATE to implement such counters, they look weird and I can't place it in button_down? method that's the one that gets updated often. Isn't there any other alternative? It had become a nuisance to update the counter info every time I had to change the update interval... Besides I have already noticed that even the counter blocks some attempts to press a different button that should trigger different methods...
Topic what happens when you call draw? By kyonides Date 2017-08-31 17:40
Why don't you try using Benchmark? It will tell you what is the fastest solution, make an example script, making sure you placed some require '.benchmark' on top of it and later call both kind of methods, perhaps one first and later the other one using Benchmark.real_time method. It will tell you how many seconds or milliseconds it took to make gosu draw them.
Topic Input update interval By kyonides Date 2017-08-30 02:26
So far I've seen and read Gosu (for Ruby) usually updates its contents or its input info every 16.6 milliseconds unless you change that right at the beginning. I've been having an issue with the input update stuff because I need the game to update images every 40 milliseconds or less to make them run smoothly or decently at least, but then I see that handling input becomes a pain you know where. It updates the button_down? method too often for my needs and the only thing I could do was to make my game ignore a button that has not released so far, forcing the player to keep pushing the button once and again. Most of the time it might work if I'm working with menus but not when walking on a map with my playable characters. How can I alter the input update frequency while keeping the refresh update frequency intact? I need it to ignore a pressed button that is not released for a few extra milliseconds...

I'd also be grateful if you could share some ideas on how to implement graphical transitions on Gosu (for Ruby).
Topic OpenAL deleting buffers By kyonides Date 2017-08-30 02:20
Right it's on Linux, never seen it on Windows so far I think. I hope someone does find a way to get rid of it.
Topic Changing the way Font class works in Ruby By kyonides Date 2017-06-27 04:52
Could it be possible to include stuff like setters and getters for stuff like Font color and scale_x and scale_y by default? I think it is easier for the game developer to just change those attributes by calling a getter to update them accordingly, then the draw method could take care of the vital stuff like x and y coordinates as usual by not needing to add the values mentioned above or those three could become optional parameters or arguments there... Or a new draw method overload could be added there... Hope you find the idea interesting and useful as I do.
Topic OpenAL deleting buffers By kyonides Date 2017-06-27 04:37
Every single time I stop running my game I get the following warning on my console window.

AL lib: (WW) FreeDevice: (0x3060960) Deleting 6 Buffer(s)

I know that stuff is about OpenAl's normal behavior getting rid of the buffers created while playing all the audio songs I included in my game project, but isn't there a way to avoid getting
that message right after terminating the test play? It doesn't really look pro to print that every single time a player closes the game...
Topic Weird error message on Debian By kyonides Date 2011-03-09 01:40
I was trying to run the simple window script found at the Ruby Tutorials section and also a custom script but I always get this weird error message. If I run the same script on any *buntu GNU/Linux OS I don't get this error message.

~$ ruby1.9.1 gosuwindow.rb
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  160                                                                           
  Current serial number in output stream:  161

I'm completely sure I didn't forget to install any package.

~# apt-get install g++ libgl1-mesa-dev libpango1.0-dev libboost-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev ruby1.9.1-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libboost-dev is already the newest version.
g++ is already the newest version.
libgl1-mesa-dev is already the newest version.
libpango1.0-dev is already the newest version.
ruby1.9.1-dev is already the newest version.
libsdl-mixer1.2-dev is already the newest version.
libsdl-ttf2.0-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Can anyone lend me a hand here?
Topic Gosu 0.7.27 released (& 0.7.27.1 hotfix) By kyonides Date 2011-01-30 17:38
It sounds good but I can't get the libaudiere-dev package.
Topic Gosu on Linux Magazine By kyonides Date 2010-12-02 02:29
I speak Spanish and German so... you know... :)
Topic Gosu 0.7.25 released By kyonides Date 2010-11-02 21:48
I thought I would never see the last feature coming back, why did you change your mind?

Can we now save images with Gosu + Ruby? Nice...
Topic Idea: Gosu in web browser. By kyonides Date 2010-09-30 00:57
I wouldn't go for IronRuby since IronPython development & support ended a while ago and people are also expecting the same fate for IronRuby.
Topic RPG like message windows and Gosu By kyonides Date 2010-09-17 23:29
Oh, thanks but the idea was not to use another scripter's script but get ideas on how I could do it on my own and check a couple of simple examples. Thanks again for your interest but there's no need to make the script for me if you don't have the time to do it. As I said, a couple of examples are more than enough.
Topic RPG like message windows and Gosu By kyonides Date 2010-09-16 21:23
Well, since I'm just taking a look at the ideas posted here, I don't think I'll implement it the same way all of you did but it helps me somewhat indeed. Thank you for your suggestions but keep them coming if there are more!
Topic RPG like message windows and Gosu By kyonides Date 2010-09-14 21:35
Well, I know how I can create a Font object and display it on screen but I wonder how I could manage to show a message window text slowly not all at once as it's the case right now with Gosu. Any ideas on how I could achieve this goal of including such a feature in my Gosu game?
Topic Color::RED etc.—already in heavy use? By kyonides Date 2010-09-09 05:58
Isn't there a way to keep the old alpha method name and still provide the same feature the transparency one would offer?
Topic Gosu 0.7.24 released By kyonides Date 2010-09-09 05:55
I think I also experienced a similar problem some time ago, but since I changed the code to avoid the issue...
Topic No marshal_dump is defined for class Gosu::Image By kyonides Date 2010-08-25 23:50
That doesn't explain why both failed and threw those error messages I posted above... I mean, I already know I can't use them the way you did in your example.
Topic No marshal_dump is defined for class Gosu::Image By kyonides Date 2010-08-25 01:40
Thank you for your advices, I guess I should never expect that to be easy, neat or even viable. I was just trying to avoid any possible "code duplication" so to say.
Topic No marshal_dump is defined for class Gosu::Image By kyonides Date 2010-08-24 18:19
Interesting, if it works, there won't be a need to write separate class(es) for all the images in a game... but new or initialize is a private method...
Topic Gosu 0.7.23 released By kyonides Date 2010-08-24 06:25
Yeah, I get it in Kubuntu, too. It said "gl.h ... no" or something like that but it only failed in Ruby 1.9.2, Gosu was correctly installed in 1.8.7 and 1.9.1.
Topic bug in translate et al., or just a shortcoming of Ruby? By kyonides Date 2010-08-23 05:28
To me it looks more like a rewrite of ensure, which is already included in Ruby... but I might be wrong...
Topic No marshal_dump is defined for class Gosu::Image By kyonides Date 2010-08-22 03:18
Well, I get this error message whenever I try to save the game...

:in `dump': no marshal_dump is defined for class Gosu::Image (TypeError)

I wonder how could I avoid this meaning either how I dispose of the image before I dump the player's info or how can I handle the player's info so it doesn't include any single Gosu::Image and the image should be disposed long time (OK, just a couple of milliseconds) before I even try to save the info in the file. I think I should be able to dispose of the image without taking anything else into consideration, but since I'm newbie I could be mistaken and trying to achieve what's impossible and illogical.

So could any of you give me a hand by telling me how should I solve this issue?
Topic [Off Topic] Ruby Regexp URL HREF By kyonides Date 2010-08-21 20:01
I'd use the m.content option just in case I get other tags or nodes like <img> which might also include href's.

jlnr, what if I were trying to get the highscores for a Ruby game from x forum? No one ever asked me why I was doing this anyway...
Topic [Off Topic] Ruby Regexp URL HREF By kyonides Date 2010-08-21 04:54
Well, I guess that's the only thing I can do for now... I solved the issue but the code doesn't look neat...
Topic [Off Topic] Ruby Regexp URL HREF By kyonides Date 2010-08-21 02:23
Lately I was trying to fetch a list of specific links from any website or forum so I can update a topic list almost automatically using only Ruby and some rubygems. Maybe this wasn't the best idea I ever had but this scriptlet let me get closer to what I actually wanted to achieve with it. (I forgot how I could paste it here using some bbcode or something the like...)

require 'open-uri'
require 'nokogiri'
results = []
file = File.open 'href.txt','w'
doc = Nokogiri::HTML(open('http://some.website.com/12345678-some-subforum/'))
doc.search('//*[@href]').each do |m|
  if m[:href].include?('12345678') and !m[:href].include?('#lastmsg') and
      !m[:href].include?('forumid=')
    results << "<a href=\""+ m[:href] + "\"></a>"
  end
end
file.puts results.uniq!
file.close

The results are several lines like this one...

<a href="/12345678/98766432-some-weird-topic/></a>

...but I need to get the actual link name, too, so it looks like this...

<a href="/12345678/98766432-some-weird-topic/>Some Weird Topic</a>

...but IDK how to get the "Some Weird Topic" string from the doc variable... I guess I should nest another each iterator but if IDK what value to pass in the search method I won't be able to get the string...

I wonder if any of you have some experience with this kind of issue...
Topic How to compress a Ruby + Gosu game and make it executable By kyonides Date 2010-08-21 02:14
Thanks for the tip, I'll give it a shot once I solve another issue I'm having with Ruby and websites.
Topic How to compress a Ruby + Gosu game and make it executable By kyonides Date 2010-08-20 21:46
This is not related to just using winzip and make it executable so it'll auto extract its contents into some folder after double clicking on it. What I mean is to create a real executable game that shouldn't even need to be extracted but that should work much in the same way a C or C++ game would. I know I can just offer the visitors some copy of an rar archive with all my project files, but that's not as neat or nice as running the game from a single executable file. So how can I make that executable file for my Ruby game?
Topic Ruby 1.9.2 Released! By kyonides Date 2010-08-19 03:29
Well, I just needed to compile the source code on Kubuntu 10.10 and it now works. The steps are included in README file and I just found a couple of them, quite simple indeed.
Topic DevIL imaging library now works with Gosu By kyonides Date 2010-08-19 02:04
Interesting, I didn't know that's what remove_method could actually do that undef couldn't do.
Topic DevIL imaging library now works with Gosu By kyonides Date 2010-08-19 01:45
Or try...

class Gosu::Image; undef :to_blob; end

or...

class Gosu::Image; undef to_blob; end
Topic Ruby 1.9.2 Released! By kyonides Date 2010-08-19 01:43
The "stable" version of 1.9.2 was released on 08.18.2010 so it's pretty fresh. I guess we should now start testing if we can install it on our systems and run Gosu on top of it!

http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9-2-is-released/
Topic Map Drawing Issues By kyonides Date 2010-08-17 03:36
Alright, then I guess I'll give it a shot unless it lacks of proper documentation...
Topic Map Drawing Issues By kyonides Date 2010-08-15 23:43
I was talking about gosu-tmx not Nokogiri, which I already installed on my PC... Please read more carefully :)

:~$ sudo gem1.9.1 i gosu-tmx
[sudo] password for user:
ERROR:  could not find gem gosu-tmx locally or in a repository
:~$
Topic Map Drawing Issues By kyonides Date 2010-08-15 06:15
OK, thanks for the advice, but isn't there a way to install it just like we do with any other rubygem? I could only find a source code download, which isn't bad at all but I'd prefer not to manually install it all by myself...
Topic Map Drawing Issues By kyonides Date 2010-08-13 23:13
I wonder if you could tell me a bit about how to use Nokogiri. I know there's a reader and a parser but IDK when I should either use the former or the latter...
Topic Controlling Image Transparency By kyonides Date 2010-08-13 20:47
I wonder if you ever tried to save the composite player image or sprite in a file after the player selected his or her favorite combination so the game only needs to read the file to display it on screen.
Topic Map Drawing Issues By kyonides Date 2010-08-11 05:16
Mmm sometimes, Gosu is one of them, I can't start playing with my mouse and the current position of the Gosu project window because it makes the PC freeze he he he.
Topic Map Drawing Issues By kyonides Date 2010-08-11 02:56
Well, after reading the source code I found out that I needed to include some command argument namely -graphicssystem native to disable the OpenGL rendering and force Qt to do the job on her own. On Kubuntu that seems to be slower but not in sidux - kde. The good thing is I'm now able to use it in both boxes!
Topic Workaround to use Custom Fonts in LINUX By kyonides Date 2010-08-10 02:09
But isn't there any method or proposal that might let us test the size of a Font image without really creating one for testing purposes? I mean, something that might let us mathematically calculate it without ever displaying it on screen.
Topic North Wind By kyonides Date 2010-08-09 04:04
This project name actually has nothing to do with any specific game, yet. It's temporary purpose was to convince myself I could really make my own state machine and make it work just like others I found (or almost like the others). I don't even know why I chose that name and not another one.

Here's a screenshot to show you what I haven't done, yet, he he he.

Don't expect too much from this for now since I'd need to reimplement some things available in my other projects like Glanon and Kaerdon. (I'm also trying to achieve something similar with Qt, Kross and Ruby but my C++ skills are as good as those of any street cat.)
Attachment: nwscenemanager.png - North Wind Title Screen (51k)
Topic Map Drawing Issues By kyonides Date 2010-08-08 19:41
I thought about it for a minute but it doesn't make sense, any other Qt (I'm using 4.6.2) or KDE app window is displayed correctly on my screen. Tiled is the only one that doesn't...

I even tried to make my app with a Qt GUI and all and it never showed me such flaws...

AFAIK it should be something with the deb file distributed for *Ubuntu OS's.
Topic Map Drawing Issues By kyonides Date 2010-08-08 18:09
Well, I downloaded Tiled and since I'm using a Kubuntu distro, the Qt framework is already part of it and didn't need to do anything but installing Tiled itself. The problem was it didn't let me choose an option from an submenu or a tile from the Tileset section... Take a look at the screenshot.

http://img217.imageshack.us/img217/891/tiledweird.png
Topic Map Drawing Issues By kyonides Date 2010-08-08 00:42
Ever since I started trying to dev a game in Gosu (Ruby) I noticed that the Cptn Ruby map script would only work in scrolling games. The thing is it isn't suitable for RPG's (like the one I didn't touch for months now). So I wonder if someone could show me a better way to draw maps on screen and handle all of its map files.
Topic Ruby Gosu tutorial doesn't work By kyonides Date 2010-08-03 17:46
You could use Notepad++ on Windows or SciTE, I tried the last one and I remember it included Ruby support by default.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill