Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2018-12-06 00:00:00Z and 2018-12-07 00:00:00Z
Avatar
@Saturn you need to chmod it probably
00:07
do chmod +x ./teeworlds
00:07
Otherwise the OS won't recognize it as a binary
00:08
And I think it will change the icon too
00:09
Normally you can chmod it in the UI as well with: right-click on the icon -> properties -> mark as executable
00:09
Or something like that
Avatar
wuhuu
00:15
i have compile teeworlds with heinrich
00:15
cmake thing
00:17
so it works @ChillerDragon
00:17
but looks super messy
00:17
after generateing Visual Studio project
00:18
00:18
I don't really understand, why. But heheh
00:18
it compiles stuff, but I can't run it from
00:18
visual studio
Avatar
ChillerDragon 2018-12-06 00:20:29Z
I find IDEs confusing so i stay away from them as much as possible o.O
Avatar
just CMake is not made
00:20
i mean, it have to be fixed
00:21
but i don't know cmake, so I can't help
Avatar
ChillerDragon 2018-12-06 00:21:27Z
i dont know cmake aswell
Avatar
I know, that it doesn't copy
00:21
stuff to
00:21
compiled folder
Avatar
ChillerDragon 2018-12-06 00:21:49Z
But i still managed some try and error for macos lul
Avatar
so, I don't have data folder
00:22
and SDL2/Freetype.dll out of box
Avatar
ChillerDragon 2018-12-06 00:22:11Z
ah ye ik
Avatar
(it should copy it automatically)
Avatar
ChillerDragon 2018-12-06 00:22:22Z
ill wait until heinrich fixes that xd
Avatar
me either :p
00:23
Oh! okay!
00:23
I fixed it
00:23
i set it as a "startup project"
00:23
😄
00:24
I also copied manually data folder and dll.s
00:25
wuhuuu
00:25
WOORKS !
Avatar
ChillerDragon 2018-12-06 00:26:39Z
and now?
00:26
what can u do with it?
Avatar
i will tr
00:27
to make breakpoints
00:27
and run it
00:28
To check, if it will stop
00:29
ha! yes!
00:30
It stopped at this line 😄
00:30
Now I can see, every step, what is executed when
00:30
cool hehe
Avatar
ChillerDragon 2018-12-06 00:35:01Z
yea could be cool
00:35
i guess
00:35
never missed that feature during tw dev yet
00:35
i use dbg_msg on every line xd
00:35
dbg_msg don't give you context
00:35
and current values of everything
00:35
(which you can change
00:35
from visual studio)
00:36
you can, for example. Make breakpoint, with if statements
00:36
so it will only trigger if something happen
Avatar
ChillerDragon 2018-12-06 00:56:05Z
you can also only dbg_msg if something happens lol
Avatar
@ChillerDragon printing is not always enough, debugging tools are very useful to understand what happens in a crash
09:31
@Saturn chmod u+x fixed it?
Avatar
btw @Savander there are some // ignore_convention placed in teeworlds whenever an odd if is used
11:27
so I guess that there was some code quality CI set up at some point, at least
11:27
no idea what happened to it
Avatar
That is interesting
Avatar
Download the files to the Windows 10 system, and the software housekeeper prompts for a hacker virus。
Avatar
ChillerDragon 2018-12-06 13:06:30Z
lol
14:21
Heinrich CMake works just fine on Windwos
14:22
1 thing, CMakeLists.txt dont contains every file, so it don't work at start (you have to put lsm1.map and few language .jsons into CMakeLists.txt)
14:23
Also, on Windows you can't have teeworlds code, with folder where the path contains
Avatar
comment that under the PR :)
Avatar
spaces
14:23
and
14:23
you have to put SDL an Freetype in correct folders
14:23
should be specified in documentation, somewhere
Avatar
where
Avatar
teeworlds.com just doesn't build from the doc' yet
Avatar
where are the dosc
14:23
docs 😮
Avatar
Contribute to teeworlds/documentation development by creating an account on GitHub.
14:24
I link that so often here lol
14:24
comment your windows experience under heinrich's PR please
Avatar
but no
14:25
you have to put it
14:25
others/sdl/windows/lib(32/64)
14:25
and other/sdl/include
14:25
if you donwload simply, SDL
14:25
it has different folder structure
14:25
and then i doesn't work
14:25
i tried
14:26
I had to check tw 0.6, to know how to organize these dlls and includes
14:26
then i found, that CMakeList shows you where
14:26
if(TARGET_BITS AND TARGET_OS) set(DIR "other/${NAME}/${TARGET_OS}/lib${TARGET_BITS}") set("${TYPE}_${VARIABLE}_LIBDIR" "${DIR}" PARENT_SCOPE) set("EXTRA_${VARIABLE}_LIBDIR" "${DIR}" PARENT_SCOPE) endif()
14:26
if(IS_BUNDLED) set("HINTS_${VARIABLE}_INCLUDEDIR" "other/${NAME}/include" "other/${NAME}/include/${TARGET_OS}" PARENT_SCOPE) endif()
Avatar
What about a simple python script that downloads the libs?
14:29
That would prevent lots of annoying questions
Avatar
or just
14:29
ship libs, as submodule
14:30
then, git submodule update --init --recursive (edited)
14:30
and it will take everything you need
14:30
with maps, and languages
Avatar
A clean and updated commit tree to implement automatic downloading of the SDL2 and freetype includes and DLL's. Initial commit by Zwelf (see #1344 / 67f63d3), picked up and redone by me, optimi...
14:35
propose that on github, @Savander
Avatar
@Dune no problem, i just prefer to talk over things here
14:36
before putting it on github
Avatar
nah... when you have a special repo for the libs it would be better to include it as a submodule =\
Avatar
I'm not sure if there should be a rep for the libs. Clearly oy didn't like that in henningstone's PR
Avatar
easiest would be to download the official builds (+ hash check)
Avatar
besides you have to get different stuff depending on architecture what you are trying to build, right? so it's not as simple as a submodule for everyone
14:40
but yeah SDL/freetype is a big barrier for anyone trying to contribute/modify teeworlds
Avatar
The paths for libs are: other/(sdl/freetype)/<os>/lib(32/64) The paths for includes are other/(sdl/freetype)/include
Avatar
@Dune the chmod command didn't work
Avatar
how so, @Saturn
15:04
did you run chmod u+x ./teeworlds ?
Avatar
oh no i wrote what getkey told me
15:04
ill try that
Avatar
Otherwise the OS won't recognize it as a binary And I think it will change the icon too Normally you can chmod it in the UI as well with: right-click on the icon -> properties -> mark as executable Or something like that
15:05
source @Julien
Avatar
the permissions are fine
15:06
i checked that
Avatar
so what does ./teeworlds give?
Avatar
it doesn't recognise it
15:08
bash: ./teeworlds: No such file or directory
Avatar
you're in the teeworlds folder?
15:10
type ls to make sure you see teeworlds (edited)
Avatar
ls -l
15:14
if you can, and screenshot
15:14
It will show permissions of files as well (edited)
Avatar
@Savander if it says no such file or directory it's probably not a permission issue
Avatar
it could be related to glib2.27
15:15
i had similar problem i guess
15:15
i had to recompile it
15:15
to run the game (edited)
Avatar
and, if you don't have permissions
Avatar
I think the problem is simpler
Avatar
it will say no such file or directory (edited)
Avatar
bash: ./output.pdf: Permission denied
15:16
not here
15:18
oh!
15:18
I don't know, did he
15:18
said, which version of Teeworlds
Avatar
he downloaded?
15:18
32 or 64
15:18
no 1s
15:18
LS
Avatar
@Saturn ls, not 1s
Avatar
./.teeworlds?
15:19
huh?/
Avatar
And you're not in the teeworlds repository you downloaded
15:19
so that's your issue :)
Avatar
he can also have
15:19
bad version of teeworlds
Avatar
go there with the graphical user interface, and right click open a terminal here
15:20
no @Savander . he's just not in the right place.
Avatar
If you have 32bit game, on 64bit os without support for 32os
15:20
(as I had, i downloaded wrong bins)
Avatar
no, that's not it.
15:20
he's in the config folder, @Savander
Avatar
I know, i see that
15:20
let's check permissions first ;p
Avatar
that's still not it
15:20
lol
Avatar
if he don't have x, then why not it?
15:21
he changed permissions for no file
15:21
because, he was in bad directory
Avatar
slow down, let the guy reach the correct folder first =p
Avatar
ok guys
15:22
its working
15:22
im just a noob
Avatar
what did you do, @Saturn ?
15:23
did you have to change its permissions? (edited)
15:23
the permission was fine
15:23
i just had to launch from the terminal
Avatar
that's not normal
Avatar
that's pretty weird
Avatar
you should be able to launch from the folder
Avatar
i still cant
15:24
i have to keep the terminal open while running it
15:24
:/
Avatar
well, you should be able to launch it from the desktop
15:24
what does ls -l give?
15:27
strange that you can't launch from desktop then
15:27
tried again?
15:28
its still the same
Avatar
Nautilus (or Files), the Gnome file manager, received a Git update which removes its ability to launch binaries or programs in general. That means you won't be able to double click binaries, scripts, or desktop files to run them - this includes the ask dialog which lets you c...
15:28
do you use nautilus by any chance?
Avatar
type nautilus in the console
15:29
do you get your usual file explorer?
15:31
well, teeworlds works fine, this issue was caused by your distro's default tools maintainers being morons and removing yet another basic feature
Avatar
I think, nautilius is default File explorer
Avatar
on ubuntu, yeah.
Avatar
on ubuntu, yes
Avatar
ok fck ubuntu but
15:32
why does 0.6 still work fine?
Avatar
as in, it's clickable?
15:33
Dune, what if his teeworlds run file will be on desktop
15:33
instead of in file explorer?
15:33
it will work differently?
Avatar
won't change a thing
15:33
that might be due to some sort of trust thing
15:33
maybe 0.6 was signed
15:34
may I suggest sudo apt-get install nemo as an alternative file explorer?
15:35
Avatar
works fine here
15:35
you don't have to change your defaults
Avatar
I have a question. About heinrich CMake, but maybe it's not related directly to him, but to Visual Studio 2017. My build folder is located in C:\Users\<user>\CMakeBuilds\44325682-29fe-e932-8f5d-873b500ddc99\build\x64-Debug (default). Any ideas why? And how to change it to project path? (edited)
Avatar
ok ill try that, ill let you know in a bit
Avatar
no idea, @Savander, I'm allergic to cmake
Avatar
ChillerDragon 2018-12-06 16:05:06Z
true bam fan xd
Avatar
I think, i found solution
16:11
or maybe not, hah
Avatar
i see
Avatar
A retro multiplayer shooter. Contribute to teeworlds/teeworlds development by creating an account on GitHub.
16:53
here's the problem
16:54
in Heinrich PR
16:54
in master it looks like: static const char GAME_RELEASE_VERSION[8] = {'0', '.', '7', '.', '1', 0};
16:55
he use that string, in CMakeLists. I tried to changed it to the master version
Avatar
huh, that sounds like a bug, you should report that
Avatar
CMake Error at CMakeLists.txt:17 (message): Couldn't parse version from src/game/version.h
16:55
;d
Avatar
I think static const char GAME_RELEASE_VERSION[8] = {'0', '.', '7', '.', '1', 0}; is safer because it fills with 0
Avatar
I don't know hahaha
16:57
file(STRINGS src/game/version.h VERSION_LINE LIMIT_COUNT 1 REGEX GAME_RELEASE_VERSION ) if(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"") set(VERSION_MAJOR ${CMAKE_MATCH_1}) set(VERSION_MINOR ${CMAKE_MATCH_2}) set(VERSION_PATCH ${CMAKE_MATCH_3}) elseif(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\"") set(VERSION_MAJOR ${CMAKE_MATCH_1}) set(VERSION_MINOR ${CMAKE_MATCH_2}) set(VERSION_PATCH "0") else() message(FATAL_ERROR "Couldn't parse version from src/game/version.h") endif()
16:58
no idea, how to adjust it to work with master. I will wait for
Avatar
you should mention that too in the PR
Avatar
heinrich
Avatar
heinrich is busy for a while
Avatar
not good 😄 (edited)
Avatar
it's fine, others can fix
17:04
thanks for the detailed report under the PR 😀
17:04
I think, i have temporary fix for that version
17:05
hmm, nope. It have to be something else
17:05
#if(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"") # set(VERSION_MAJOR ${CMAKE_MATCH_1}) # set(VERSION_MINOR ${CMAKE_MATCH_2}) # set(VERSION_PATCH ${CMAKE_MATCH_3}) #elseif(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\"") # set(VERSION_MAJOR ${CMAKE_MATCH_1}) # set(VERSION_MINOR ${CMAKE_MATCH_2}) # set(VERSION_PATCH "0") #else() # message(FATAL_ERROR "Couldn't parse version from src/game/version.h") #endif() set(VERSION_MAJOR "0") set(VERSION_MINOR "7") set(VERSION_PATCH "1")
17:05
I hardcoded temporary version
17:06
so i could change, version.h to the master one
17:06
but still different nethashes
17:06
it's possible, that static const char GAME_RELEASE_VERSION[8] = {'0', '.', '7', '.', '1', 0}; and static const char GAME_RELEASE_VERSION[8] = "0.7.1";
17:06
are the same, I'm sure pure string (edited)
17:06
adds \0 at the end
Avatar
yes but only at the last character
17:07
there are 8 chars in this array
17:07
it's clearly forced on purpose to be able to carry another 2 characters
17:08
I don't know then. I don't see any network changes in this PR
17:09
maybe system.c is used to calculate hash as well?
17:09
Anyway. I can't fix it, no idea how it's calculated so. Maybe someone else will help ^.^
Avatar
probably calculated in scripts/cmd5.py, @Savander
Avatar
scripts\cmd5.py src\engine\shared\protocol.h src\generated\protocol.h src\game\tuning.h src\game\gamecore.cpp
17:13
hm.
17:14
yes
17:14
system.h changed nethash
17:14
#include <base/system.h> is included in protocol.h
17:14
uhm
Avatar
I'm quite impressed. It's not that hard, to navigate through teeworlds code. Maybe because, I have experience with other projects, not exactly cpp, but
Avatar
gj if you manage that so quickly, it took me long
Avatar
Visual Studio really helps
18:39
😄
18:40
I can make breakpoint, and watch what is going on
18:40
and, method names are quite good
18:40
Also, i have done few things before, it was like 2-3 years ago
18:41
so i'm not entirely new ^.^
Avatar
VS is really nice for that yeah :)
Avatar
eh, idk. I tried to revert few changes, to get back to maste rhashnet
19:20
But, i'm to stupid I guess 😛
Avatar
bam 0.5 do not support vs 2017
19:45
lol
Avatar
you can paste all from line 45-end in the visual studio x64 shell
19:50
it will than compile bam
19:52
1cf43b7 Move 'Show user IDs' option up to keep consistency - Dune-jr c0bf3f6 Merge pull request #1778 from Dune-jr/fix-butto... - oy
19:55
583e37f Fix broken key helper in callvote popup - Dune-jr d25e419 Merge pull request #1796 from Dune-jr/fix-votekey - oy
Avatar
I think, i fixed it
19:55
just used VsDevCmd.bat
19:55
instead of vs<something>
19:55
don't remember
19:56
6c60a2c Add context to some locales - Dune-jr 4e84c04 Remove red/blue as locales, reuse red flag/blue... - Dune-jr b9144fb Merge pull request #1800 from Dune-jr/add-local... - oy
Avatar
cmmon!
20:00
I have to be pretty shit
20:00
at compiling
20:00
With bam
20:00
Or I don't know XD
Avatar
why?
Avatar
the procedure entry point was not found _ZdllPvj
Avatar
compiling bam or tw?
20:01
with bam
20:01
With CMake (heinrich pr)
20:01
it works as expected, but the server has different nethash
Avatar
dont know cmake... sry
Avatar
no no
20:02
this one is compiled with Bam
Avatar
did you run ".\bam\bam config"
Avatar
where i have error
Avatar
and than .\bam\bam conf=release -f
20:02
from your teeworlds dir
Avatar
i did ../bam/bam conf=debug server
20:04
I only wanted server ;d (edited)
Avatar
you are on windows and using /
20:04
that cant work 😄
Avatar
Don't stick to simple miss
20:04
it compiles
20:05
and i copied dlls
20:05
and folder with data
Avatar
try bam config
Avatar
so everything what teeworlds need, is there
20:05
😛
20:05
hmmmmmmm
20:05
zlib not found
Avatar
strange
20:06
python is installed?
20:06
only zlib is not found
20:06
😛
Avatar
do you use vcvars64.bat
20:07
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat in my case
20:07
nope
20:07
i WIll try
Avatar
try that
20:07
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
Avatar
Ah, about that "/"
20:10
im using git bash
20:10
that's why, different slash
20:11
Unknown Architecture 'unknown'. Supported: x86, x86_64
20:11
wut
20:11
D:
20:11
one more time, config
20:11
nope, grr!
Avatar
why you use gitbash?
Avatar
i prefer git bash
20:12
it doens't matter in this case
Avatar
you call vcvars64.bat with gitbash
Avatar
that works?
Avatar
in vcvars.bat you have to you \ i think
Avatar
@Savander hows things going
Avatar
With? 😃
Avatar
compiling
Avatar
couldn't compile with bam
23:24
don't know why
23:26
Also, i tried to move only cmake, from heinrich to clear master
23:26
and, it still compiled with different nethash
23:26
So.. i don't know
Avatar
what's the issue with bam compiling?N
Avatar
bam says, that zlib is not found
23:27
it compiles anyway
23:27
but, i can't run binary
Avatar
you can't run the binary? what does it say?
Avatar
wait a second
Avatar
where does it say zlib not found, in the config?
Avatar
that's perfectly fine
23:28
don't mind that
Avatar
The procedure entry point was not found _ZdlPvj
23:28
blabla bla /teeworlds_srv.exe
23:29
i tried with bam compiled with MinGW, MSVC 32bit and 64bit
23:32
try ldd teeworlds_srv.exe?
Avatar
eh, i recompiled bam
23:39
and now it says Unknown Architecture 'unknown'. Supported: x86, x86_64 when i try to compile
23:40
bam is hard to compile, if you don't have vs2015 (edited)
Avatar
you recompiled bam?
Avatar
yes, because i didn't have any. I delete compiled versions, befre
Avatar
what arch do you use to build teeworlds?
Avatar
when i testes why it not works
23:42
64
Avatar
so you set arch=x64?
Avatar
i mean, bam is compiled as 64
23:42
and it set up bam
23:42
as 64
Avatar
yes, but xwxhat about teeworlds?
Avatar
compiler.driver = 'gcc' compiler.c_compiler = false compiler.cxx_compiler = false stackprotector.value = true minmacosxsdk.value = false zlib.value = false zlib.include_path = false sdl.value = true sdl.use_pkgconfig = false sdl.use_sdlconfig = false sdl.use_winlib = 64 freetype.value = true freetype.use_pkgconfig = false freetype.use_ftconfig = false freetype.use_winlib = 64
Avatar
do you set arch=x64 when you build teeworlds?
23:45
Now, It don't even have ability to clean config
23:45
DD (edited)
Avatar
$ ../bam-0.5.0/bam.exe -c Unknown Architecture 'unknown'. Supported: x86, x86_64
23:45
xD
23:45
set the architecture
23:45
with arch=
23:46
it does something
23:46
arch=x86_64
23:47
okay, so if i have to choose more than
23:47
1 arch
23:47
i have to specify it
23:48
okay, now
23:48
fdd thing
23:48
$ ldd teeworlds_srv.exe ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffe743b0000) ??? => ??? (0x77dd0000) wow64.dll => /c/WINDOWS/System32/wow64.dll (0x77ce0000) wow64win.dll => /c/WINDOWS/System32/wow64win.dll (0x77d40000)
23:48
o.O
Avatar
doesn't run?
Avatar
i'll see tomorrow
23:50
good night for now ^^
Avatar
no problem
23:50
good night, thanks
23:50
😃
Exported 431 message(s)