SFML community forums

General => SFML projects => Topic started by: aBallofWin on March 14, 2012, 08:18:39 pm

Title: [Revived] Before the Reign
Post by: aBallofWin on March 14, 2012, 08:18:39 pm
Hey all, I'm back!

I'm in Uni at the moment (Games Technology) and have decided to carry on with BTR. Development will be sluggish as I do have a lot of work to do. I've worked out some bugs that prevented me from continuing before. A new menu and a few fixes have been added so far.

The majority of work at the moment will be centered towards cleaning up the code, getting it a bit more efficient and getting it working on most (hopefully all) systems.

I'm going to wait a little longer before posting up some images, I want to work on designing some more parts of the game before doing so.

Latest version will always be available from my dropbox: https://dl.dropbox.com/u/106198621/Game%20release.zip


Please reply what you think plus any bugs or errors you may receive.

Cheers :)
Title: Before the Reign
Post by: Zephilinox on March 14, 2012, 09:25:30 pm
Can't figure out how to exit the building which the NPC called Jacob is inside of...
Title: Before the Reign
Post by: aBallofWin on March 14, 2012, 09:38:21 pm
Quote from: "Zephilinox"
Can't figure out how to exit the building which the NPC called Jacob is inside of...


Just keep talking to him :)
Title: Before the Reign
Post by: TheEnigmist on March 14, 2012, 11:26:56 pm
It doesn't start for me :(
It opens console but no game window :(
Title: Before the Reign
Post by: aBallofWin on March 14, 2012, 11:45:39 pm
Quote from: "TheEnigmist"
It doesn't start for me :(
It opens console but no game window :(


Ohh :/ does it say anything in the console window?
Title: Before the Reign
Post by: TheEnigmist on March 15, 2012, 12:35:37 am
Quote from: "aBallofWin"
Quote from: "TheEnigmist"
It doesn't start for me :(
It opens console but no game window :(


Ohh :/ does it say anything in the console window?

Nothing :(
It seems it has some memory problem. I got this problem when my vectors doesn't work properly. My SO is Win 7 64bit. What can this problem be?
Title: Before the Reign
Post by: Grimshaw on March 15, 2012, 01:45:59 am
It looks pretty amazing!

Just a tip, you would achieve a better immersion in the game if the character looked more "walky"

Maybe if you tried to add a little up-and-down animation when it walks, should look amazing, maybe even a little footstep sound.
Title: Before the Reign
Post by: Zephilinox on March 15, 2012, 02:17:31 am
Ah, I see, that is a little unintuative don't you think? it does look good, although there are some overlaps where there shouldn't be and the dialog boxes look really odd, the text is also quite hard to read.

but I'm being really pessimistic, good job with the game, I definitely couldn't build something like that.

Odd that you can't get it running in windows 7, considering I could get it running in wine, try adding a compatibility layer with XP and see if that works.
Title: Before the Reign
Post by: thePyro_13 on March 15, 2012, 02:37:44 am
Quote from: "TheEnigmist"
It doesn't start for me :(
It opens console but no game window :(

Same problem for me, Windows 7 64bit, with an AMD GPU.

OP is your game made using SFML 1.6, if so you may have to compile using the static library version of SFML to avoid a horrible AMD bug that causes the window to not appear.
Title: Before the Reign
Post by: Grimshaw on March 15, 2012, 03:39:36 am
Well worked for me with Win7 32 bits :)

NVIDIA GPU :)
Title: Before the Reign
Post by: aBallofWin on March 15, 2012, 10:15:37 am
Quote from: "thePyro_13"
Quote from: "TheEnigmist"
It doesn't start for me :(
It opens console but no game window :(

Same problem for me, Windows 7 64bit, with an AMD GPU.

OP is your game made using SFML 1.6, if so you may have to compile using the static library version of SFML to avoid a horrible AMD bug that causes the window to not appear.


Yeah, i decided to use sfml 1.6 for this :) I'll get round to compiling using the static library when I get home later and will then upload it!

Thanks for all the comments :D

Quote from: "DevilWithin"
Maybe if you tried to add a little up-and-down animation when it walks, should look amazing, maybe even a little footstep sound.


I had some problems when trying to animate the walking, I may go back now and try and solve that :D

That footstep sound isn't a bad idea!
Title: Before the Reign
Post by: aBallofWin on March 15, 2012, 10:17:47 am
Quote from: "Zephilinox"
although there are some overlaps where there shouldn't be


Yeah I know :( Mainly after the city place I started rushing with the collision and the overlay. I will have to remedy that in the new patch!
Title: Before the Reign
Post by: TheEnigmist on March 15, 2012, 12:07:12 pm
Quote from: "aBallofWin"
Quote from: "thePyro_13"
Quote from: "TheEnigmist"
It doesn't start for me :(
It opens console but no game window :(

Same problem for me, Windows 7 64bit, with an AMD GPU.

OP is your game made using SFML 1.6, if so you may have to compile using the static library version of SFML to avoid a horrible AMD bug that causes the window to not appear.


Yeah, i decided to use sfml 1.6 for this :) I'll get round to compiling using the static library when I get home later and will then upload it!

Thanks for all the comments :D

Quote from: "DevilWithin"
Maybe if you tried to add a little up-and-down animation when it walks, should look amazing, maybe even a little footstep sound.


I had some problems when trying to animate the walking, I may go back now and try and solve that :D

That footstep sound isn't a bad idea!


Aaah my f**king AMD GPU :lol: w8ing for the fixed version :)
Title: New links are up
Post by: aBallofWin on March 15, 2012, 01:32:15 pm
New download links are up for v1.1.0, with a few collision changes and static libraries.

It should work, but i couldn't static link audio just grahpics, window and system :)
Title: Before the Reign
Post by: BlueMagic on March 15, 2012, 03:43:15 pm
Works for me with a AMD gpu. How did you sort the depth in the game?
Title: Before the Reign
Post by: aBallofWin on March 15, 2012, 06:15:38 pm
Quote from: "BlueMagic"
Works for me with a AMD gpu. How did you sort the depth in the game?


If you're talking about the overlays, then i just drew it after drawing the map, so it was:
App.Draw(map);
App.Draw(hero);
App.Draw(map_overlay);

Hope this helps and cheers for trying it out :)
Title: Re: Before the Reign
Post by: aBallofWin on March 28, 2012, 08:02:49 pm
Source code has been uploaded! Enjoy!
Title: Re: Before the Reign
Post by: eXpl0it3r on March 29, 2012, 04:38:48 pm
I like the graphics but I'm not much of an RPG player.

A few things that you could work on:
Title: Re: Before the Reign
Post by: aBallofWin on March 29, 2012, 08:34:54 pm
I like the graphics but I'm not much of an RPG player.

A few things that you could work on:
  • The collision isn't done very nice, I get constantly stuck somewhere for no obvious reason...
  • The character needs some animation! It's not that hard. ;)
  • You first post should include an screenshot and maybe a bit a better structur (the new forum gives you sooo many new formating possibilties!)
  • Provide a portable version. I don't like to mess with installers since I know how to copy some files from location A to location B.

Cheers for the feedback, really appreciate it!

In the end, for the collision i rushed it a bit, especially in the forest and goblin cave scenes. I think what gets the player stuck is that when i created the collsion boundaries i had anti aliasing on, so edges of the black boundary are semi transparent which i think is causing it :(

I did have a decent go and a few days of trying to get animation to work. I had problems with the looping, as moving the character and animating the character are in two different if loops, which looking back probably wasn't that good of an idea lol

I will do the two last things after some dinner :D

Thanks again for testing it out!
Title: Re: Before the Reign
Post by: Tank on March 29, 2012, 09:02:54 pm
Congrats on your first finished game. :) Unfortunately I can't play it because I'm on Linux. Could you at least provide a ZIP with the binaries so I can give Wine a try?
Title: Re: Before the Reign
Post by: aBallofWin on March 30, 2012, 11:41:39 am
Congrats on your first finished game. :) Unfortunately I can't play it because I'm on Linux. Could you at least provide a ZIP with the binaries so I can give Wine a try?

Cheers :D There's a portable version available for V1.1.0, and that should work under wine if you run the .exe. I've also provided the source code with the game resources now so that you can compile them yourself if you want to :)
Title: Re: Before the Reign
Post by: Tank on March 30, 2012, 04:20:35 pm
Finally screenshots! Judging by your Deviantart page you did all the assets yourself. That's quite impressive, looks absolutely professional. Keep the good level up!

I'm just downloading it and will try to run it through Wine.
Title: Re: Before the Reign
Post by: Tank on March 30, 2012, 04:28:52 pm
Nice game you built there. Everything's a bit static (missing animations) and you can't really do much, but for a first game it works quite well.

Will you continue working on it?
Title: Re: Before the Reign
Post by: aBallofWin on March 30, 2012, 06:20:16 pm
Nice game you built there. Everything's a bit static (missing animations) and you can't really do much, but for a first game it works quite well.

Will you continue working on it?

I've been thinking about that recently! In the summer I'll be doing a few things, such as a little drama series on YT with some friends, a nyan cat game using sfml and i'll be making a game in rpg maker xp which follows alongside this game and then continues after the story in this game ends.

If I were to do more content i'd either look to improve what's there at the moment or make an expansion, I'm not sure at the moment. Depends if anyones really interested in seeing anything to go with this :P
Title: Re: Before the Reign
Post by: Tank on March 31, 2012, 10:42:22 am
Quote
Depends if anyones really interested in seeing anything to go with this
The question is: Do YOU feel like continue working on it? ;)
Title: Re: Before the Reign
Post by: aBallofWin on March 31, 2012, 02:25:16 pm
I kind of do, but I'm more interested in doing the other projects at the moment :P
Title: Re: Before the Reign
Post by: aBallofWin on May 04, 2012, 05:54:32 pm
Update: Added a new download for some people who couldn't render the bigger images; notably the forest scene!
Title: Re: Before the Reign
Post by: Ceylo on May 04, 2012, 08:28:09 pm
Hello!

I tried to build it on OS X but it gives the following error :-\ :

Code: [Select]
In file included from screens.hpp:14,
                 from main.cpp:3:
Game_city.hpp:26: error: ‘int wait’ redeclared as different kind of symbol
/usr/include/sys/wait.h:255: error: previous declaration of ‘pid_t wait(int*)’
Game_city.hpp:28: error: ‘int wait3’ redeclared as different kind of symbol
/usr/include/sys/wait.h:261: error: previous declaration of ‘pid_t wait3(int*, int, rusage*)’
Title: Re: Before the Reign
Post by: aBallofWin on May 04, 2012, 11:15:23 pm
Hello!

I tried to build it on OS X but it gives the following error :-\ :

Code: [Select]
In file included from screens.hpp:14,
                 from main.cpp:3:
Game_city.hpp:26: error: ‘int wait’ redeclared as different kind of symbol
/usr/include/sys/wait.h:255: error: previous declaration of ‘pid_t wait(int*)’
Game_city.hpp:28: error: ‘int wait3’ redeclared as different kind of symbol
/usr/include/sys/wait.h:261: error: previous declaration of ‘pid_t wait3(int*, int, rusage*)’

Hey! Cheers for trying to test it out :3

I think this might solve the problem:

Go into the file game_city.hpp and delete the lines 'int wait3 =0;' and 'int wait =0;' :)

These are on the 26th and 28th lines! Save that file and try to recompile it; 'might' work!
Title: Re: Before the Reign
Post by: Ceylo on May 04, 2012, 11:23:17 pm
Oh, I didn't try that because I thought both were used. Going to try :) .


Edit: works fine ! ;D Quite impressive by the way, although sometimes it's hard to move (obstacles and such).
Title: Re: Before the Reign
Post by: aBallofWin on May 04, 2012, 11:57:22 pm
Oh, I didn't try that because I thought both were used. Going to try :) .


Edit: works fine ! ;D Quite impressive by the way, although sometimes it's hard to move (obstacles and such).

Cheers! With the collision I did rush a little bit, mainly down to how tedious it was painting in places where the hero shouldn't be able to move XD
Title: Re: Before the Reign
Post by: aBallofWin on May 12, 2012, 01:52:12 am
Just a little update on the main post for those who are interested!
Title: Re: Before the Reign
Post by: kurayama on May 17, 2012, 02:39:04 am
Have you updated the source code to the new naming convention?
I want to test it, but it needs many changes to compile  :-\
Title: Re: Before the Reign
Post by: aBallofWin on May 17, 2012, 12:17:43 pm
Have you updated the source code to the new naming convention?
I want to test it, but it needs many changes to compile  :-\

the new naming convention?
Title: Re: Before the Reign
Post by: Ceylo on May 17, 2012, 12:37:08 pm
I think kurayama is talking of the new SFML 2.0 naming convention. But Before the Reign uses SFML 1.6.
Title: Re: Before the Reign
Post by: aBallofWin on May 17, 2012, 12:40:31 pm
I think kurayama is talking of the new SFML 2.0 naming convention. But Before the Reign uses SFML 1.6.

Cheers for clarifying that :) Plus I'm working on the quest system at the moment, so when that's near to complete I'll upload a demo.
Title: Re: Before the Reign
Post by: Jany on May 17, 2012, 02:36:22 pm
First of all: Very nice game, i am coding one myself too, also with 2D graphics and stuff! =)

I've only one problem in your game, :D after i left town and went on, i came through a little cave and ended up in a forest with thornes, i can go "through" some of the trees but then suddenly one tree has collision and i cannot go further, i can see a troll beneath me but cannot reach cause of that thorntree ;)

but so long: good job ! =)
regards
jany
Title: Re: Before the Reign
Post by: aBallofWin on May 17, 2012, 06:25:28 pm
First of all: Very nice game, i am coding one myself too, also with 2D graphics and stuff! =)

I've only one problem in your game, :D after i left town and went on, i came through a little cave and ended up in a forest with thornes, i can go "through" some of the trees but then suddenly one tree has collision and i cannot go further, i can see a troll beneath me but cannot reach cause of that thorntree ;)

but so long: good job ! =)
regards
jany

Cheers for the feedback :) With this next version, I plan to spend more time with the maps, as I had to quickly knock together collisions and overlays due to lack of time. If you want to ask any questions about it just ask :P
Title: Re: Before the Reign
Post by: Jany on May 19, 2012, 05:03:21 am
i may have a question ;) Did you draw the Sprites by yourself, or did you find them on the internet for free?
I am not a good pixelartist yet so my sprites look kinda weird and im looking for some nice looking ones^^


i found out that on the forest_collision.png was a tree that blocked the way, it may have gotten there by accident, after i deleted it i could get through and kill the goblin ;)
Title: Re: Before the Reign
Post by: aBallofWin on May 19, 2012, 04:13:27 pm
i may have a question ;) Did you draw the Sprites by yourself, or did you find them on the internet for free?
I am not a good pixelartist yet so my sprites look kinda weird and im looking for some nice looking ones^^


i found out that on the forest_collision.png was a tree that blocked the way, it may have gotten there by accident, after i deleted it i could get through and kill the goblin ;)

Hey :) For all of the sprites and maps, i found them online or used a generator:
http://www.famitsu.com/freegame/tool/chibi/index1.html
http://www.lorestrome.com/pixel_archive/main.htm

They're the two main sources :)

Title: Re: Before the Reign
Post by: Jany on May 20, 2012, 05:45:31 pm
i may have a question ;) Did you draw the Sprites by yourself, or did you find them on the internet for free?
I am not a good pixelartist yet so my sprites look kinda weird and im looking for some nice looking ones^^


i found out that on the forest_collision.png was a tree that blocked the way, it may have gotten there by accident, after i deleted it i could get through and kill the goblin ;)

Hey :) For all of the sprites and maps, i found them online or used a generator:
http://www.famitsu.com/freegame/tool/chibi/index1.html
http://www.lorestrome.com/pixel_archive/main.htm

They're the two main sources :)


Thank you very much, the Character creator is very nice. Even with my bad Japanese ^^
Title: Re: Before the Reign
Post by: aBallofWin on May 20, 2012, 09:40:36 pm
Haha, no problem :)
Title: Re: Before the Reign
Post by: aBallofWin on May 22, 2012, 01:04:53 am
News: An update concerning the beginnings of the new quest system have been put on. This includes a demo of a example quest and a little look at the maps being shown in parts. In this version there are no collisions and no overlays!

It's entirely for testing purposes only! Feedback is only wanted for the Quest system :) Thank you!

Title: Re: Before the Reign
Post by: Jany on May 23, 2012, 09:28:08 pm
The Quest system looks nice. Are you planning to build something like a Questjournal? Like you have a quest where you need to kill 5 goblins, but you forgot how many you killed so far and you want to look it up? or you forget what quests you actually have to do?

Are you gonna upload the source for the Quest System Alpha as well?

regards
Jany
Title: Re: Before the Reign
Post by: aBallofWin on May 24, 2012, 11:19:12 am
The Quest system looks nice. Are you planning to build something like a Questjournal? Like you have a quest where you need to kill 5 goblins, but you forgot how many you killed so far and you want to look it up? or you forget what quests you actually have to do?

Are you gonna upload the source for the Quest System Alpha as well?

regards
Jany

Hey :) Yeah along with the current preview I'll be adding a journal which shows the current quest and maybe completed quests. As for the source code, I might upload just the Quest part of the code, unless you wanted just this part of it?
Title: Re: Before the Reign
Post by: Jany on May 24, 2012, 04:18:44 pm
Hey :) Yeah along with the current preview I'll be adding a journal which shows the current quest and maybe completed quests. As for the source code, I might upload just the Quest part of the code, unless you wanted just this part of it?
Hey, yea thats what i mean :)
Title: Re: Before the Reign
Post by: aBallofWin on June 05, 2012, 05:00:50 pm
Update: Been working on an inventory system, check it out if you wish!
Title: Re: Before the Reign
Post by: StevenC on June 06, 2012, 05:14:54 am
Hello. I checked out the game and I saw you had a fair bit of code there. I wasn't sure if you were looking for feedback, but I thought I might make a few suggestions.

I think going forward your main obstacle for expanding the program is going to be the fact that a fair bit of the coding is specific to the game's quest. That is, your code cannot be easily reused for a different game that features similar content without rewriting code.

My suggestion would be to consider how you might turn parts of your prototype into reusable modules and to separate game details into data files. It may not be easy, but one thing you will find as you spend more time writing software is that productivity and modular code tend to go hand in hand.  Although it may take a little bit more time to design something to be reusable, it will save you tons of time later on.

You should also replace the switch statements used to produce "number" strings with formatted strings either using sprintf style or stl stringstream style. Another option might be although less efficient to use std::string and to_string like:

string mymessage = string("You did ") + to_string(DamageAmount) + string(" damage!");

This is not the most efficient way of doing this, but I sometimes use less efficient methods that produce easier to read (and maintain) code in situations where performance and efficiency are irrelevant.

Finally, the game crashed 90% of the times I tried to run it. I checked code and found this:

class Game_city : public cScreen
{
private:
    int movement_step;
    int posx;
    int posy;
    sf::Sprite Sprite;
...
};

Game_city::Game_city()
{}

And noticed that you failed to initialize non-class values in the constructor. Although the assumption might be that movement_step, posx, and posy are initialized to zero, in reality their initial value is undefined.

To prevent random unexplained crashes all of you constructors should initialize all non-class fields to zero or another safe value. For example:

Game_city::Game_city()
{
    movement_step = 0;
    posx = 0;
    posy = 0;
}

or

Game_city::Game_city() : posx(0), posy(0), movement_step(0)
{
}

If you don't assign values, the initial values may be zero, or it may be something random.

-Steven

Title: Re: Before the Reign
Post by: aBallofWin on June 06, 2012, 01:52:28 pm
Cheers for the feedback steven :) I think for programming this I will keep the quest system as is, but I will definitively keep that in mind for future projects.

As for the battle scene code, I do realise that it's extremely sloppy and when I get round to redoing it, it'll be a lot more efficient!

With the cScreen class, I've removed that from the game completely. When I first started on the game, using different scenes really helped but now that I look back at it, it really hindered the game.

One more thing, which version did you test? Version v1.1.0, or the indev version which is included at the top of the OP?

Cheers,

Jake.
Title: Re: Before the Reign
Post by: StevenC on June 07, 2012, 01:34:09 am
One more thing, which version did you test? Version v1.1.0, or the indev version which is included at the top of the OP?
Hello Jake,

I tested the indev version. I managed to get it to run once, and after that I went looking into the source code for v1.1.0. I didn't try compiling it though to see if the issues in the indev were present in the v1.1.0. I assumed they were fairly close, but it sounds like you may already be in the process of rewriting it.

-Steven

Title: Re: Before the Reign
Post by: aBallofWin on July 11, 2012, 02:21:32 pm
My last update for this page, I'm going to work on a side scroller shooting game (like metal slug) but obviously not as good! :) I'll be learning SFML2 first, then work on this new game, you will hear from me within the next few weeks!
Title: Re: Before the Reign
Post by: Stormblessed on July 21, 2012, 12:06:23 am
I don't know if I'm doing something wrong, but your download link in the OP doesn't seem to work.  It just takes you to the filedropper.com main page or something, any chance you can fix the link?
Title: Re: Before the Reign
Post by: aBallofWin on July 21, 2012, 02:26:27 am
I don't know if I'm doing something wrong, but your download link in the OP doesn't seem to work.  It just takes you to the filedropper.com main page or something, any chance you can fix the link?

Updated :) The codes a little bit messy though
Title: Re: [Revived] Before the Reign
Post by: aBallofWin on December 15, 2012, 03:01:48 am
I'm a back.
Title: Re: [Revived] Before the Reign
Post by: Roose Bolton of the Dreadfort on December 15, 2012, 03:55:47 am
Abertay Uni?
Title: Re: [Revived] Before the Reign
Post by: aBallofWin on December 15, 2012, 04:31:59 am
Abertay Uni?

Bristol :)