[TEST] C++ conversion
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
[TEST] C++ conversion
In order to have a codebase that I can hack in, I need to get rid of the nasty C code that makes up tmwa.
I renamed the files and fixed all the compiler errors while keeping behavior changes to a minimum.
There is now a test server this on caliban.homeip.net:6904
There is no new content on this server, it is just to confirm that it doesn't break anything that worked before (I have already unbroken one bug in my code and worked around one compiler bug)
---
If building this yourself, you may need to install/upgrade new packages (the 32-bit version of g++ instead of just gcc, version 4.4 or later. You may also build with clang by passing CXX=clang++ to the 'make' command; the required version is not exactly known but believed to be at least 2.9 (note that apple-branded clang has two version numbers, you want the one corresponding to LLVM))
In addition, I would also like feedback regarding which version of gcc or clang you are using - particularly, whether anyone other than Frost is still using gcc 4.4; and how many people besides Platinum still use gcc 4.5
Edit: the code is on the 'cxx' branch of the server repository
I renamed the files and fixed all the compiler errors while keeping behavior changes to a minimum.
There is now a test server this on caliban.homeip.net:6904
There is no new content on this server, it is just to confirm that it doesn't break anything that worked before (I have already unbroken one bug in my code and worked around one compiler bug)
---
If building this yourself, you may need to install/upgrade new packages (the 32-bit version of g++ instead of just gcc, version 4.4 or later. You may also build with clang by passing CXX=clang++ to the 'make' command; the required version is not exactly known but believed to be at least 2.9 (note that apple-branded clang has two version numbers, you want the one corresponding to LLVM))
In addition, I would also like feedback regarding which version of gcc or clang you are using - particularly, whether anyone other than Frost is still using gcc 4.4; and how many people besides Platinum still use gcc 4.5
Edit: the code is on the 'cxx' branch of the server repository
Former programmer for the TMWA server.
Re: [TEST] C++ conversion
o11c wrote: In addition, I would also like feedback regarding which version of gcc or clang you are using - particularly, whether anyone other than Frost is still using gcc 4.4; and how many people besides Platinum still use gcc 4.5
Code: Select all
gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Re: [TEST] C++ conversion
Code: Select all
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Re: [TEST] C++ conversion
Debian Squeeze> gcc --version
gcc (Debian 4.4.5-8) 4.4.5
Re: [TEST] C++ conversion
are you guys actually testing, too?
Former programmer for the TMWA server.
-
- Novice
- Posts: 52
- Joined: 05 Sep 2011, 23:30
Re: [TEST] C++ conversion
Hi,
I tested the "converted" server a bit, so far everything seems to work normally.
Tried all of the everyday stuff, like talking to NPCs, fighting, walking, using the bank, buying from NPC shops and such.
Anything specific you'd like me to test?
Regards,
Baeda
I tested the "converted" server a bit, so far everything seems to work normally.
Tried all of the everyday stuff, like talking to NPCs, fighting, walking, using the bank, buying from NPC shops and such.
Anything specific you'd like me to test?
Regards,
Baeda
Re: [TEST] C++ conversion
Not really - I'm not *expecting* anything to go wrong. Though before making this thread I did fix one unexpected problem that only occurs with old GCC, not with 4.6 or newer.baedamichi wrote:Anything specific you'd like me to test?
You might not have thought to test creating/deleting accounts and characters, both in-game and via ladmin.
Former programmer for the TMWA server.
Re: [TEST] C++ conversion
As there have been no reports of trouble I pushed this to master.
I will keep the cxx branch open for future work.
I will disable my instance on the test server and restart the main one.
I will keep the cxx branch open for future work.
I will disable my instance on the test server and restart the main one.
Former programmer for the TMWA server.
Re: [TEST] C++ conversion
what features you removed from server?
Re: [TEST] C++ conversion
In this conversion I did my best not to change anything. Pruning, refactoring, and addition will come later.4144 wrote:what features you removed from server?
Former programmer for the TMWA server.
Re: [TEST] C++ conversion
o11c, I didn't understand well if, among other things, you intended to get rid of all compiler warnings or not ?. If it's the case, i get a bunch of them (gcc 4.7.0). If it isnt expected, i ll throw them here.
Also, I'm quite concerned about all these changes: for example the scripting language is rather picky (like areatimers that dont work if the event string is too long......).
So I fear it might break things especially in cases where scripts are complex.
What do you think ?
Also, I'm quite concerned about all these changes: for example the scripting language is rather picky (like areatimers that dont work if the event string is too long......).
So I fear it might break things especially in cases where scripts are complex.
What do you think ?
Re: [TEST] C++ conversion
I didn't eliminate *all* the warnings, just the errors and a few of the (arbitrarily selected) "worst" warnings.v0id wrote:o11c, I didn't understand well if, among other things, you intended to get rid of all compiler warnings or not ?. If it's the case, i get a bunch of them (gcc 4.7.0). If it isnt expected, i ll throw them here.
Also, I'm quite concerned about all these changes: for example the scripting language is rather picky (like areatimers that dont work if the event string is too long......).
So I fear it might break things especially in cases where scripts are complex.
What do you think ?
Nothing should've changed about limits of the scripting engine. In future I will eliminate all length limits except the ones that must be sent to the client.
Former programmer for the TMWA server.
Re: [TEST] C++ conversion
V0id reports an issue with getarraysize on string arrays.
Former programmer for the TMWA server.
- baseballboy
- Knight
- Posts: 502
- Joined: 04 Jan 2009, 20:04
- Location: USA, North Carolina
Re: [TEST] C++ conversion
Slackware 13.37.0
gcc 4.5.2
gcc 4.5.2
BaseBaIIBoy - 99, Zalika - 95, Mou. - 86, baseballboy - 83, Abacus - 82, Laticia - 76
<o11c> More boobs please.
<o11c> More boobs please.
Re: [TEST] C++ conversion
Why does it need to be build with 32-bit?