dawid Temat założony przez niniejszego użytkownika |
Silnik do tworzenia gry 2d » 2013-12-15 11:53:31 Cześć, chciałbym stworzyć dość prostą z pozoru gierkę, która będzie polegać na tym, że taki sobie ludek będzie biegał po labiryncie i zbierał monety. Na to wszystko będzie miał czas. Z każdym poziomem będzie trudniej(więcej monet, mniej czasu etc). Mam do Was pytanie. Jaki silnik graficzny do tego zastosować? SFML, Allegro czy może jakiś inny? |
|
pekfos |
» 2013-12-15 11:54:27 SFML. |
|
SeaMonster131 |
» 2013-12-15 12:24:38 Lub spróbuj Allegro5. |
|
polkom21 |
» 2013-12-15 12:35:25 SFML obiektowo a Allegro strukturalnie więc wybierz jak jest Ci wygodniej pisać. Ja polecam SFML. |
|
dawid Temat założony przez niniejszego użytkownika |
» 2013-12-15 16:17:55 A skąd pobrać SFML 2.1 i jak je skonfigurować? Na tej stronie nie ma podanego SFML do Code::Blocks: http://www.sfml-dev.org/download/sfml/2.1/ Ma ktoś może już skonfigurowane Code::Blocks pod SFML 2.1? Może mi ktoś przesłać w .rar/.zip już skonfigurowane? Bo nie mogę sobie poradzić z tym. |
|
pekfos |
» 2013-12-15 16:24:40 Możesz sobie używać nawet notatnika, to nie ma żadnego znaczenia. Liczy się kompilator. Jeśli masz najnowsze C::B, to masz tam dołączone TDM GCC 4.7.1, bodajże. Jeśli używasz innego, pobierz źródła i kompiluj. |
|
dawid Temat założony przez niniejszego użytkownika |
» 2013-12-15 16:30:57 Ale kiedy nie da się najnowszym C::B niczego skompilować. Kod: #include <SFML/Window.hpp>
int main() { sf::Window oknoAplikacji( sf::VideoMode( 800, 600, 32 ), "Kurs SFML 2.0 - http://cpp0x.pl" ); while( oknoAplikacji.isOpen() ) { oknoAplikacji.display(); } return 0; }
Gdy wcisnę przycisk kompilacji pojawia się masa errorów i w nowej zakładce otwiera mi się plik o nazwie Config.hpp:
#ifndef SFML_CONFIG_HPP #define SFML_CONFIG_HPP
#define SFML_VERSION_MAJOR 2 #define SFML_VERSION_MINOR 1
#if defined(_WIN32) || defined(__WIN32__)
#define SFML_SYSTEM_WINDOWS #ifndef NOMINMAX #define NOMINMAX #endif
#elif defined(linux) || defined(__linux)
#define SFML_SYSTEM_LINUX
#elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh)
#define SFML_SYSTEM_MACOS
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define SFML_SYSTEM_FREEBSD
#else
#error This operating system is not supported by SFML library
#endif
#if !defined(NDEBUG)
#define SFML_DEBUG
#endif
#if !defined(SFML_STATIC)
#if defined(SFML_SYSTEM_WINDOWS)
#define SFML_API_EXPORT __declspec(dllexport) #define SFML_API_IMPORT __declspec(dllimport)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif
#else
#if __GNUC__ >= 4
#define SFML_API_EXPORT __attribute__ ((__visibility__ ("default"))) #define SFML_API_IMPORT __attribute__ ((__visibility__ ("default")))
#else
#define SFML_API_EXPORT #define SFML_API_IMPORT
#endif
#endif
#else
#define SFML_API_EXPORT #define SFML_API_IMPORT
#endif
namespace sf { typedef signed char Int8; typedef unsigned char Uint8; typedef signed short Int16; typedef unsigned short Uint16; typedef signed int Int32; typedef unsigned int Uint32; #if defined(_MSC_VER) typedef signed __int64 Int64; typedef unsigned __int64 Uint64; #else typedef signed long long Int64; typedef unsigned long long Uint64; #endif }
#endif
-------------- Build: Debug in aaaa (compiler: GNU GCC Compiler)---------------
mingw32-gcc.exe -Wall -g -DSFML_STATIC -IC:\Users\Dawid\Desktop\SFML-2.1\include -IC:\Users\Dawid\Desktop\SFML-2.1\include -c C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c -o obj\Debug\aaaaa.o In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:32, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Config.hpp:129: error: syntax error before "sf" C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Config.hpp:130: error: syntax error before '{' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Config.hpp:156: error: syntax error before '}' token In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Clock.hpp:32, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:33, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:35: error: syntax error before '{' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp: In function `asSeconds': C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:60: warning: empty declaration C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:70: error: syntax error before "const" C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:80: error: syntax error before "const" C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:85: warning: type defaults to `int' in declaration of `Time' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:85: error: storage class specified for parameter `Time' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Time.hpp:85: error: syntax error before "Zero" In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:34, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Err.hpp:32:19: ostream: No such file or directory In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:37, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Mutex.hpp:83: error: syntax error before "private" In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:39, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:32:18: locale: No such file or directory C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:33:18: string: No such file or directory In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:39, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:51: warning: type defaults to `int' in declaration of `std' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:51: error: storage class specified for parameter `std' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:51: error: syntax error before ':' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:56: warning: type defaults to `int' in declaration of `std' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:56: error: storage class specified for parameter `std' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:56: error: conflicting types for 'std' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:51: error: previous definition of 'std' was here C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:56: error: syntax error before ':' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:251: error: syntax error before ':' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:251: error: declaration of `operator' as array of functions C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:284: error: syntax error before "std" C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:306: error: syntax error before ':' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:318: error: syntax error before ':' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/String.hpp:345: error: syntax error before "const" In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:40, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Thread.hpp:33:19: cstdlib: No such file or directory In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:40, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Thread.hpp:41: warning: empty declaration C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Thread.hpp:42: error: syntax error before '}' token C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Thread.hpp:174: error: syntax error before "private" C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Thread.hpp:189: error: syntax error before "priv" In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:41, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/ThreadLocal.hpp:79: error: syntax error before "const" In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:43, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.hpp:32:21: algorithm: No such file or directory In file included from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.hpp:731, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System.hpp:43, from C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/Window.hpp:32, from C:\Users\Dawid\Desktop\C++\aaaa\aaaaa.c:1: C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:53: error: storage class specified for parameter `offsets' C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:53: error: parameter `offsets' is initialized C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: excess elements in scalar initializer C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: (near initialization for `offsets') C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: excess elements in scalar initializer C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: (near initialization for `offsets') C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: excess elements in scalar initializer C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: (near initialization for `offsets') C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: excess elements in scalar initializer C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:55: warning: (near initialization for `offsets') C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:56: warning: excess elements in scalar initializer C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:56: warning: (near initialization for `offsets') C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:59: error: parameter `trailingBytes' is initialized C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:59: error: `trailing' undeclared (first use in this function) C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:59: error: (Each undeclared identifier is reported only once C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:59: error: for each function it appears in.) C:/Users/Dawid/Desktop/SFML-2.1/include/SFML/System/Utf.inl:59: confused by earlier errors, bailing out Process terminated with status 1 (0 minutes, 0 seconds) 37 errors, 15 warnings (0 minutes, 0 seconds)
O co chodzi? |
|
pekfos |
» 2013-12-15 16:35:25 O to, że plik w języku C++ ma rozszerzenie .cpp. |
|
« 1 » 2 |