hamsterman wrote: |
---|
About gameplay, it could be a bit more colorful, like poisonous berries or berries of different size. |
Yes, I plan on adding more berry types with special properties and abilities (e.g. freeze berries that will stop the time for a while), but first, I want to create a groundwork that will allow me to do this easily.
hamsterman wrote: |
---|
Another nice thing would be if berries somehow notified that you're holding the mouse on them or at least that you've clicked on them. The square picking box feels weird. It is sometimes hard to tell whether you clicked the berry or the time ran out. |
Yes, I know... I think playing a sound whenever a berry is clicked would be enough, but maybe I'll add some special effects too (e.g. little dancing stars).
hamsterman wrote: |
---|
Lastly, you should make your game full screen. Many times I've clicked out of the window, it's quite irritating.. |
Haha, yeah, the only reason I disabled resizing was that I couldn't align the score string properly xD When I decrease the window width it shows up left and when I increase the window width it shows up right (actually, it doesn't show up, since it goes off screen...). I guess that's the first thing I'll try to fix.
hamsterman wrote: |
---|
Oh, and nice menu, by the way. |
Lol... I guess I'll have to replace it with a graphical one eventually...
hamsterman wrote: |
---|
About design, it seems a bit overcomplicated. Is there anything wrong with Berry map[width][height] with struct Berry{ BerryProperties* type; int timer; }; ? You don't even need a set, as the map is so tiny (but you can still have one). |
Indeed, having a primitive data type (int or double perhaps) to hold the time is a good idea, as it will allow me to implement a 'pause' feature and my freeze berries more easily (I don't seem to be able to 'pause' the SFML Clock...).
As for the berry properties, I really like the tag class system, as it's very very flexible. For example, suppose that I want to add a BombBerry. A BombBerry will be directly derived from Berry, not TimedBerry, and it will stay on the place it appears until I click it. When I click it, it explodes and destroys the surrounding berries (and I get credit for them of course). A BombBerry doesn't need life_time, (bonus) time or (bonus) score properties. All it needs is a radius property. No problem! This can be easily represented like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
struct RedBerryTag {};
struct SmallBombBerryTag {};
struct BigBombBerryTag {};
//...
template <class BerryTag>
struct BerryProperties;
template <>
struct BerryProperties<RedBerryTag>
{
enum {score=10,time=0,life_time=5};
};
template <>
struct BerryProperties<SmallBombBerryTag>
{
enum {radius=1};
};
template <>
struct BerryProperties<BigBombBerryTag>
{
enum {radius=2};
};
//...
|
Finally, I like having two containers for my berries. It's kind of cool xD
hamsterman wrote: |
---|
By the way, is this your original game or a copy of something? |
Well, you can't exactly say that a game where you click on things to get points is something original... I recall doing something like this a couple of years ago. That was easier though, as it was in Visual Basic. I had a big command button moving randomly on the main form. When you clicked on it you would get points and another command button would appear on the place you clicked. Both command buttons had pics on them. The first one had pics of three fellow student girls that I got from fb, and the second one had a pic of a red kiss.
Thanks for the feedback! :D