SFML community forums

General => SFML projects => Topic started by: FRex on February 13, 2016, 07:19:09 am

Title: Heart
Post by: FRex on February 13, 2016, 07:19:09 am
Wanting a simple and quick game to make during my break I thought of a game I've seen in this video: https://www.youtube.com/watch?v=SqGx6LIkFqo
I started to implement it and it got a little too complex and out of hand with different color modes and so on so I trimmed it down to the basic RGB A/D + Space gameplay.
https://github.com/FRex/Heart
Title: Re: Heart
Post by: Hapax on February 13, 2016, 05:36:59 pm
Took me a while to figure out the idea (I had trouble working out what the original one was doing) but it seems that it counts as a match if the colour contains the other colour. Green is okay hitting green, yellow, cyan and white, for example. Is this right?

Could do with being able to restart when being "heartbroken"  :'(

p.s. I reached level 5
Title: Re: Heart
Post by: FRex on February 13, 2016, 07:00:12 pm
Yes, it's standard RGB thing with color mixing.
White is hit by anything. Red hits itself, yellow and magenta. Green hits itself, yellow and cyan. Blue hits itself, cyan and magenta.
I had no idea what the original was doing for it's colors, it had blue, red and yellow for the heart and many colors for the ring, including non 'clean' ones like orange. I don't even know how it controlled. ;D

Quote
Could do with being able to restart when being "heartbroken"  :'(
Yeah, it's really unpolished like that, no menus, no sound, no screen between levels and so on. I just cut everything when I was starting to get too ambitious and left just the RGB mode and gameplay itself in.
Title: Re: Heart
Post by: Hapax on February 13, 2016, 09:35:29 pm
I think you managed to reproduce the original (the early one in the video) version pretty well so good work  :)

The game itself is quite playable, although gets quite irritating quite quickly (if there were harder levels, I'd cry). It's hard to remember which colours you can hit.

I don't know what "too ambitious" is  :P
Why did you cut ideas? Is it just because it was a quick version of someone else's idea or because you don't have the time? ;)
Title: Re: Heart
Post by: FRex on February 14, 2016, 06:08:03 am
Quote
I think you managed to reproduce the original (the early one in the video) version pretty well so good work  :)
I have no idea what controls it had though, maybe it shot the bullets itself and you used the mouse to rotate? It seems the rotation is not fixed speed in his video.

Quote
The game itself is quite playable, although gets quite irritating quite quickly (if there were harder levels, I'd cry). It's hard to remember which colours you can hit.
It's a good training for memorizing RGB though. ;D
I already remember it a little better just because I wrote this game.
And there is nothing past level 3, it's all the same after 3 rings and there's no speed up or anything.
If you're not unlucky and heartbreak yourself accidentally at start of a level when the heart is small you can go indefinitely.

Quote
I don't know what "too ambitious" is  :P
Why did you cut ideas? Is it just because it was a quick version of someone else's idea or because you don't have the time? ;)
In the end I just wanted to get it to playable state and 'shipped' quickly.
I have the time I guess (it didn't take a long time to write, it's a jam level game), but not the will.
I'm not exactly the most dedicated person. :P
Arcade style games are not exactly interesting to me either, but it was a nice day or two of coding and small enough to be doable for me, a bit like a self test to see if I can do a game if it's small enough because I keep making demos, help libs or proofs of concept and scraping them because I'm just a programmer and a very bad artist and game designer.
And if I added anything that required something else than SFML I'd have to set up windows and all dev tools on it to compile a windows exe. As it is now, anyone who has SFML can easily compile this on their own.
Although music, xml saves, settings and color modes (via pugi drop in source), sounds, menus, particles, cheats (to debug the game) and so on were all possible with just SFML. But I lost the will and was adding stuff to the todo list quicker than I was getting it done so... :P
I actually had saves, a simple menu and different color modes already but deleted them (I have a copy of it in case I need it of course).
I might update it, maybe even in next few days or someday when I feel bored, but then again, I might not... :P
Title: Re: Heart
Post by: Hapax on February 14, 2016, 06:01:01 pm
I have no idea what controls it had though, maybe it shot the bullets itself and you used the mouse to rotate? It seems the rotation is not fixed speed in his video.
I think - even if the original did use the mouse - you made the right choice. Controlling it with a mouse seems like it would be very cumbersome.
It does look like the original did, though  :o

If you're not unlucky and heartbreak yourself accidentally at start of a level when the heart is small you can go indefinitely.
A (intentional?) bug-cheat!  ;D

a bit like a self test to see if I can do a game if it's small enough because I keep making demos, help libs
I too am like this. It's one of the reasons I started the practice games but I even lost motivation to keep at that. It's also the reason I participated in the last jam - to actually finish a game!
I have a number of (mostly SFML) projects that I juggle. The problems with this is that whenever you switch back to one, you kind of forget where you were, and you end up not finishing any of them  :(
The good thing about it, though, is if you learn something with one, you can apply it easily to others as if you've known it the entire time  8)

I don't know why you removed working features but I'd probably do the same thing if it wasn't to the final standard I wanted them to be. Maybe you, at least, release an "un-finished" rough version with the extras  :)
Title: Re: Heart
Post by: FRex on February 15, 2016, 03:17:33 am
Quote
I think - even if the original did use the mouse - you made the right choice. Controlling it with a mouse seems like it would be very cumbersome.
It does look like the original did, though  :o
It's not THAT cumbersome IMO and it allows quick rotation. But I don't think you can ever be stuck in unwinnable situation in my version since at most you'll need to rotate 120 at most to get to any segment.

Quote
I too am like this. It's one of the reasons I started the practice games (...)
If you are more of a designer and artist programmer than programmer programmer (think Edmund McMillen and Florian Himsl - two programmers but one is more arts-y and designer-y than the other who does the majority of code) then we can work on something together. ;)

Quote
I don't know why you removed working features but I'd probably do the same thing if it wasn't to the final standard I wanted them to be. Maybe you, at least, release an "un-finished" rough version with the extras  :)
It was just a level selection (literally just few Text lines) and few other color modes, an insta death black and white one, a cmyk one without the key color and one where you had 4 SFML colors from the logo. Although more could come easily since I used xml to describe them.
Title: Re: Heart
Post by: ramaskrik on February 15, 2016, 09:48:46 am
Hell, the game is pretty addicitve :D

Anyway, I have sent you a PR on Github. It got me a bit angry I couldn't just git clone, cmake, make and play :)
Title: Re: Heart
Post by: Satus on February 15, 2016, 12:00:44 pm
It looks really good, but could use some antialiasing  ;)
Title: Re: Heart
Post by: FRex on February 15, 2016, 04:03:09 pm
Quote
Anyway, I have sent you a PR on Github. It got me a bit angry I couldn't just git clone, cmake, make and play :)
Isn't that a bash + gcc/clang only instruction in the readme though? What about Visual Studio?

Quote
It looks really good, but could use some antialiasing  ;)
My card doesn't support it so I have no idea how it'd look. What would be a good/valid value?
Title: Re: Heart
Post by: Satus on February 15, 2016, 04:55:17 pm
My card doesn't support it so I have no idea how it'd look. What would be a good/valid value?

No idea.
Title: Re: Heart
Post by: ramaskrik on February 15, 2016, 06:45:56 pm
Isn't that a bash + gcc/clang only instruction in the readme though? What about Visual Studio?

I clarified the instructions.

I don't have Visual Studio, so I can't test it. Anyway, the "hard part" (CMake files) is done, so for someone making Visual Studio instructions it should be fairly easy.
Title: Re: Heart
Post by: FRex on February 15, 2016, 06:57:42 pm
I merged it but then I undone it (forcefully) so now it's closed but not in the repo.
I've undone it because I noticed when testing it out that I didn't ever remove pugi xml from src when cutting down the game (so I did that just now).
Sorry about that. ;D
Title: Re: Heart
Post by: ramaskrik on February 15, 2016, 07:11:28 pm
I've fixed it and created another PR.
Title: Re: Heart
Post by: FRex on February 16, 2016, 12:04:33 am
Thanks, I have no idea how to write CMake files, just how to use them. :P
Title: Re: Heart
Post by: Hapax on February 16, 2016, 01:28:36 am
I have no idea how to use or write cmake files  :'(

For anti-alias, you could try just 1, or hit a high one like 8 and let it slip back to the highest available. You should probably disable the SFML error stream while you set up the window (https://github.com/Hapaxia/SelbaWard/blob/master/examples/lineExample.cpp#L41-L47), though.

If you are more of a designer and artist programmer than programmer programmer (think Edmund McMillen and Florian Himsl - two programmers but one is more arts-y and designer-y than the other who does the majority of code) then we can work on something together. ;)
I wouldn't know how to categorise myself there. I suppose I would like to think that I could adapt to the role I was aiming for. I'd be willing to give something a go. At least we'd definitely have the sound part covered  :P

a cmyk [colour mode]
This. I had just commented on how hard it was to get used to quickly recognising which RGB colours can match and then you mention this. This would be hell! Still, it should have a white background...  ;D
Title: Re: Heart
Post by: FRex on February 16, 2016, 04:30:46 am
Quote
I have no idea how to use or write cmake files  :'(
How do you compile SFML then? ???

Quote
This. I had just commented on how hard it was to get used to quickly recognising which RGB colours can match and then you mention this.
I'm sure I could make it even worse than just CMYK if I sat at it.

Quote
This would be hell! Still, it should have a white background...  ;D
Black in cmyk is just to minimize the color ink usage and because it's better black than mixing the three. So no point of having it in the game.
Title: Re: Heart
Post by: ramaskrik on February 16, 2016, 07:47:17 am
Thanks, I have no idea how to write CMake files, just how to use them. :P
You're very welcome. I just copied it from my current project and changed it appropriately.
As to the readability of the CMake files, the main one is commented, so you can change the stuff to your liking.

Quote
This would be hell! Still, it should have a white background...  ;D
Black in cmyk is just to minimize the color ink usage and because it's better black than mixing the three. So no point of having it in the game.
I was actually thinking that multiple shadows of RGB colors would be great, and the percentage of RGB colors (like here for instance: http://colorschemedesigner.com/csd-3.5/) with some offset would define how much points you'd gain/lose.
Title: Re: Heart
Post by: Hapax on February 16, 2016, 05:15:32 pm
Quote
I have no idea how to use or write cmake files  :'(
How do you compile SFML then? ???
Who said that I do (http://www.sfml-dev.org/download/sfml/2.3.2/)?  :P
I tried it once (very early on) and it failed. I've avoided doing it again since, even though I've built lots of other things since then! I think it's because CMake had an error that I didn't understand and I'm yet to forgive it for that.

Black in cmyk is just to minimize the color ink usage and because it's better black than mixing the three. So no point of having it in the game.
True, but mixing the three should create a black so the background would have to be white  ;D
Internally, it'd just be inverting every RGB, wouldn't it?