Hello. I am planning to make a game with Ruby and Gosu. I was gonna use RubyGame but found no good tutorials on it. So I found this nifty little library with a good few tutorials. Bear in mind I'm still learning Ruby.
So I am planning on making my game with the Isometric camera view. For those that don't know it's like the camera view from the old pokemon DS games(Pokemon Perl + Diamond). Can Gosu create that camera angle? If so could you maybe link me to a video/tutorial on how to do it? This may be a little stupid, so if it is would it become clearer when I finish learning Gosu and Ruby? Thank you for any feedback and please don't hate on this if it is stupid :D
These are the movement method I use in Stageoids
To activate the move command, put this function into the update function in main.rb file.
if button_down? Gosu::Button::KbLeft
This calls the move_left function in the player.rb file. This is...
//Move left at the speed the move_speed value
@x = @x - @move_speed
//Make it so we can't leave the screen
if @x < 0
@x = 0
For this to work, you need to define these variables in the player.rb file's initialize function.
@x = 0
@y = 0
@move_speed = 10
This will start you in the bottom left corner.
For the other directions duplicate the functions and replace the values as follows...
KbLeft -> KbRight
move_left -> move_right
@x - @move_speed -> @x + @move_speed
@x < 0 -> @x > 0
KbLeft -> KbUp
move_left -> move_up
@x - @move_speed -> @y + @move_speed
@x < 0 -> @y > 0
KbLeft -> KbDown
move_left -> move_down
@x - @move_speed -> @y - @move_speed
@x < 0 -> @y < 0
To create the player to move around in your game, use @player = Player.new(self) in the initialize function in main.rb
For collisions with walls, I suggest you have a look the Cptn. Ruby tutorial.
As for the scrolling, unfortunately, I have no idea.
When you have a working prototype, create a post in the showcase forum with the file attached so people can download it and help you work errors and bugs out.
Yes, Pokémon, Earthbound/Mother and early Legend of Zelda games used this viewpoint.
Ah right! :)
Hey that IS what I'm looking for. I was told somewhere it was called isometric. Is this achievable using Gosu?
You can achieve * A N Y T H I N G * using Gosu! ;)
But seriously, yes you can. It's basically just a "top-down" perspective combined with the right graphical style (in fact, remember the dungeons in LoZ? The walls were top-down, but everything else was oblique!) The only semi-difficult thing is collision-detection, and then only if you want to be able to walk "behind" stuff (which LoZ games don't usually let you do).
If you want to do jumping or other "Z-axis" stuff, you just have to use the desired Z coordinate to modify the base Y coordinate. I've done this in Flash/AS3.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill