Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
Search
Topic Another way to give Timer property? By kuehkookies Date 2012-10-29 17:20
Okay. Figured it. That's pretty neat when just implemented in my game. Cheers!
And even I can make a event-handler for timers. (I've figured how to handle timers to get the event switch, but returns nil :p )

Now, I'm replacing timers with frame-based one rather than built-in millisecond-based.
Thanks!
Topic Another way to give Timer property? By kuehkookies Date 2012-10-29 05:18
To the point, is there a way to make a dynamic timer based on FPS? Timer from Chingu often misses some crucial lines in my game (jump distance, attacking delays, etc)...
Or maybe there's another way that better but still using timer method from Chingu?

Thanks in advance.
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-17 01:01
Actually yes, even though I must make all of resources and completing the whole game. I noted the suggestions you posted and has been implemented in the system. :D
For now the game runs well, and I'll try linking some rooms to simulate a stage.
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-15 15:02
Firstly, I'm sorry because this is my first time to use Bundler, so that's why I missed that point. :D
BTW I've committed the Gemfile and Gemfile.lock as well, also I've added the bundler require at the main.rb.

Thanks for the tips, and the help this far. :)
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-15 07:10
I've added Gemfile, as Spooner recommends to make end-user gets the right library.
Bundler makes me taking a look for a while, but it works well here :)

These are rather new for me. Sorry for inconvenience. :)
Topic Advices for game performance, anyone? By kuehkookies Date 2012-10-15 03:18
Seems like Chipmunk worth a try for this issue. And right, even the collisions are optimized, it's still can't be as fast as those written in C.
Thanks for your share, guys!
Topic Advices for game performance, anyone? By kuehkookies Date 2012-10-12 14:57
Sorry for my latest response. I felt bad after stressed out myself. Sorry :(

By the way, last night I tried again and after reading your explanation several times, the frame rate boosted to approx. 50-55. You're right, I didn't struggle enough :D

Once again, I'm sorry, and thanks in advance :D
Topic Advices for game performance, anyone? By kuehkookies Date 2012-10-11 16:14
Seems it's applicable. But I still can't figure the method you posted. More over, I saw the load_game_objects method will #create everything listed in the file instead of #new.
And now, the game's frame rate itself decreased into 30 by only adding 6 mobs which walking on the ground.

Is it possible to optimize the performance when the sprites are updating? If yes, how to do it?

Thanks in advance.
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-11 11:49
Thanks, now the viewport works as it should be. :D
Now I'll concern the game's performance, since I'll use lots of objects in a room. Also I'll do some resources, too.

Hope this one will finish sooner :)
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-10 18:02
I scaled the window as you suggested, and it runs fast now thanks to your tips. :)
Nice one! :D

However, I got a problem about viewport.
The viewport runs as if the window isn't scaled, which makes the background scrolls when the player reach the edge of screen, not when the player is at the center of the screen. I tried to trick the viewport by overriding the center_around method but it didn't resulting a good one; the scrolling became weirder! :p
I'll commit fresh codes if someone asks for it BTW.

Any suggestion about the viewport?
Topic Advices for game performance, anyone? By kuehkookies Date 2012-10-10 09:10
I wonder how to make as many objects as possible in a game_state...

I got some cases when I add several 'enemies' (it's actually only five enemies in a room) and the FPS in-game is below expectation. I testplayed the game, then as I managed to clear out the room the FPS goes back to normal. I suspected the update method which each enemy has one, but since those enemies shared the same attribute, I think there's another thing that may degrade the performance of the game itself.
Next one is the usage of tiled terrains (Chingu has this one, which is useful for me to build levels). I think that the tiles may decreases performance of the game, CMIIW.

So, is there any suggestion to make as many objects as possible without degrading the game's performance when played?

Thanks in advance.
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-10 04:31
Thanks for the advice :)
Well, I did all of those on older computer so I shrunk the resolution of the window (once was 544x416 pixels) to keep frame rate above 45.

By the way, is there a way to scale the whole window (from 384x228 to twice of it or 640x480) without messing all of objects inside of it?
I scaled all of objects into twice of its size (by using factor attribute), ended up every objects that should be 'landed' on terrains falling down and messing sword-swinging animation as well.

Frankly I considered to remake all of the image resources into twice of their size to brings back the game into 544x416 pixels or 640x480 pixels dimension, which will take extra effort for me. However, if anyone know how to scale the window as I demanded above, let me know. :)

Regards,

EDIT: Based on some game samples, I figured the self.factor gives the exact thing I needed. Now I'm remaking sample levels to fits the scaled objects. Thanks anyway :D
Topic BkSmith - Mark's Quest v0.4 By kuehkookies Date 2012-10-06 11:57
Frankly this one is suspended after 4-5 months ago, and it's uncompleted partially. Lack of resources make progress of this project goes slowly.

Anyway, I tried to make a Castlevania-clone with Gosu (and later helped by Chingu), with mostly similar features as in the old-school Castlevania but with some new things I added originally (sword instead of whip, for instance). I make this project titled Mark's Quest (taken directly from the main character's name FYI).
I did the system in about three weeks and some resources to demonstrate how the system works.
Why v0.4? It because I've done some errors and glitches in the game, and now should runs well :D

Here the screenshots ;)
[http://i.imgur.com/cIziG.jpg]

[http://i.imgur.com/B4WNv.jpg]

[http://i.imgur.com/6kry0.jpg]

Well, after cleaning up some codes and reupload them, you can find the codes here
https://github.com/kuehkookies/Blacksmith

Thanks in advance, and sorry for my English (I often use the wrong grammar. My fault :P )
Attachment: ss1.JPG (37k)
Attachment: ss3.JPG (38k)
Topic FPS decreasing gradually By kuehkookies Date 2012-04-05 14:51
Everything ran well before I kick my 'restart' method, which restarting whole game immediately and will be implemented for death condition. It's all okay when I call another YML file (yes, I use some features of Chingu, and still wondering how it works :P ) but when I call the same YML file--in other words, I attempted to recall the same map, I got degraded performance as the first problem with my HUD before.
Is there some tricks or way to use Gosu (especially Chingu) efficiently? And how to make a game restarts without loading its previous state?

I'll put my project into Github so you guys can check'em out and maybe pull tickets for it.

Thanks in advance, sorry if my post confuses you and any help is appreciated so much! :D

EDIT: It's now in Github! Here's my project involving Gosu and Chingu to make things clear: https://github.com/kuehkookies/Blacksmith
Feel free to pull issues, by the way :D

EDIT: My bad, I created a cache for all objects and I didn't flush them when I recall ANY GameStates.
Topic Audio: Repeating from marked point instead of the beginning By kuehkookies Date 2012-03-08 09:56
Firstly I'm sorry if the title is confusing :)

I've tried to put an audio file (it's OGG file, which has LOOPSTART and LOOPLENGTH metadata in it for proper loop) and play it on the game. But when the music reaches the end, it starts from the beginning of the music instead from the marked point.
Once I tested the file on RPG Maker, it played back from the marked point.
(I use RPG Maker since it's the most reliable Ruby-based game development tools I've ever use)
Is this just me that having this problem? Or there are some explanations for using audio resources in Gosu?

Thanks in advance, and sorry for my grammar :)
Topic To call classes which inherited the same superclass? By kuehkookies Date 2012-02-13 15:34
I use Chingu, of course, but the second method didn't work. The first one gave me a good result, and I don't need to make bunch of collision checks in GameState/Scene's class. Thanks. Your post is appreciated so much.
Topic To call classes which inherited the same superclass? By kuehkookies Date 2012-02-13 12:19
To be honest, I'm in progress to make several pieces of 'enemies' which will be called in most scenes (and some will be in every scene) and I found if I make a collision check method for EVERY classes which I want, it will make some 'unnecessary' loops and resulting in slightly decreased frame rate.

Since most of those 'enemies' will get the same collision checks, I think if I group 'enemies' into something which can contains objects (in this case, class of enemies) and call it in scene's update method for collision checks, it'll cut bunches of lines in the scene's update method. But the problem is: How is the best way to make it happen?

Recently, I can call an object's superclass, but I still can't figure how to check every classes appeared in scene (I made it by Chingu's Edit feature, which is the only way to build a scene for now). Or if there's another method which may better than checking each of object's superclass which appeared in the scene.

Thanks in advance.
Topic FPS decreasing gradually By kuehkookies Date 2012-01-30 01:31
So the Text is the culprit...
I replaced the lines with the lines you suggested, and now I get normal FPS as usual.

Thanks for the tips! :D
Topic FPS decreasing gradually By kuehkookies Date 2012-01-28 15:47
I don't know exactly, and everything is fine when I checked my applied logic in my script.

But to ensure it's only happened to me, I attach the source to be inspected. Maybe there are some suggestion from you guys about it since I'm new in Ruby especially Gosu (and Chingu) libraries I currently use.
I'm afraid this problem is because of my current machine I use to develop my game.

Thanks in advance.

And about the clip_to method maybe will be useful later :)
Attachment: trial.zip (234k)
Topic FPS decreasing gradually By kuehkookies Date 2012-01-28 08:33
Okay.
Since it's involving many lines of code, I'll explain it.

When executing my game, it loads all of included scripts and other resources (image and sounds), then the window appeared and it shows its current FPS. It's 60 FPS in first 10 seconds.
After 10 seconds, the frame rate becomes degraded gradually over time and ended up in 15 FPS. It just goes down in every second as long as the window stays on screen. I tried to minimize used resources (removing some unneeded code lines, not using sounds) and no significant result scored.

Libraries currently I used are Gosu and Chingu.

Once I tried to use single huge image instead of several tiles as platform, then I got normal frame rate as expected. However, the frame rate goes decreasing slightly (I got 45 FPS at the lowest peak). I think multiple image usage as tile is the culprit...

P.S.: I still wondering how does 'clip_to' method works.

Thanks for response.
Topic FPS decreasing gradually By kuehkookies Date 2012-01-28 06:02
This is bothering me since I make a map based on tiles, which drawn in 24x24 pixels size and in original window size viewport (it's 480x360 pixels size). I got 60 fps in first seconds, then it keeps decreasing and ended up in 15 fps, resulting in really SLOW frame rate.
Also, when executing/compiling the scripts, I noticed in Task Manager that my game eats up to almost 100% of my CPU usage. Not only makes my game runs slow, it also makes another apps I opened runs really slow and almost not responding.

I've read about Ruby itself, and some opinions from others which Ruby is a bit slow. But it can't stop me to stay with Ruby.

However, is there some suggestions to cover this problem?
FYI I use Dynabook Satellite 1870, with 1.6GHz Intel Celeron and 512MB of RAM. Pretty old, of course, but this is my only machine I can use for now.
Topic Transparent collision check problem By kuehkookies Date 2012-01-25 06:44
I've done resizing bounding box to make collision properly (I made it to 40% of sprite's width) and it works as I expected. Also, I've tried some objects (projectile, sword animations and 'destructible' objects) to ensure they're working properly.

This makes sense, and gives me some other ideas to build a platformer game.
Thanks for your explanation.
Topic Transparent collision check problem By kuehkookies Date 2012-01-24 03:27
Hello,

After drilling with the Gosu and Chingu environment, now I stuck in this problem. I've made a sprite, implement it to the game, and I got the sprite having incorrect collision check. I've read the documentation of related problem (in this case, the Chingu::GameObject, Sprite and also I've read TexPlay docs) then I found the cache_bounding_box is the culprit. It makes the sprite looks like hanging in the air rather than falling down to lower platform. Images in attachment.

Can someone explain how to get rid of the transparent part of the sprite?
Attachment: bug-1.jpg - Screenshot (32k)
Attachment: bug-2.jpg - Screenshot - w/ bounding box debug = true (33k)
Topic Gem install failed By kuehkookies Date 2012-01-23 06:21
Thanks.

Now I've done with Texplay, and I found another gems I needed. I can start some experiments about the game mechanics.
Topic Gem install failed By kuehkookies Date 2012-01-22 15:31
Hello, guys. I'm new in Ruby and I find Gosu interesting, since I've spent much time in game-developing.

Frankly, I have a problem about the installment.
I made a fresh install of Ruby (it's 1.9.2), installing Gosu and Chingu and everything is OK.
But when I install TexPlay and other libraries which require build tools it always return error.

Here's the chunk from the command prompt when I attempted to install TexPlay

C:\Documents and Settings\ryann\My Documents\ruby\bsmith>gem install texplay
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing texplay:
        ERROR: Failed to build gem native extension.

        C:/Ruby192/bin/ruby.exe extconf.rb
checking for main() in -lfreeglut_static... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby192/bin/ruby
        --with-freeglut_staticlib
        --without-freeglut_staticlib

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/texplay-0
.4.2 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/texplay-0.4.2/ext/texplay/
gem_make.out


Shall I use one of the options available? If yes, which one?
I need a library that capable to manipulate images easily and won't make such a mess to my codes.
P.S.: I've dealt with this error all day long, and make no result.

Thanks in advance.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill