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 - TypeOverride

Pages: [1]
1
SFML projects / Re: SFNUL
« on: April 10, 2014, 02:21:53 am »
So ive implemented this library for a prototype to test the features i need to making a working solution for my game.

At the moment i see a problem when try to remove a synchronized object that is not the last object that was pushed to the list. Its not working proper.

There is no way to use pointers for the synchronizer, so i have to carry around values.

When using _synchronizerServer.CreateObject<Entity>();
Also, the copy constructor will be called 2 times. With a pointer it shouldnt be such a cost problem.

But the main problem is that Synchroned Objects are values which i get over the CreateObject-Method where i cant really make a reference from, beside the list where the synchronized objects stored.

The memory allocation is changing automaticly when objects are removed form the STL containers, i guess.
 
I cant see how the STL container-classes manage the allocation of memory, but i see that something is wrong when i try to make something like:

_entities.push_back(_synchronizerServer->CreateObject<Entity>());
Entity& entityA = _entities.back();

So when i try to use entityA later, after i removed some other objects out of the _entities-list, it will shows that the reference is not valid anymore.

I think without modifying the synchronizer it wont work. I need pointers. Interrupt me, when im wrong, but is see no other way for the problem.
 
So ive manipulated the synchronizer.inl file like this and use now _synchronizerServer->CreateObject2<Entity>()

template<typename T, typename... Args>
T* SynchronizerServer::CreateObject2(Args&&... args) {
        T* object = new T(std::forward<Args>(args)...);

        object->SetSynchronizer(this);

        return object;
}

And now it works for me like it should.

I see two architecture hurdles,
A) Synchronization of sub-syncObjects of a syncObject.
B) Different views. At the moment i see that all syncObjects are there for synchronize all clients with the same objects, but why should objects be synchronized with clients/players where the object is currently dont visible. So i need more than one synchronizer (for each client (player)) that only synchronize the visible objects for a client.

So at the end it cant be solved in the way that the synchronizer handles the creation of the SyncObjects like it do with the CreateObject-Method.

With this way there is for each synchronizer a represenation of a SyncObject on Server-Side. So i have to remove the CreateObject-Method and give the synchronizer directly the SyncObject to make it possible to share the syncObject with all synchronizer (for each client) on the server.

2
SFML projects / Re: SFNUL
« on: February 24, 2014, 03:59:52 pm »
Sorry about that TypeOverride, I had to do the same thing and forgot to mention it.  ;)

Also I updated my above post.  :)

Thanks alot ! Without your help i would be lost in code.

3
SFML projects / Re: SFNUL
« on: February 24, 2014, 02:39:49 pm »
I compiled it success under Visual Studio 2013.

After each step "zsbzsb" gave me (Thanks! Thanks! Thanks!).
I had todo last one step. I think its a compiler bug workaround here.

------
In tls_channel.h i did:
     std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_write_cipher_states; // =
        // { { 0, nullptr } };
     std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_read_cipher_states; // =
         //{ { 0, nullptr } };

And in tls_channel.cpp i did in the Channel::Channel(..) constructor
     m_write_cipher_states.insert(std::pair<u16bit, std::shared_ptr<Connection_Cipher_State>>(0, nullptr));
     m_read_cipher_states.insert(std::pair<u16bit, std::shared_ptr<Connection_Cipher_State>>(0, nullptr));
------

Now i have to check if it is all running at runtime.

Thanks guys!!!!!

4
SFML projects / Re: SFNUL
« on: February 24, 2014, 07:34:08 am »
I can not believe that such a briliant piece of code is not buildable in windows. I dont want to believe it.

It is possible to build SFNUL using MSVC 2013, I just did it myself. Here is what it took for me to get it to build.

  • Add "BOTAN_DLL=" to the preprocessor
  • Add "NOEXCEPT=" to the preprocessor
  • Add "__func__=__FUNCTION__" to the preprocessor
  • Replace all instances of "noexcept" keyword with "NOEXCEPT" including in the external libraries
  • Add default constructors to the Botan::HTTP::Response and Botan::OCSP::Response classes

Thanks a lot. I am very close to the goal ^^.

i did every step and i get this error now (perhaps i did the constructor thing wrong?)


Error   4   error C2664: 'std::map<Botan::u16bit,std::shared_ptr<Botan::TLS::Connection_Cipher_State>,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>::map(std::initializer_list<std::pair<const _Kty,_Ty>>,const std::less<_Kty> &,const std::allocator<std::pair<const _Kty,_Ty>> &)' : cannot convert argument 1 from 'initializer-list' to 'const std::allocator<std::pair<const _Kty,_Ty>> &'   E:\GIT\SFNUL\SFNUL\extlibs\botan\include\botan\tls_channel.h   245   1   sfnul

the error occurs in tls_channel.h on
std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_write_cipher_states =
         { { 0, nullptr } };
      std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_read_cipher_states =
         { { 0, nullptr } };

what i did before was simple:

extlibs\botan\src\lib\utils\http_util\http_util.h
extlibs\botan\include\botan\http_util.h

Response() {}

and to

extlibs\botan\src\lib\cert\x509\http_util.h
extlibs\botan\include\botan\http_util.h

 Response() {}


Edit: Ok i compiled it success.

In tls_channel.h i did:
     std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_write_cipher_states; // =
        // { { 0, nullptr } };
     std::map<u16bit, std::shared_ptr<Connection_Cipher_State>> m_read_cipher_states; // =
         //{ { 0, nullptr } };


And in tls_channel.cpp i did in the Channel::Channel(..) constructor

m_write_cipher_states.insert(std::pair<u16bit, std::shared_ptr<Connection_Cipher_State>>(0, nullptr));
   m_read_cipher_states.insert(std::pair<u16bit, std::shared_ptr<Connection_Cipher_State>>(0, nullptr));


I think its a compiler bug. With this it is compilable. Now i have to check if it is runnable at runtime.

Thanks guys!!!!!



5
SFML projects / Re: SFNUL
« on: February 24, 2014, 02:43:17 am »
Thanks guys for helping me here. Sry to be such a rookie.

I hope i will get it working tomorrow. Only for checking if im doing it right:

root folder is C:\SFNUL

1) GIT for C:\SFNUL (Right Mouse -> Git Bash)
$ git clone https://github.com/binary1248/SFNUL.git

2) GIT for C:\SFNUL\SFNUL (Right Mouse -> Git Bash)
$ git submodule update --init --recursive

3) CMAKE (over DOS-prompt)
<E:\GIT\SFNUL\SFNUL> C:\"Program Files (x86)"\"CMake 2.8"\bin\cmake .

Is this all? What does he mean with

make install (as root)

on https://github.com/binary1248/SFNUL ?

Do i miss a step?

6
SFML projects / Re: SFNUL
« on: February 22, 2014, 12:08:07 am »
    I can not believe that such a briliant piece of code is not buildable in windows. I dont want to believe it.

Of course it's frustrating that Microsoft is lacking behind, but simply saying "I don't care about VS" while a significant part of people use it is too narrow-minded. Saying "know your tool chains and just use gcc/clang" is even more so, considering that there can be other reasons to choose one product over another, and a small part of people may even be bound to a specific IDE at work.

In my opinion, a library developer should at least try to support the most recent versions of all major compilers. Visual Studio 2013 has made a big step forward compared to 2012 concerning C++11 support, so the porting effort should be kept in reasonable bounds. That's just my point of view and the attitude I used while developing Thor -- and it's not a sole problem of VS, even if people like bashing Microsoft. I had to implement several workarounds for g++ and clang over time, for example I rewrote a significant part of TR1 random functionality, and I could not use lambda expressions in specific situation on clang because of a compiler bug.

Its a shame :( .  binary1248 is very resolut.

Current state:

BOTAN_DLL is marked red and causing an error. First of the 19497 errors is:

Error   1   error C3861: 'visibility': identifier not found   C:\SFNUL\extlibs\botan\include\botan\assert.h   18   1   sfnul

Edit:
First i recognize that "Replaced TropicSSL by Botan (20 days ago)".

Notice:
Versions 1.11.0 and later require a mostly-compliant C++11 compiler such as Clang 3.1 or GCC 4.7.

Thoughts: Perhaps first try the 1.10.0 to get to the goal !?

Edit:
-Botan compiling-
1) Download Pyhton >2.6 (http://www.python.org/downloads/)
2) open dos-prompt (shell)
3) <C:\SFNUL\extlibs\botan>c:\Python27\Python configure.py --cc=msvc

Than there is a "Makefile"-file now. (i see too there is a build.h file now that defines the BOTAN_DLL).
It getting better.

Thoughts: I think i have to go with "nmake" of Windows now to get a VisualStudio project !?

4) <C:\SFNUL\extlibs\botan>C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\VC\bin\nmake

writing ERROR:
NMAKE : fatal error U1077: 'cl' return code '0x1' [/list]

next try --- goto 3)
3) <C:\SFNUL\extlibs\botan>c:\Python27\Python configure.py --cpu="i386"

4) <C:\SFNUL\extlibs\botan>C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\VC\bin\nmake

writing ERROR:
makefile(1408) : fatal error U1001: syntax error : illegal character '.' in macro

Thoughts: Perhaps try to use "mingw" !?
Or going back to the Introduction -> - make install (as root) !?!? ->nmake ? but there is no makefile in the root. What is the CMake's module directory !? Im stuck.

7
SFML projects / Re: SFNUL
« on: December 23, 2013, 03:01:48 pm »
Git Bash:

for F:\GIT\PROJECTS\SNUFL (RM -> Git Bash)
$ git clone https://github.com/binary1248/SFNUL.git

for F:\GIT\PROJECTS\SNUFL\SFNUL (RM -> Git Bash)
$ git submodule update --init --recursive

This is the whole command. I have not much experience in Git. And had to to much research to get it working.
Now its easier yes.

"--init" and "--recursive" are the parameters?

---
Quote from: binary1248
Let me guess... the other libraries you use are either precompiled for Visual Studio 2012 by rocket-scientist-grade developers, or simply don't work on other compilers because of broken non-portable code
Is this a joke, that i dont understand? Sry im not a native english speaker. rocket-scientiest-grade developers i dont understand. My application depends on a lot
of submodules. The most written by me but there are two other good libraries i use. I study a little bit them. I can refactor every library, but this is not good, when newer versions come out of the libraries.
I have to make the changes again and again. Same with your library. But its better with one library, then making all the changes to 20 libraries, maybe.

I dont precompile libraries. I bind it directly in my solution, because maybe i make changes in that library. But then i talk to the developer most and ask him for making these changes i made for me in his library nativly.
But only if he wants it and he likes the new changes.

Quote from: binary1248
Writing a workaround for Visual Studio 2013 is simple

i will try it first. Than i give Visual Studio 2012 a chance.

Quote from: binary1248
You really want to remove every single occurrence of the term "boost" from the asio code?

No no, you told me that i initalized the git download wrong. I make a new try today to get the ASIO standalone version with your library.
Edit: I see i got it already and the library has cases for the C+11 standard.

Quote from: binary1248
Must be the first time I've seen someone admitting they posted without reading prior posts.

Ive readed it and updated the text. I thought you wouldnt read so fast my post.



Edit:
Quote
#if defined(ASIO_HAS_STD_ARRAY)
# include <array>
#else // defined(ASIO_HAS_STD_ARRAY)
# include <boost/array.hpp>
#endif // defined(ASIO_HAS_STD_ARRAY)

he chooses boost again.... (but its the ASIO library. So i have to see where the problem is why ASIO wants to use boost because http://www.cplusplus.com/reference/array/array/ should be there with Visual Studio 2013. Or not?)

Only for the completness , ive downloaded the project now in this way:
for C:\SFNUL
$ git clone https://github.com/binary1248/SFNUL.git

for C:\SFNUL\SFNUL
$ git submodule update --init --recursive

Edit2:
Dont missunderstand me. Im very thankfull for your help. I learn every day new things!

Edit3:
Ok i see i has to set ASIO_HAS_STD_ARRAY for getting the support, i think!
Visual Studio: properties -> c/C++ > Preprocessor -> Preprocessor Definitions ->
ASIO_HAS_STD_ARRAY
ASIO_HAS_STD_ADDRESSOF
ASIO_HAS_STD_SHARED_PTR
ASIO_HAS_VARIADIC_TEMPLATES

8
SFML projects / Re: SFNUL
« on: December 23, 2013, 02:14:11 pm »
Quote from: eXpl0it3r
No idea what you're looking at, but SFNUL is already based on a standalone version of ASIO, boost is not required.

but with
Git:
make a folder for the project on C for example -> C:\SFNUL (RightMouse on folder -> Git Bash)
$ git clone https://github.com/binary1248/SFNUL.git

for C:\SFNUL\SFNUL (RightMouse on folder -> Git Bash)
$ git submodule update --init --recursive

he downloads a Asio Version with Boost. Perhaps i do something wrong, but i get a version with a few Boost
references.

Quote from: Nexus
but simply saying "I don't care about VS" while a significant part of people use it is too narrow-minded.
I understand him when he says that he dont want to support from state of the art old compilers. I hate
non-state-of-the-art things too. I dont realized it that microsoft's compiler are not comform to the latest
standard. But avoid Visual Studio is surely bad for the distribution of the product.

And using a new compiler for my whole project for example, brings new problems for sure. I drive good with
the native Visual Studio compiler and would rather change this library instead of changing my whole application to
a new compiler.

Quote from: Nexus
so the porting effort should be kept in reasonable bounds
I think too. There will not much to change.

Im a little bit sad about this. The library seems to be very awesome, like the developer of it.
At the moment its there are a lot of problems for me to implement it in my visual studio 2012 project (at the moment i try to get it run under visual studio 2013, to see where are the big difference of the state-of-the-art compiler and the latest native visual studio compiler),
but i hope it will be a matter of time until i get it run.

But the two task are standing in the room for me:

A) Making it working under Visual Studio 2013 native compiler(better for me would be Visual Studio 2012)
B) Removing all the Boost-Relations from ASIO (Or to figure out why he downloads not the standalone version)


Quote from: Nexus
Standards exist for a reason, and if you use non-standard tools/OS/whatever, then it is your responsibility to make it work for yourself.

But for the most the standard is microsoft. You are a minority to avoid it. I fully understand you, its your decession, its your library. But you exclude people that are not willing to make a lot of research and a lot of effort to get your library working.

Im bound on Visual Studio. Visual Studio is making all for me. I dont want to know more low-level compiling and other things around advanced compiling. I dont want to get more advanced in building my projects.

But i have huge interest of implement it. So i have to make workarounds. I think the most people who wants to use it, have to make workarounds.

And there i am and i have the another problem i have to solve, for that i need help from you.
I hope you can help me.


You've said that you use the Standalone Version of ASIO. But Git donwloads automaticly a version with Boost-references. What do i wrong?

Git:
make a folder for the project on C for example -> C:\SFNUL (RightMouse on folder -> Git Bash)
$ git clone https://github.com/binary1248/SFNUL.git

for C:\SFNUL\SFNUL (RightMouse on folder -> Git Bash)
$ git submodule init
$ git submodule update

9
SFML projects / Re: SFNUL
« on: December 22, 2013, 03:00:06 am »
Ive do this:

Install Git.
Install CMake.

Git:
make a folder for the project on C for example -> C:\SFNUL (RightMouse on folder -> Git Bash)
$ git clone https://github.com/binary1248/SFNUL.git

for C:\SFNUL\SFNUL (RightMouse on folder -> Git Bash)
$ git submodule update --init --recursive

CMake with Visual Studio 2013 config:
Where is the source code: C:/SFNUL/SFNUL
Where to build the binaries: C:/SFNUL/SFNUL

But its not working for Visual Studio 2013. Platform Toolset is v120 (latest) under Visual Studio 2013.

Error   2   error C2610: 'sfn::Thread::Thread(sfn::Thread &&)' : is not a special member function which can be defaulted   C:\SFNUL\Concurrency.hpp   28   1   sfnul


I know now from you that C++11 compiler standard maybe not be 100% in Visual Studio with the native compiler. But i dont want a different one because different compiler means different problems i think.

I only have to change the = default C++11 for autogenerate the constructor. Not a big change, but makes it run under the latest Visual Studio native Compiler.

So i think the only way is for me to downgrade the library to a standard that can Visual Studio Toolset v120 (latest compiler) read.

You've said
As already stated before, it is known that SFNUL doesn't compile with 2012 or earlier, and there can be no "fix" for this because the library is C++11 code. Rewriting it so it compiles in 2012 would mean removing almost everything in SFNUL, and that obviously makes little sense.

I dont know if i understand. You say you have to rewrite all of the code for VS2012 that it runs under the native compiler Toolset v110, because the library uses C++11 code. v110 in VS2012 is C++11 too. Perhaps not has all features of it. 

I see too there are a lot of dependencies like boost too -> # include <boost/array.hpp> or <boost/weak_ptr.hpp> <boost/shared_ptr.hpp> which are not included in the project. Most people like me dont like boost because of the overhead you get of using parts of boost.

At the moment i see only the = default (C++11) only as problem for VS2012 or VS2013. But i will see more when i removed the all boost dependencies from the project.

I think C+11 standard has shared pointer and other things so you can ignore boost. So boost is not necessary so heavy to use. A lot of things in C++11 comes from boost. So boost is not necessary anymore for the most cases.

So i can use std::shared_ptr instead of <boost/shared_ptr.hpp>.

I see that the boost depencency comes from ASIO and they have a newer build that works without Boost and fully with C++11 features called Asio Standalone: http://think-async.com/Asio/AsioStandalone

It would be great if the awesome binary1248 update his library to the latest version to run it without boost.

10
SFML projects / Re: SFNUL
« on: December 22, 2013, 02:51:15 am »
Do you really think I support such a non-conforming compiler with money? Of course not, not when GCC and clang are available for free and are fully conforming. I only use the Express versions of Visual Studio to test compatibility when there is any doubt. They were always free and could do almost everything you could possibly need in a non-professional environment.

And for those who wonder, I only make use of the compiler, not the IDE. So it is cl vs g++ vs clang++. cl loses in everything hands down.

Ok. I feel alot of anger against microsoft i think. But its ok. I hate their attitude too. So much nice technology they have but always bound on their systems.

11
SFML projects / Re: SFNUL
« on: December 22, 2013, 02:36:44 am »
I have a Visual Studio 2012 Professional and know i have to use the Express Edition .. hmmm not so nice.

But this is the only way. I have to port all my applications to the next level. Ive did this before and it is always a mess.

12
SFML projects / Re: SFNUL
« on: December 22, 2013, 12:39:35 am »
Maybe someone needs to repeat it in plain text:

You can not build SFNUL with Visual Studio 2012! ;D

SFNUL uses C++11 features that are not supported by the compiler of Visual Studio 2012. If you want the library you need a compiler that supports more or at best all C++11 features. MinGW GCC 4.8.1 and above should work fine. Visual Studio 2013 might work, haven't managed to build it yet though.

Yeah i know. But i didnt know any other way to compile a library. So my question is how compile it, without using visual studio?

At the moment
Quote
You can not build SFNUL with Visual Studio 2012!
means for me i cant compile it because i have no knowledge of compiling without visual studio. So the question is how to compile it without visual studio?

13
SFML projects / Re: SFNUL
« on: December 21, 2013, 11:48:28 pm »
Yes i read it. I try to make it runnable in vs2012

One other question is how others compile this library when he say that vs2012 cant be used. And a compiler is not enough.

Quote
This means that you not only need a compiler that can compile C++11
i dont understand what he means. What is it what i need beside a C++11 compiler that uses C++11 features heavily?

What i did was:
1) Using GIT loading the project (i recognize that the extlibs are not downloaded), so
2) ive GIT loaded all the extlibs too.
3) used CMake an making a VS2012 project
4) fixed the problem with tropicssl and the missing inttypes header in vs2012
5) then i saw the heavy used C++11 features for which i have to use an other compiler i think  - didnt make it at the moment, because ...

... perhaps its easier... because of that i ask here how others like you would compile SFNUL?

14
SFML projects / Re: SFNUL
« on: December 21, 2013, 10:34:50 pm »
Ive try to run the library under Visual Studio 2012.

It cant be run because tropicssl doesnt work with Visual Studio 2012, because Visual Studio 2012 has no <inttypes>
So ive used http://code.google.com/p/msinttypes/ for the inttypes.

But there are enough other errors under Visual Studio 2012 that makes the library kind of hard to build.

Pages: [1]
anything