Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - eXpl0it3r

Pages: 1 ... 600 601 [602] 603 604 ... 722
9016
General / Re: Need help with map collsion Here is my game , your opinion ?
« on: December 23, 2012, 09:57:05 pm »
but no one of your replies helped me to know what exactly should i do , why i have never found any article or tutorial talking about collision with map while it's a fundamental thing :( ,

the first thing is the code in the map.cpp wich must be changed ?
for the player just getboundingbox is ok ?
We won't program for you (unless you pay us), but we only give points in the direction you should go, if you don't have enough knowledge on how to approach things you can ask again, but if you don't know at all where to start, it seems to me that you like some major knowledge in programming, which is required for the level you want to achieve things.

So our posts didn't say do X in file Y, but we gave you the idea you want, mainly: "Do a collision detection with each tile in the map that is interesting for the player."
If you don't understand that instruction you should ask again, but don't expect us to 'fix'/write code for you. ;)

Also if you haven't found anything on collision with maps etc. with Google, then I'd say you didn't search hard enough or with smart enough keywords...

9017
General / Re: Need help with map collsion Here is my game , your opinion ?
« on: December 23, 2012, 04:13:43 pm »
In my opinion it's too much code to go through and trying to understand it... Try to minimize it further.

If you want to check against the map you could simply iterate over all map tiles and do a collision check. Or you could calculate the approximate position in the map and check with the surrounding tiles.

9018
General / AW: Lock window resize, and software resize
« on: December 23, 2012, 03:09:52 pm »
Don't specify sf::Style::Resize and use window.setSize to change the size.
Also check the documentation. ;)

9019
General / Re: Linking Error LNK2019 with VS2012 and SFML 2.0
« on: December 22, 2012, 08:52:56 pm »
I actually did what's written in this tutorial
Would you bet your life on that statement? :P

So, what can I do to fix it?
Well you have to add them to the project settings as described in the official tutorial. ;)

9020
General / Re: Best way to cross-compile my game from linux?
« on: December 22, 2012, 08:17:21 pm »
8 hours but it was worth the time! :)
Well that's nothing compared to what you would've needed without a crossplatform library and some bug hunting that are done even from more or less professionals. ;D

VirtualBox is a nice way to go, but for all the readers that could misunderstood you, Windows XP is not the only Windows that can get installed in the VirtualBox. ;)

9021
Feature requests / Re: Windows 8 support
« on: December 22, 2012, 08:13:49 pm »
Hello i have windows 8 and i got a problem with this.

http://www.uploadscreenshot.com/image/1774678/8380512
Please open a new thread for your own questions!

9022
General / Re: Linking Error LNK2019 with VS2012 and SFML 2.0
« on: December 22, 2012, 08:11:17 pm »
Created a project based on this tutorial.
Please follow the official tutorials!

I'm using SFML dynamic. I added SFML both to Additional Include Directories and Additional Library Directories. I added *.lib files to Additional Dependencies.
I hope that doesn't mean that you actually wrote *.lib into the Additional Dependencies field, or did you? ???
From the linker error it seems like you don't link against sfml-window(-d).lib

9023
Since I've automated the whole building process for the Nightly Builds, I keep a modified copy of the cmake/Macros.cmake and whenever I build for TDM I replace the existing one. You can look at the diff of both here.

Also if you build with different configs make sure that you install the libs somewhere and the make clean build, otherwise the compiler might think that one lib has already been build although the settings have changed.

And most importantly make sure that you don't mix static runtime libs and shared runtime libs (note again that TDM links them by default statically).

9024
General / Re: Failing to compile with SJLJ SFML-2.0 binaries
« on: December 22, 2012, 06:46:36 pm »
Also it is interesting to note that the binaries you linked work, the ones I compiled myself however do not. Care to share your secret of using cmake properly?
What exactly do you mean by binaries? The examples or the SFML libs itself?

There's one special trick I've to use for TDM-GCC, because TDM builds things statically by default, thus you have to explicitly tell the compiler when to link dynamically, but I don't know if that has anything to do with it. Other than that I use CMake like you would with any other compiler...

9025
General / Re: Failing to compile with SJLJ SFML-2.0 binaries
« on: December 22, 2012, 05:47:03 pm »
And you did run gdb with the debug mode?

The direct casting from float to uint64_t(unsigned long long on compilers that have it) seems to work without a problem so I see no need to change it right now, since all I want to is get this simple main() to run, however I will keep it in mind.
Well it will give you a compiler warning with -Wall and in general one should always try to get rid of all compiler warnings. ;)

Anyways I've no idea what the problem is, maybe it's a faulty compiler setup?
Strange thing is, that all the examples on my SFML build work fine and I also use TMD-GCC SJLJ 4.7.1-2 (check it out here [7zip Archive]).

9026
General / Re: Visual Studio 2012 and SFML 2.0
« on: December 22, 2012, 05:23:16 pm »
Thank you for your nice nightly builds. :)
You're welcome! :)

9027
Graphics / Re: SIGSEGV Fault on exiting
« on: December 22, 2012, 05:22:31 pm »
SFML will also have a global context etc, but the problem you ran into might already be fixed in the newest commit on GitHub. So you might want to build SFML on your own (or use my Nightly Builds posted on the forum).

9028
Graphics / Re: SIGSEGV Fault on exiting
« on: December 22, 2012, 05:00:16 pm »
You're probably not doing anything wrong... SFML is known to have problems with the correct destruction of its global context/resources and I'm not sure what can be done.

9029
General / Re: Failing to compile with SJLJ SFML-2.0 binaries
« on: December 22, 2012, 04:57:04 pm »
Just to make sure again: You're 100% positive that you use the TDM GCC SJLJ version and don't mix debug and release modes (i.e. compiling as debug but using the release libraries of SFML)?

Also when do you get the SEG fault? Just as it starts or at exit or in between?
Have you tried to run your application in the debugger and step through everything manually?

And a last questions does it happen only with SFML or also when you just use std::vector or simply everything else? And if it's SFML, does it only happen with sf::Clock?

As for the code you posted: .asSeconds() returns a float, so don't force it into a uint64_t and if you need it as integer then use a cast (static_cast<uint64_t>). Additionally I'm not sure how crossplatform uint64_t is and thus it might be better to only use types that are known to be crossplatform and for the rest you could use sf::Int64 etc. since you're already using SFML. ;)

9030
General / Re: Failing to compile with SJLJ SFML-2.0 binaries
« on: December 22, 2012, 03:50:07 pm »
I'm not quite sure what the problem is, since I've used TDM-GCC successfully (see my nightly builds which include the SFML examples). As for the posted code there are a few things that one doesn't/shouldn't do...

The default main functions usually looks like one of those and doesn't had uint32_t...
int main()
int main(int argc, char *argv[])

Since the return type is int you should also return an integer rather than a boolean:
return 0;
Or just don't write any return statement, which is fine by the C++ standard , but just for the main function!

Third you shouldn't allocate a clock dynamically or you shouldn't manually manage memory at all. The posted code does at the moment leak memory, since you never call delete on the pointer.
If you need pointer like behavior then it's advised to use std::unique_ptr (or std::shared_ptr if the resource is shared) but in most cases it's possible to handle things on the stack rather than the heap.

Try the following code and check if you also get a SEG fault:
#include <SFML/System.hpp>

int main()
{
    sf::Clock clock;
}

Also is there a specific reason why you use TDM-GCC? The official MinGW build have made an update recently and now ship with GCC 4.7.2. ;)

Pages: 1 ... 600 601 [602] 603 604 ... 722