Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / SpaceRace - USSR vs USA
- - By D3nX Date 2018-03-06 13:59
Hey,
Today I would presenting you a game I'm currently working on since some days : SpaceRace.
It's not a race game as the title could mean, but the race to conquest the galaxy as the USSR and USA fought for. So I would have your opinion on it ^^
Here some screenshots :






The downloads :
itch.io (exe) : https://d3nx.itch.io/space-race
github (source) : https://github.com/D3nX/space_race
Parent - - By kjarrigan Date 2018-03-07 12:14
Hey D3nX,

I just played a bit and the game looks quite good. Just a few notes:

Your Ruby doesn't look really rubyish ;-) e.g
- dont use emtpy brackets () after methods without parameters
- then is only used if you write the code in the same line as the condition like if (true) then x = 1 end and in that case we usually write the condition behind the code like you did at some places. e.g. x = 1 if true
- class methods are called with a dot(.) too like Game.as_seconds and not Game::as_seconds
- I don't like to argue about intendation (besides using two spaces instead of tabs) but you could be a bit more consistent. Most code ist aligned, but some ifs aren't which kinda "pokes me in the eye"
- use require_relative 'animation' over require './animation.rb'
- you use quite a lot of global variables which in most languages is considered bad practice. I think at least the menu*-music ones could be dropped. As far as I understood it you use them to play the sample infinetly as long as the menu is open. You should look into Song.play(true) which play the song in a loop forever.
- I personally would also move some files in subdirectories like all states to states/ and the rest to lib/

I found one "bug" so far -> you require './animation.rb' but the file is called Animation.rb which is no problem on Windows but nearly every other OS where filenames are Case-sensitive. After renaming it worked fine.

Performance - I think I noticed some delays every few seconds but haven't looked deeper into it. Might do that this evening if I got some spare minutes.

You can look at https://github.com/bbatsov/ruby-style-guide if you want although that are only guidelines (there are quite a few I personally don't agree). But if you're new to ruby you could fetch quite some nice tricks and syntactic sugar from it.

If you didn't know - there is a freely available "Gosu Book" which described the creation of a game in gosu quite good and you can find quite some nice tricks and ideas for all kinds of things (there are for example topics about GameStates, PowerUps, Statistics and Performance) - https://leanpub.com/developing-games-with-ruby/read

Otherwise good job. Yeti Runner a few weeks later SpaceRace - you seem to enjoy it. Some more in your pipeline?

Greetings,
Kjar

PS: Your game was a nice testsuite for my current "screenshots for gosu" extension ;-)
Parent - - By D3nX Date 2018-03-08 14:57
Hey, thank you for the reply ! Happy to see you like it =)

Now, let me respond to you suggestions :
"dont use emtpy brackets () after methods without parameters" -> I know it's not mandatory, still I like use them ^^
"then is only used if you write the code in the same line as the condition like if (true) then x = 1 end and in that case we usually write the condition behind the code like you did at some places. e.g. x = 1 if true" -> Yeah, not false
"class methods are called with a dot(.) too like Game.as_seconds and not Game::as_seconds" -> Yeah, that's true, l'ill fix it
"I don't like to argue about intendation (besides using two spaces instead of tabs) but you could be a bit more consistent. Most code ist aligned, but some ifs aren't which kinda "pokes me in the eye" " -> The indentation appear well in my code editor (Eclipse with Ruby extension), I think it's because of it !
"use require_relative 'animation' over require './animation.rb' " -> why ?
"you use quite a lot of global variables which in most languages is considered bad practice. I think at least the menu*-music ones could be dropped. As far as I understood it you use them to play the sample infinetly as long as the menu is open. You should look into Song.play(true) which play the song in a loop forever." -> Yup, but it's about only 6 global variables, still, l'ill try to make it better. For the music, yeah l'ill see about it.
"I personally would also move some files in subdirectories like all states to states/ and the rest to lib/" -> Not sure of doing it, I like this, but still better.

"
I found one "bug" so far -> you require './animation.rb' but the file is called Animation.rb which is no problem on Windows but nearly every other OS where filenames are Case-sensitive. After renaming it worked fine." -> L'ill fix it on Github (and my code)

Thank you for the ressources,  for reading and playings !
Parent - - By kyonides Date 2018-03-08 19:06
Well, I could tell you that it is possible to make a ruby game without a single global variable. My KUnits project is a proof of it. I am not implying you should do the same, but you can reduce the number of global variables even more than you already stated above. Check which global variables aren't called often enough and transform them into module's functions like $audio.ok_se getter becoming Audio.ok_se after creating the Audio module :P
Parent - By D3nX Date 2018-03-09 09:12
Yeah I know that's possible, everything is possible in programming (especially with Ruby) ! Still, I'm using some global variables because it make simpler to use a same objects (such as a Channel) inside the program. So that's why I done in this way.
Parent - - By kjarrigan Date 2018-03-09 10:44 Edited 2018-03-09 10:54
Hey again,

played a bit more and have some gameplay questions:

- Can I win somehow or just run for the Highest Score?
- When I collect boosters sometimes I get the fancy Overlay (I especially like the swirl!!!) but sometimes not. I guess its because I am still in the "boosted" state but its not exactly clear when the booster is over. Maybe you could do some visual to show that I'm back to normal? e.g. Add "fire" to your rockets jetpack if its boosted.
- The Score is a bit confusing. Distance traveled - totally clear. "Game Score: 298 Meters"? What does that mean?

Suggestion:
- A Scoreboard would be cool to see how I did in the previous runs
- Maybe move the text in the buttons just a bit to the right. It looks a bit cramped.
- Change the booster visuals. The red cross reminds me of "get health/life" instead of fly fast as hell.
- Add a +1 Life booster or maybe as a reward for some "milestones" like get +1 every 10.000m traveled.
- Improve the contrast of the textbar. The red on gray is a bit hard to read on certain lighting conditions
- Make the shield you get with the superbooster a bit more visible. Took me a bit to actually notice the small white line around the ship. maybe change the color and add a bit of distance between shield and ship.

Back to the coding-style-suggestions - Its totally fine if you follow your own style within your own code, but if you at some point in the future might want to contribute to the ruby community or maybe work at a game with someone else following the community style is helpful ;-) And there is no need to actually change the code in your running game. I used quite some global variables in my game(approaches) too or just have a couple ow files "all over the place" but at some point it became inconvenient and I looked for alternatives. Now when I start from scratch I have developed some best practices for my personal workflow. So I guess just go on and maybe in your next games try to do some things differently.

So and thats a perfect transition to the unanswered but most important question ;-) => any other games planned?

PS: My best distance travelled so far ~ 40.000m
Parent - - By D3nX Date 2018-03-09 15:40
Hey again too,

So let me respond you :
"played a bit more" -> Thanks ! I'm happy you enjoy it :)
" Can I win somehow or just run for the Highest Score?" -> Actually, just run for the highest score, but in the next times, l'ill add some American or Soviet spaceships to unlock (but I need artist(s) !)
"When I collect boosters sometimes I get the fancy Overlay (I especially like the swirl!!!) but sometimes not. I guess its because I am still in the "boosted" state but its not exactly clear when the booster is over. Maybe you could do some visual to show that I'm back to normal?" -> When it's not, it's as you said : you still in "boosted" state, but yeah I agree on the fact that not exactly clear that booster is hover. Maybe I could stop them from comming when we are in boosted state ?
"e.g. Add "fire" to your rockets jetpack if its boosted." -> Good idea !
"The Score is a bit confusing. Distance traveled - totally clear. "Game Score: 298 Meters"? What does that mean?" -> Oh... That's an error I've done.... It should be points, sorry :( L'ill fix it soon.
"A Scoreboard would be cool to see how I did in the previous runs" -> It's already planned
"Maybe move the text in the buttons just a bit to the right. It looks a bit cramped." -> Not false, l'Ill fix this
"Change the booster visuals. The red cross reminds me of "get health/life" instead of fly fast as hell." -> It's right, but I would something that represent the two, because (now in the version I'm working on) the booster give a bit of life, but I would it boost and give you life, but not idea for something the represent the two things.
"Add a +1 Life booster" -> Already done in my current version of the game (the next beta I'm working on ;D)
"or maybe as a reward for some "milestones" like get +1 every 10.000m traveled." -> Not a bad idea, still I need to found a reward. But life is enough huh ?
"Improve the contrast of the textbar. The red on gray is a bit hard to read on certain lighting conditions" -> Well, it's true, just need to find out the best color ^^
"Make the shield you get with the superbooster a bit more visible. Took me a bit to actually notice the small white line around the ship. maybe change the color and add a bit of distance between shield and ship." -> Yeah, I saw the same things to myself, but a was a bit lazy.... Or maybe make the shield (transparent) on the spaceship ? But be sure, l'ill fix it this time !

"Back to the coding-style-suggestions - Its totally fine if you follow your own style within your own code, but if you at some point in the future might want to contribute to the ruby community or maybe work at a game with someone else following the community style is helpful ;-) And there is no need to actually change the code in your running game. I used quite some global variables in my game(approaches) too or just have a couple ow files "all over the place" but at some point it became inconvenient and I looked for alternatives. Now when I start from scratch I have developed some best practices for my personal workflow. So I guess just go on and maybe in your next games try to do some things differently. " -> Yeah, l'ill try (I think for my next game) to ain't use global variables such as this. Oh and I actually removed about two global variables

"So and thats a perfect transition to the unanswered but most important question ;-) => any other games planned?" -> Yeah, a big games I'm working since some month, it will be like a bit like (or a lot) Hearts of Iron IV (if you know it), but  locked at some stage....

"PS: My best distance travelled so far ~ 40.000m" -> Great !! :o Doesn't reached this distance by myself xD !

Hope my responses enjoy you ^^
Parent - - By kjarrigan Date 2018-03-13 08:39
Cool that your still working on more. I don't know if I can follow your Trello (my french is a bit rusty and my time is a bit limit) but feel free to update this topic, whenever you want another test-run of your current game :-)

The "need artist" thing is something I experienced quite a bit myself. I have an image in my head how it would look cool but my skills are a bit limit. So I lately experimented with Blender (my 3d skills are definitely better than my 2d art) and creating a low poly image there and then render it to a 2d image. I found this tutorial really good - simple and well made: https://cgi.tutsplus.com/tutorials/secrets-to-creating-low-poly-illustrations-in-blender--cg-31770
Although the style is special I quite like it ;-)
Parent - By D3nX Date 2018-03-15 10:39
Wow it looks really cool ! I also love low poly graphics (PS: your photo remind me Equilinox, from ThinMatrix), it looks really simple but beautiful !

"The "need artist" thing is something I experienced quite a bit myself. I have an image in my head how it would look cool but my skills are a bit limit. So I lately experimented with Blender (my 3d skills are definitely better than my 2d art) and creating a low poly image there and then render it to a 2d image. I found this tutorial really good - simple and well made: https://cgi.tutsplus.com/tutorials/secrets-to-creating-low-poly-illustrations-in-blender--cg-31770
Although the style is special I quite like it ;-)" -> Really cool ! I checked the website, it seem really clear and simple to begin 3D modelling ^^
"I have an image in my head how it would look cool but my skills are a bit limit." -> If I get it, you would make some sprites for the game ? If yes, you're welcome ^^ Even your skills are "a bit limit", I am sure you can do pretty goods stuff :)

If you need contact me, here is my Discord : Fokker974#4620
Parent - By D3nX Date 2018-03-20 07:05
Hey, just would to say you the new version is released on itch.io and Github !
Parent - By D3nX Date 2018-03-11 07:28 Edited 2018-03-11 07:36
Hey,

Just would to say you I created a Trello, then you can follow the developpement within same time I developp :)
Here it is : https://trello.com/b/c7QqAWcU/spacerace
(NOTE: It's in french)
Up Topic Gosu / Gosu Showcase / SpaceRace - USSR vs USA

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill