SFML community forums

General => SFML projects => Topic started by: grimmreefer on October 10, 2012, 09:09:59 am

Title: My new Project
Post by: grimmreefer on October 10, 2012, 09:09:59 am
This is a little preview of my current Game Project.

http://youtu.be/xluGhID1fM4
Title: Re: My new Project
Post by: Haikarainen on October 10, 2012, 10:07:40 am
Video is unavailable atm. Could you tell us about the project a bit more?
Title: Re: My new Project
Post by: grimmreefer on October 10, 2012, 10:42:25 am
Sorry, now the video works.

It will be a open World Survival Sandbox game
Title: Re: My new Project
Post by: Nexus on October 10, 2012, 09:12:19 pm
Interesting!

What does the player have to survive? The upcoming zombie apocalypse? :o
Title: Re: My new Project
Post by: grimmreefer on October 10, 2012, 10:12:16 pm
What does the player have to survive? The upcoming zombie apocalypse? :o


I'am not sure because my english isn't the best, but did you try to tease me?  ???
Title: Re: My new Project
Post by: eXpl0it3r on October 10, 2012, 10:14:42 pm
I'am not sure because my english isn't the best, but did you try to tease me?  ???
I guess he just wants to find out more about the project since you nearly haven't said anything about it.... ;)

Tell us a bit about your plans and ideas for "an open World Survival Sandbox game". ;)
Title: Re: My new Project
Post by: grimmreefer on October 10, 2012, 10:43:40 pm
Ok, i try to explain.

The world gone be very larg and you have to eat, trink, sleep. everything you need in life.
You need to go fishing, raise plants like corn or something else. build a shelter to protect you from wild animals,
or maybe some mystery creature.

I still think about the "One thing" that make my game special.

 
Title: Re: My new Project
Post by: thePyro_13 on October 11, 2012, 04:21:38 am
This looks neat. I love the underground digging. The idea of leaving rabbit holes everywhere is really cool.
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 05:35:57 pm
Hello everyone,  the work on my project is progressing well. But now i have a little problem.
On my computer i develop my program run fine, but if i try it on a other pc it goes crazy, many images are not displayed. text is displayed incorrectly.

What can i do?
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 05:42:02 pm
What can i do?
Give a proper description of the problem and look what the console output says.

Maybe you've misplaced the images and fonts so the application can't load them properly...
How do you load the resources and where do you put the resources?
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 05:56:28 pm
The console dont give any output, so i think all images are loaded correctly.

Here is a download for my project, pleas try it. Just run Temp.exe in the main folder.

https://legacy.sfmluploads.org/file/156


I = Open Inventory
E = Use Item(Currently works just the torchlight)

Normally you can see the picked up Objects in the Inventory and the Items are counted.
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 06:20:19 pm
Normally you can see the picked up Objects in the Inventory and the Items are counted.
I do see them, not sure what you did on the other system you tried. ;)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 06:21:46 pm
you can see them all the time in the inventory? no just if you click it whit your cursor?
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 07:06:36 pm
you can see them all the time in the inventory? no just if you click it whit your cursor?
Yes, like this:
(http://i.imgur.com/n0jpj.png)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 07:15:53 pm
Ok, everything fine.

Hmm, maybe an idea whats the problem?

Title: Re: My new Project
Post by: Halsys on November 26, 2012, 07:33:20 pm
So its a top down minecraft? Cool! Notch had a cool entry for the lundumdare, it was called minicraft.
https://s3.amazonaws.com/ld48/ld22/index.html (https://s3.amazonaws.com/ld48/ld22/index.html)
You can probably get a couple ideas from his game, Not to steal but to learn from.
Either way, awesome game.

I would also like to know when you are going to work on world generation? and how? Noise maps and random numbers?

Hallo von amerika!
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 07:42:03 pm
So its a top down minecraft? Cool! Notch had a cool entry for the lundumdare, it was called minicraft.
It's sad to see that people only see Minecraft everywhere... :(
It's a survival game and so is Minecraft (at least in the survival mode) but there's no other connection and even before Minecraft there were hundreds of survival games.

I would also like to know when you are going to work on world generation? and how? Noise maps and random numbers?
Who says he will implement a world generator? ;)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 07:45:34 pm
I know Minecraft and I admit now it still looks like that, but I want to make it quite different. Some elements act as a template, but the elements already seen in other games were.

Since whole concept is not final and is still going through changes.

The world will be randomly generated, and I still have to learn the function of the quad-tree.

@ eXpl0it3r

Thank you :)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 08:08:18 pm
But back to the question how this can happen.
On a long view, a big problem.
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 08:22:18 pm
But back to the question how this can happen.
On a long view, a big problem.
The only way is to debug your application on that PC, we can only make guesses and waste our and your time with the trial-and-error principle... ;)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 08:31:16 pm
you mean i have to install an IDE on my other pc and try to find the error? sounds horrible   :-\

just one thing:

which version of Sfml are you using, and which OS

Title: Re: My new Project
Post by: Halsys on November 26, 2012, 08:38:45 pm
Quote
It's sad to see that people only see Minecraft everywhere...
It's a survival game and so is Minecraft (at least in the survival mode) but there's no other connection and even before Minecraft there were hundreds of survival games.

Sorry, The Axe and shovel through me off... Minecraft really was a 3D mining game...
This one is a 2D digging game.... and they are both survival games.
Nonetheless... this game really reminds me of Minicraft... "Not Minecraft"
This whole situation kinda of reminds me of the release of Terraria... With the word "Minecraft" flying around.

And I do second the motion to debug it on the machine aswell.
Also, whats are the differences between the 2 machines by the way? Maybe there is a system requirement not met?
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 08:46:05 pm
you mean i have to install an IDE on my other pc and try to find the error? sounds horrible   :-\
Well you don't need an IDE for debugging (gdb would be enough), but it's easier to handle with an IDE.
Code::Blocks is portable so you could essentially just copy everything onto the other machine. ;)

which version of Sfml are you using, and which OS
The SFML version doesn't change, since you shipped it with the source and I'm using Windows 8, but this shouldn't really matter either.
But if you ask which version I usually use it's the latest release from GitHub.

Sorry, The Axe and shovel through me off... Minecraft really was a 3D mining game...
Wow, so it takes only a axe and shovel to turn a game into 'Minecraft'? ;D

This whole situation kinda of reminds me of the release of Terraria... With the word "Minecraft" flying around.
Well that's the problem with all the Minecraft kiddies. You can do whatever you want and all they see is Minecraft and as I said, it's sad... :-\

(Also don't take this offensive, my statements are meant to be more general than focused on your opinion.) ;)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 08:55:11 pm
@Halsys

could you please download my app, try it and tell me if everything is alright.

Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 09:06:20 pm
i copied CB from my laptop(where everything is ok) to my Tablet, compiled it and......same shit ass before  >:(

Laptop:

http://www.chiligreen.com/shop/configurator.asp?serie=375&id=8366 whit windows 8 64

Tablet:

http://support.acer.com/acerpanam/tablets/2011/Acer/ICONIATab/ICONIATabW500/ICONIATabW500sp2.shtml

Windows 8 32
Title: Re: My new Project
Post by: Halsys on November 26, 2012, 09:13:57 pm
Quote
could you please download my app, try it and tell me if everything is alright.

I did, and it ran fine... that's how I figured out you spoke German, from the source code. :D

Quote
Wow, so it takes only a axe and shovel to turn a game into 'Minecraft'?
And the torch, Don't forget the torch! :P

Like I said... it reminded me more of Minicraft.
And because Notch did make it... It kinda made me think more of minecraft.
I honestly don't know why I thought of minecraft.
My brain works in mysterious ways... cant help it.

Quote
Laptop:

http://www.chiligreen.com/shop/configurator.asp?serie=375&id=8366 whit windows 8 64

Tablet:

http://support.acer.com/acerpanam/tablets/2011/Acer/ICONIATab/ICONIATabW500/ICONIATabW500sp2.shtml

Windows 8 32

Driver update maybe? Not sure if it would work but it couldn't hurt.
Stupid idea is stupid...
It cant be windows 8 either... because I have it too.... and so do you. :\
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 09:15:23 pm
i copied CB from my laptop(where everything is ok) to my Tablet, compiled it and......same shit ass before  >:(
Now don't just run it but debug it! ;D
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 09:23:52 pm
could you please download my app, try it and tell me if everything is alright.

I did, and it ran fine... that's how I figured out you spoke German, from the source code. :D


So bad? ;D

my brother-in-law has the same problem whit my program, he runs windows 7.

by the way, how bad is my english 8)
Title: Re: My new Project
Post by: Halsys on November 26, 2012, 09:28:33 pm
Nicht schlecht

Wie ist mein Deutsch?

Quote
my brother-in-law has the same problem whit my program, he runs windows 7.
Well this is Fubar... Allright... We downloaded it... it worked... try downloading the copy you gave us and run that?
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 09:32:55 pm
Nicht schlecht

Wie ist mein Deutsch?

Wahrscheinlich besser als meines. :D

try downloading the copy you gave us and run that?

yep
Title: Re: My new Project
Post by: eXpl0it3r on November 26, 2012, 09:37:54 pm
my brother-in-law has the same problem whit my program, he runs windows 7.
Then you should probably start describing what goes wrong, rather than 'it doesn't work'. ;)
Title: Re: My new Project
Post by: grimmreefer on November 26, 2012, 09:48:04 pm
Probably start describing what goes wrong, rather than 'it doesn't work'. ;)

I hope I do not understand you wrong now, I thought the problem would be clear.


(https://legacy.sfmluploads.org/cache/pics/287_Unbenannt.png)

The cursor was just a brown quadrangle and no items get shows until i pick it up whit mouse.
Title: Re: My new Project
Post by: grimmreefer on November 27, 2012, 01:15:37 pm
Which graphic card have you?
Title: Re: My new Project
Post by: eXpl0it3r on November 27, 2012, 01:30:29 pm
Which graphic card have you?
I've an Readeon HD 6470M (ATI).

I quickly skimmed through your code and noticed quite a few things one shouldn't do. One of the things I see that could cause big problems are your global instances... :-\
I strongly advice you to use a class instead of letting everything lie around in the global scope. Just pack all your functions and objects of RunGame into one class, create an instance in main.cpp and use that objects to call functions.

If you want I can also give some more feedback on the code. ;)
Title: Re: My new Project
Post by: grimmreefer on November 27, 2012, 02:34:00 pm
Which graphic card have you?
I've an Readeon HD 6470M (ATI).

Ok, its not the graphic.

I quickly skimmed through your code and noticed quite a few things one shouldn't do. One of the things I see that could cause big problems are your global instances... :-\
I strongly advice you to use a class instead of letting everything lie around in the global scope. Just pack all your functions and objects of RunGame into one class, create an instance in main.cpp and use that objects to call functions.

If you want I can also give some more feedback on the code. ;)


So bad? Is my RunGame the worst or is there something worse?
Title: Re: My new Project
Post by: eXpl0it3r on November 27, 2012, 06:26:39 pm
Ok, its not the graphic.
It still can be, since ATi != ATI. I'm stuck with an older ATI-HP driver (can't update unless HP provides a new driver package :-\).

So bad? Is my RunGame the worst or is there something worse?
Well it's the only one not using a class, so yeah that's quite bad.

Here a few things you could change:
Quite a long list, as you see there's quite a bit that can be improved and when your done, you'll be glad you did it, because the source will look way better and more dense than the current chaos now. ;)
Title: Re: My new Project
Post by: grimmreefer on November 27, 2012, 06:47:41 pm
 :o So many things, omg.

is it still acceptable? Or did i waste my time?

Title: Re: My new Project
Post by: gyscos on November 27, 2012, 07:00:56 pm
is it still acceptable?
What do you mean ? It's not an exam, there is no minimum performance required to be acceptable. Is it acceptable for a company ? Probably not. But it's not what you're after - for now, at least.

Or did i waste my time?
eXpl0it3r gave you clues for improvements, so you didn't really waste your time. A complete restart might be an idea, but this will probably happens more than once anyway (and not because you suck ; it happens to many people), so don't feel down because of it.
Title: Re: My new Project
Post by: grimmreefer on November 27, 2012, 08:41:59 pm
@eXpl0it3r

i really like the idea with the RunGame Class, it should have been clear to me.
Above all I need no more global variable. And the entire management is simplified.

all beginning is hard, but thanks guys.
Title: Re: My new Project
Post by: FRex on November 27, 2012, 09:42:50 pm
Quote
Don't use backslashes for header inclusions. There's no problem with forward slashes under Windows (e.g. #include <SFML\Graphics.hpp> -> #include <SFML/Graphics.hpp>
Note for vs 2010 users: this seems to be totally supported by microsoft but, in their infinite wisdom, they've hidden the option under 'Tools->Options->Text Editor->C/C++->Advanced->IntelliSense->Use Forward Slash in #include Auto Complete' which is set to false by default.
Title: Re: My new Project
Post by: eXpl0it3r on November 27, 2012, 10:56:19 pm
:o So many things, omg.
is it still acceptable? Or did i waste my time?
Well many things are just minor corrections, like spelling and naming conventions, so don't get scared from a list. Also nothing is really mandatory on there, but they'll improve your code quite a bit and as I said, when you're done 'refactoring' you'll feel way more comfortable working with your code.

Nothing is wasted, because with every step you've learned something new. ;)
Keep in mind not that many get as far as you already have.
As gyscos already said, everyone needs some iteration until he gets a final product - nobody is born as a programmer. :D

i really like the idea with the RunGame Class, it should have been clear to me.
Above all I need no more global variable. And the entire management is simplified.
Yes!
I usually go with an Application class and a StateManager with different states (menu state, play state, credit state, etc). Maybe it's another thing you could look into, as an example my SmallGameEngine (https://github.com/eXpl0it3r/SmallGameEngine).

Note for vs 2010 users: this seems to be totally supported by microsoft but, in their infinite wisdom, they've hidden the option under 'Tools->Options->Text Editor->C/C++->Advanced->IntelliSense->Use Forward Slash in #include Auto Complete' which is set to false by default.
Cool didn't know that. :)
Title: Re: My new Project
Post by: MorleyDev on November 28, 2012, 02:19:31 am
No code is perfect code :) At the end of the day, everybody can improve all the time. It's one of the things that appeals to me about programming, there is always more to learn.

As some general advice, the less any section of code depends upon any other section of code the better. Statefulness is something you should look to reduce in your code as much as possible, because a reduced presence of state tends to reduce the complexity of the code without reducing the end result. Which is good because it makes code easier to understand, test, debug, write and maintain. All of those are good things.

This is why global variables are so, for me and many others, considered undesirable: They introduce state into all of your code wherever they go. It can quickly become an unmaintainable nightmare.

Of course some state is needed in video games, but it's still best if that state is contained to only where it's needed.

And, as always: Good luck and happy coding :D
Title: Re: My new Project
Post by: grimmreefer on December 01, 2012, 06:47:24 am
How can i get the Global World coordinates  to my local window coordinates?
I give sf :: view :: getCenter () in the function.

Title: AW: Re: My new Project
Post by: eXpl0it3r on December 01, 2012, 09:02:44 am
How can i get the Global World coordinates  to my local window coordinates?
I give sf :: view :: getCenter () in the function.
sf::View::convertCoords()
Btw it's nicely documented in the documentation and for sf::View there's a good tutorial on the wiki. ;)
Title: Re: My new Project
Post by: grimmreefer on December 01, 2012, 09:26:38 am
8) ok thx
Title: Re: My new Project
Post by: grimmreefer on December 01, 2012, 10:57:22 am
sf::View hasn't a member called convertCoords, but sf::RenderTarget.

But i didn't understand how to use.
Title: Re: My new Project
Post by: eXpl0it3r on December 01, 2012, 11:10:55 am
sf::View hasn't a member called convertCoords, but sf::RenderTarget.
Oh right, my bad... :D

But i didn't understand how to use.
As I said: Read the documentation and the tutorial on the wiki. ;)
Title: Re: My new Project
Post by: grimmreefer on December 01, 2012, 11:16:32 am
But i didn't understand how to use.
As I said: Read the documentation and the tutorial on the wiki. ;)

Link? ;D
Title: Re: My new Project
Post by: eXpl0it3r on December 01, 2012, 11:27:57 am
Link? ;D
I really, really hope you tried to find it first on your own, otherwise you're just an extreme badly lazy person.  >:(

Documentation (http://www.sfml-dev.org/documentation/2.0/classsf_1_1RenderTarget.php#ae5e7ba65ef73df2778b29b7fdcdb20ee) - Tutorial (https://github.com/SFML/SFML/wiki/Tutorial%3A-Using-View)
Title: Re: My new Project
Post by: grimmreefer on December 01, 2012, 12:08:34 pm



I really, really hope you tried to find it first on your own, otherwise you're just an extreme badly lazy person.  >:(

(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMXDaQTN1ns59hqIMqr0cBDXbN2UykNsTsN78VBheQz5qVE7tC5g)

Of course, I was even on github, but somehow I have not found. I'm sorry.