SFML community forums
General => SFML projects => Topic started by: grimmreefer on October 10, 2012, 09:09:59 am
-
This is a little preview of my current Game Project.
http://youtu.be/xluGhID1fM4
-
Video is unavailable atm. Could you tell us about the project a bit more?
-
Sorry, now the video works.
It will be a open World Survival Sandbox game
-
Interesting!
What does the player have to survive? The upcoming zombie apocalypse? :o
-
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? ???
-
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". ;)
-
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.
-
This looks neat. I love the underground digging. The idea of leaving rabbit holes everywhere is really cool.
-
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?
-
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?
-
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.
-
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. ;)
-
you can see them all the time in the inventory? no just if you click it whit your cursor?
-
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)
-
Ok, everything fine.
Hmm, maybe an idea whats the problem?
-
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!
-
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? ;)
-
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 :)
-
But back to the question how this can happen.
On a long view, a big problem.
-
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... ;)
-
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
-
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?
-
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.) ;)
-
@Halsys
could you please download my app, try it and tell me if everything is alright.
-
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
-
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
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.
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. :\
-
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
-
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)
-
Nicht schlecht
Wie ist mein Deutsch?
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?
-
Nicht schlecht
Wie ist mein Deutsch?
Wahrscheinlich besser als meines. :D
try downloading the copy you gave us and run that?
yep
-
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'. ;)
-
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.
-
Which graphic card have you?
-
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. ;)
-
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?
-
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:
- Don't use global variables and don't even think about using global instances! (E.g. no global sf::RenderWindow, no global sf::Clock...).
If you 'need' global objects then your design is most probably flawed. - Don't use the C prefix for classes, it's unnecessary and an old Microsoft relic.
- CLights::AddLigth should be named CLights::AddLight
- locallConverter.hpp should be called localConverter.hpp
- Keep the code naming consistent; e.g. localConvert should like the rest of the files get called LocalConverter or all member variables should use the m_ prefix, etc.
- Try to reduce code repetition as much as possible (e.g. the AddLigth calls in RunGame).
- To get a nicer draw call derive the object which can be drawn from sf::Drawable (object.draw(window) -> window.draw(object)).
- Make use of the initialization list to initialize member variables.
- Inventar and Objekt are German, the English words are Inventory and Object. ;)
- Maybe use more descriptive and less confusing names for Light and Lights.
- Don't use using namespace std, it's a little more to write, but after some time you get used to std:: and it makes things clearer where they come from.
- 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>
- Only include the class headers of the classes which are actually needed in that file. E.g. #include <SFML/Graphics/RenderTexture.hpp> instead of #include <SFML/Graphics.hpp>.
- Don't use a vector of vectors, but use one vector and calculate the two dimensions on your own.
- Maybe you should read again a bit about const correctness, I bet most of your arguments shouldn't get altered.
- Use consistent indenting.
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. ;)
-
:o So many things, omg.
is it still acceptable? Or did i waste my time?
-
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.
-
@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.
-
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.
-
: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. :)
-
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
-
How can i get the Global World coordinates to my local window coordinates?
I give sf :: view :: getCenter () in the function.
-
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. ;)
-
8) ok thx
-
sf::View hasn't a member called convertCoords, but sf::RenderTarget.
But i didn't understand how to use.
-
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. ;)
-
But i didn't understand how to use.
As I said: Read the documentation and the tutorial on the wiki. ;)
Link? ;D
-
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)
-
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.