Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
Search
Topic Releasy Issues By endless_dark Date 2013-06-30 16:42
Hello everyone, I'm trying to test Releasy to create the executables for my game but I can't get it to work.
I installed everything, created the example Rakefile and when I execute it I get:

Unable to activate releasy-0.2.2, because rake-0.9.6 conflicts with rake (~> 0.9.2.2)

So googling a bit, I read that I have to create a Gemfile requiring rake in it.
So after doing that, I execute it again and I get:

rake aborted!
cannot load such file -- releasy

What is going on?

Thanks!
Topic My very first ruby+gosu app By endless_dark Date 2009-07-24 16:33
Thanks! I will remember that!

I asked for graphic artists on deviantart and pixeljoint, but I had no much luck. So I have done many graphics myself (some of them stink).
I have also added more stuff like a background wall or an animated background, if you play for enough time you will see how the night ends. Thats because I want the levels to take place at night and the player should finish the level before the sun rises.

Anyway, not big changes and the collision stuff is broken again due to new player's sprite size but I will fix later.
Attachment: platform_test.tar.gz (0B)
Topic My very first ruby+gosu app By endless_dark Date 2009-07-20 11:32
Thank you all, I have solved the width problem quite convincingly I think, and almost all passing through problems, but not 100%.
Now I am trying to recruit some graphical artist through deviantart and I have created a free forum (http://monsterfactory.freeforums.org) to get the game development stuff tidy.

I also have another question, for the game menu and that, I would like to get the code split in some files, like a C or a Java program, is this possible? Cause I can't find anything about googling o_O
Topic My very first ruby+gosu app By endless_dark Date 2009-07-18 14:42
This thing about the collision and platform standing stuff is giving me more problems than I thought, so lets see if someone can give me a clue about this.

So far, I've already solved all problems with static platforms and almost with the moving, but I have not tested everything, so new problems can appear. The problem I have already encountered is the vertical moving platforms which are moving FAST. The character always pass through them, this could be a minor problem, the easy way to solve this is not to place fast moving platforms, but anyway, it would be cool if I could solve this.
-----------------------------------------------------------------------------

Now here it is, the collision mess explained, I have attached an image with the colored code an some numbers referring to highlighted blocks.

1.- These are the function character's data, it uses the X and Y position and width and height as-well, the X and Y I'm not sure what part of the image are, but I suppose that are placed in a corner. The Width and Height are the current character's image width and height.

2.- These are the function platform's data, X and Y position and the tile width, which is the current image's width.

3.- This line right here calculates the total platform size, it multiplies the size (number of tiles) by the tile width

4.- Now, this line, it's supposed to get the tile's height, it is multiplied by 1.5, that's because, if not, the character would stand in the middle of the platform. This product could be done after while placing the character in 8.-, but I placed it there.

5.- That's for none existing platforms size 0 = no colliding with them

6.- Another problematic part, this calculates if the character is on the platform, referring to it's X position, this causes the player's physical width that jlnr posted, I have tried to fix this but I always get strange results.

7.- This is the main problem for me, it calculates if the character and the platform are colliding referring to their Y position. The character is just a point (x and y position), and the platform too. So the chances to get those two points at the same time colliding are too low, so the character used to pass through the platform. That's why I introduced the +12 at the end. This makes the platform collision rectangle 12 pixels tall, so now the character don't pass through. This value it's arbitrary, I have tried different numbers, if it's too low the character pass through the platform some times, if it's too high the character sticks too the platform too fast creating an awful effect.

8.- And finally (sigh), the last part. This sets the character's position on top of the platform if it's v_accel is negative, that means that makes the character stand on this if it's going down and returns true to indicate that there is a collision.

As you can see there is some shitty code here, I will try to fix this or at least search for some general platform game programming info to deal with the platform issue.

I also attach the last code version.
Greetings and sorry for this huge post xD
Attachment: code.png (0B)
Attachment: platform_test.tar.gz (0B)
Topic My very first ruby+gosu app By endless_dark Date 2009-07-09 15:23
Another new feature, moving platforms, and as I implemented it I'm going to make some conveyor belt (it's really named like that?) and stuff like that.

The first thing I have to recode is the collision and standing on platform stuff, as jlnr said, the player's physical width is not very well done, and also there is a new problem with the vertical moving platforms (if you don't see it try jumping a few times on them).

But I'm quite happy, because I'm doing this as fast as I thought, and I hope I can finish it before my exams.

I thinks it's also ready to start thinking on the game concept, art stuff, level design and that. So if you people know some kind of community where can I ask for recruiting some free artists ,level designers or just people that want to help It would be cool.

I was thinking on some original concept for a platform game, not another mario clone, and I really like the Lucasart's Night Shift oldie concept (gameplay video available on youtube), which presents another point of view for a platform game, I dunno, I haven't decided yet.

Anyway, thanks for the replies and support given here. I will come back with new stuff!
Attachment: platform_test.tar.gz (0B)
Topic My very first ruby+gosu app By endless_dark Date 2009-07-06 16:28
I have made some improvements this afternoon, if someone wants to take a look here is the new version.
Now the map is loaded from a file, and the platforms have borders

Edit: No friends at night on IM, programming night.

Now I've added tiled background and scroll. It's cool because the game could be resolution independent. It only changes the field of view.
Note that it only weights a few kbs, I will try to keep it as simple as possible.
I've also recoded many things, like, the platform or backgroud stuff, are more "dynamic", if you change the platform tile size externally with an image editor, the collision and drawing on screen will keep that on mind, the same for the tiled background, no matter what the size of the image or the screen is, it fills the background properly.

I still got many thinks on mind, I will post more advances.

PD: The code is starting to get a little messy
Attachment: platform_test.tar.gz (0B)
Topic My very first ruby+gosu app By endless_dark Date 2009-06-26 16:53
Thank you for the quick reply. I read what you wrote and made the following changes:

- I have deleted the @ from the method variables, I really didn't know exactly how this works, but I will read some manuals to learn.
- The two if's are now merged
- Changed the 0 and 1 with true or false
- And now I'm using the attr_reader and attr_accessor (those are great! :D) I didn't know there was something like this, I'm a noob xD
- About magic numbers: sorry but I really don't understand what are you talking about

- And yes, the weird method:

   This method is the core of the platform example, but I am not very happy with it. I will explain, basically, what it does is:

            First, gets the platform's and character's positions to compare, then checks if the character its in a little area 8 pixel over the platform. If it's there returns true, and sets the character's position on the first pixel above the platform. This last step is to unify the position where the character is standing on the platform. Because it would stick sometimes 5 pixel above, and sometimes 2, or maybe 3. If I reduced this collision rectangle to a single line, sometimes the character passed through the platform floor, so I had to make it a little wider.
Yeah, I know this is a little sketchy.

Also, this function checks collision between the character and a platform, and the game has to call it with every platform in the screen, the platform is an object, and I have coded every single platform. But this could not be done in bigger levels so I must think another alternative.

I have changed the name too, to something like standing_on_platform or something like this.

Anyway, as said before, thank you for replying and for your suggestions.
I'm still looking for any kind of advice to get this thing the best and cleanest as possible.
Attachment: platform_test.tar.gz (0B)
Topic My very first ruby+gosu app By endless_dark Date 2009-06-25 22:37
(omg, I forgot to login and posted like mr. ?, I post this again and report my previous post, sorry for the inconvenience)

Hello everybody.
I'm interested in doing a 2D platform game using Ruby and Gosu, and I have already written this code.
I'm quite a noob, using gosu, using ruby and even writing object-oriented code so I'm posting here this early code and reading every comment, correction or suggestion that you post.

This is just a simple platform game like test, a character and three platforms.
Attachment: platform_test.tar.gz (0B)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill