Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2018-07-25 00:00:00Z and 2018-07-26 00:00:00Z
Avatar
8ac42c4 Revert "Add back forum link" - def- 4ee2dd7 Revert "Remove links to inflammatory Discord channel and inactive forum" - def- 419f838 forum links - def-
Avatar
Bojidar Marinov 2018-07-25 08:39:48Z
I'm interested to work on https://github.com/ddnet/ddnet/issues/486, do you have any ideas/suggestions how it might work?
08:40
I was thinking of allowing the user to select multiple layers at once (with shift-clicking maybe), then making the right-click selection include multiple layers
08:41
But, this won't work well with the tiles overview which shows on Space
Avatar
that idea sounds good
08:42
maybe you could just disable space if you selected multiple layers
Avatar
Bojidar Marinov 2018-07-25 08:48:06Z
yeah, that's always an option
08:48
BTW, is there some sort of pallette of recent tile selections?
Avatar
no, I think that doesn't exist
08:50
multiple layer selection also has some other problems
08:50
e.g. layers can have an offset that is not a multiple of tiles (the unit for the offsets is 1/32 tile width)
Avatar
Bojidar Marinov 2018-07-25 08:55:05Z
can layers have a tilesize different from the default (e.g. scaling) (edited)
Avatar
Bojidar Marinov 2018-07-25 08:55:46Z
uh, scaling, not zooming
Avatar
what do you mean
Avatar
Bojidar Marinov 2018-07-25 08:56:21Z
well, can a tiles layer be scaled 2x smaller?
08:56
or can it just be offset
08:57
I think, multi-layer editing in different groups is just asking for trouble anyway..
Avatar
i still dont get it xD
Avatar
Bojidar Marinov 2018-07-25 08:58:02Z
read the whole conversation (and the issue)
08:58
but i dont get what you are trying to ask
08:59
ah no
08:59
the tilesize is always the same
Avatar
Bojidar Marinov 2018-07-25 09:01:49Z
yeah, but layers with some parallax are going to break expectations when doing multi-layer editing, so I guess they should be left out for now
Avatar
@heinrich5991 i cant check wether the skin is a vanilla skin or not from menu_settings.cpp?
09:38
i try to use IsVanillaSkin from skins.cpp
Avatar
@Bojidar Marinov I guess only layers with the same parallax should be selectable for multi-editing
09:58
and maybe layers with the same offset, for implementation sanity 🙂
10:00
@fokkonaut add a new field m_IsVanillaSkin in CSkin in src/game/client/component/skins.h
10:00
done
Avatar
and set it in the appropriate places
10:00
(check where the other fields in that struct get set in the src/game/client/components/skins.cpp
Avatar
in the struct CSkin?
Avatar
)
Avatar
what is a field
Avatar
the variables in the struct
Avatar
Bojidar Marinov 2018-07-25 10:02:00Z
yeah, same parallax and offset sounds good
Avatar
@heinrich5991 do i need to give parameters?
Avatar
check where m_OrgTexture texture is set
10:02
then do something similar for m_IsVanillaSkin
10:03
or maybe name that variable m_IsVanilla, it's already in the CSkin struct
Avatar
in your text editor, search for m_OrgTexture in src/game/client/components/skins.cpp
10:06
what do you find?
Avatar
the oninit
Avatar
okay
10:07
so apparently, a CSkin is initialized here
10:07
so you also have to set m_IsVanilla
10:08
so m_DummySkin.m_IsVanilla = …
Avatar
why dummy?
Avatar
what do you see in the OnInit function?
Avatar
a reset?
10:10
or what u mean
Avatar
I mean you see a usage of CSkin there
Avatar
what does the code involving CSkin do there?
Avatar
reset it because it failed to load
Avatar
yes, something failed to load
10:11
but what it does is add a new skin to the skin list
10:11
m_aSkins.add(DummySkin);
10:12
so if the client failed to load all skins (it has an empty skin list)
10:12
the function adds at least one skin
10:12
and that skin is initialized there
Avatar
aaahh
10:12
ok
10:13
and now?
Avatar
now you have to think about what value you need to assign to DummySkin.m_IsVanilla
Avatar
the result of the static bool IsVanillaSkin?
Avatar
well, what parameter would you give to that function? what is the dummy skin's name?
Avatar
??^^ (edited)
Avatar
what is the name of the skin that is added in that function?
10:15
its dummy
10:15
so its non vanilla, so -1?
Avatar
a bool can only be true or false
Avatar
so false xd
Avatar
this seems to be a fallback skin (it gets added when no other skins are available)
10:17
so it might be beneficial to set m_IsVanilla to true
Avatar
true
Avatar
okay, do that
Avatar
then move on to the next occurence
10:17
of m_OrgTexture
Avatar
its getting set in skins.cpp
10:18
in SkinScan()
10:18
if(g_Config.m_ClVanillaSkinsOnly && !IsVanillaSkin(aFilenameWithoutPng)) { return 0; }
10:19
found that there 😮
Avatar
that's not a m_OrgTexture occurence
10:19
wait
Avatar
Skin.m_OrgTexture = pSelf->Graphics()->LoadTextureRaw(Info.m_Width, Info.m_Height, Info.m_Format, Info.m_pData, Info.m_Format, 0);
Avatar
you're not in the newest version, if that is in SkinScan()
10:21
i am
10:22
wait
10:22
i will clone again
Avatar
Bojidar Marinov 2018-07-25 10:23:16Z
you aren't, I changed it 😃
Avatar
^^
Avatar
aaah
10:26
now
10:27
i have the new version now
10:30
and now
10:30
Skin.m_OrgTexture = pSelf->Graphics()->LoadTextureRaw(Info.m_Width, Info.m_Height, Info.m_Format, Info.m_pData, Info.m_Format, 0); this is next
Avatar
@heinrich5991 what now
Avatar
now do the same steps as before
10:32
understand what the function is doing
10:33
and figure out what to value to assign to m_IsVanilla
Avatar
>[12:16:33] <+quinerr> Hi, as ddnet package available in Debian, could it be mentioned in https://ddnet.tw/downloads/ ? I think many people are just not aware of this. [12:20:11] <@heinrich5991> quinerr: hi [12:20:52] <+quinerr> hi, hi... [12:21:25] <@heinrich5991> can you link the package website? [12:22:17] <@heinrich5991> https://packages.debian.org/buster/ddnet [12:22:18] <@heinrich5991> ah [12:24:01] <+quinerr> https://packages.debian.org/search?keywords=ddnet [12:24:14] <+quinerr...
Avatar
so @heinrich5991 this is loading the skins?
Avatar
yes
Avatar
so here i need to set it
10:40
to false if the skin is not vanilla
Avatar
yes
Avatar
so basically i can use the same if from the old code?
Avatar
I don't think you need an if
Avatar
how else
10:43
lol
Avatar
show me your code with an if
Avatar
if (g_Config.m_ClVanillaSkinsOnly && !IsVanillaSkin(aFilenameWithoutPng))
10:44
as i said like the old one
Avatar
if you then continue with
10:44
Skin.m_IsVanilla = true; else Skin.m_IsVanilla = false;
10:44
then you can just write
Avatar
Skin.m_IsVanilla = g_Config.m_ClVanillaSkinsOnly && !IsVanillaSkin(aFilenameWithoutPng)
Avatar
lol?
10:45
that works?
Avatar
yes, why not?
Avatar
never seen such a line
Avatar
okay
10:46
what you likely want to do instead is Skin.m_IsVanilla = IsVanillaSkin(aFilenameWithoutPng)
10:46
and then decide at the site where you want to display the skins, depending on g_Config.m_ClVanillaSkinsOnly
Avatar
okay, will do that
10:47
CSkin Skin;
10:47
this was above the orgtexture stuff
10:47
can i just move it to the top?
Avatar
yes, you could, but I think it would be better to instead move your m_IsVanilla thing
Avatar
okayx
10:52
fuck it i mixed some stuff, need to clone it again
Avatar
at one point, you should try to learn git a bit 😉
10:53
it would help in such a situation
Avatar
fuck no everything is alright
10:53
im just dumb xD
10:59
it kind of works
11:00
how do i refresh the skin list
11:01
@heinrich5991
Avatar
you probably don't need to refresh it
Avatar
if(g_Config.m_ClVanillaSkinsOnly && !s->m_IsVanilla) continue; ive added this
Avatar
I'd guess that it's rendered every tick
11:01
where did you add that?
Avatar
s_initskinlist
11:02
there is a for schleife
11:02
ah wait
11:03
it only gets triggered if s_InitSkinList is true
11:03
so i would need to set it true every time i change the vanilla setting right?
Avatar
no
11:04
search etc. also works without "refreshing" the skin list
11:04
everything is rendered onto the screen every tick
11:04
you need to find where it is rendered and skip the rendering
Avatar
(it's in the same function)
Avatar
it does work with refrsh
11:06
s_InitSkinList = true;
Avatar
yes. but it also reloads the skins, which isn't necessary
11:06
oh
11:06
mh
11:07
then I guess also do it that way
Avatar
working fine ^^
11:09
except one thing
11:10
lemme check
Avatar
@heinrich5991
11:21
i need some more help
Avatar
can't help you if you don't formulate a question
Avatar
2 little bugs:
11:22
first: if you have vanilla skins on and have picked a skin that is not from the vanilla skins it will show you the first skin from the list (in my case Ablush Neon or something like that) in the field "Your skin" in settings
11:23
11:23
but ingame its a default one
11:24
second: if vanilla skins is on and also skin prefix it doesnt show the prefix because the prefix skins cant load, we need to make that possible.
Avatar
dunno about the first one
11:28
not sure about the second one either tbh
11:28
😮
Avatar
mhhh
11:29
and now?
11:29
ok so i commit like this and you try a bit @heinrich5991 ?
11:30
or what
Avatar
you can commit it and make a PR, noting that it's not yet finished
11:30
mentioning the problems
11:30
I don't have time right now to continue helping, maybe later 🙂
11:44
4b75fc8 Remove explicit credits for heinrich5991 - heinrich5991 3faa547 Merge pull request #49 from heinrich5991/pr_changelog_heinrich5991 - def-
11:47
10c5ee7 Mention Debian and Ubuntu packages (fixes #50) - def-
Avatar
@heinrich5991 can i make this variable, for example with %s? static const char *VANILLA_SKINS[] = {"bluekitty", "bluestripe", "brownbear", "cammo", "cammostripes", "coala", "default", "limekitty", "pinky", "redbopp", "redstripe", "saddo", "toptri", "twinbop", "twintri", "warpaint", "x_ninja"};
11:53
i guess no, right?
Avatar
you mean "can I output this variable with something like %s in dbg_msg and str_format"?
Avatar
i mean, can we have like %s_cammo
11:53
just as an exmaple
11:53
like we do with str_format
Avatar
you can do str_format([…], "%s_%s", YourParameter, VANILLA_SKINS[3])
Avatar
that gives me a new possibility
11:56
let me try some
11:56
but
11:56
where do i need to place these lines?
Avatar
I don't know what you want to do
11:58
probably near your other code
Avatar
works fine. there are only 2 bugs with prefix and vanilla skins only in general left: #1: !base profile screenshot 2018 07 25 - 13 23 09 16 if you have vanilla skins on your skin in the settings menu will be displayed as the first skin from your list. (ingame you have vanilla skin, its just the settins ui) #2: if you activate vanilla skins and set a skin prefix at the same time th...
Avatar
@heinrich5991 i wasnt able to do it
12:17
for me its too hard, maybe @deen can do something? feelsgoodman
Avatar
if you have vanilla skins on your skin in the settings menu will be displayed as the first skin from your list. (ingame you have vanilla skin, its just the settins ui) !base profile screenshot 2018 07 25 - 13 23 09 16
15:39
if you activate vanilla skins and set a skin prefix at the same time the prefix wont work (which it should imo) so we need another check at vanilla skins only to also load the prefix skins if there are any available for the current set prefix. (only if the prefix skin is also a vanilla skin, for example kitty_brownbear. not for example kitty_zombie if we would have something like this. because remember it is vanilla only^^
Avatar
@heinrich5991 are you there?
18:33
@Bojidar Marinov yo
Avatar
Bojidar Marinov 2018-07-25 18:36:24Z
ey
Avatar
every skin has its own number, right?
18:37
like the first skin (for example aaaaaaa) is number 0
18:37
because its the first
18:37
and if you have 100 skins the last (probably something like this zzz) is 99, right? (edited)
Avatar
Bojidar Marinov 2018-07-25 18:38:30Z
yes, sounds reasonable
Avatar
okay (edited)
18:38
how do i get the Number of the default skin?
18:39
because if you have a different amount of skins the number of the default skin will be anothsr one
18:39
i need a function or so to get it
Avatar
Bojidar Marinov 2018-07-25 18:39:41Z
use the Find function from the CSkins class
18:39
I think it should do it
Avatar
with that i can get the index?
18:40
i guess it will look for the name
Avatar
Bojidar Marinov 2018-07-25 18:40:03Z
it returns the index, or -1 if none was found
18:40
yes
Avatar
okay, i will try it.
Avatar
Bojidar Marinov 2018-07-25 18:42:37Z
you should refer to issues from your PR, so they would be auto-closed when it is merged: https://help.github.com/articles/closing-issues-using-keywords/
Avatar
that sounds like it makes every tee use the default skin if the user has a non-vanilla skin selected
Avatar
fuck i am dumb
19:19
how do i resolve that
19:19
grrrrrr
19:20
@heinrich5991 sendhelp
Avatar
it kinda sounds like you tackle it at the wrong level
19:23
the function already has a return value of -1 if the skin cannot be found
19:24
pepeH ??
19:24
im confused
Avatar
look at the call sites of Find
19:26
see what they do
19:27
you mean where Find gets called?
Avatar
yes
Avatar
const CSkins::CSkin *pOwnSkin = m_pClient->m_pSkins->Get(m_pClient->m_pSkins->Find(Skin));
19:28
this?
Avatar
yes, this is one call site
19:30
I found another one in src/game/client/gameclient.cpp
19:30
and what now?
19:32
i need more help xd
Avatar
what do you see at the call site in gameclient.cpp?
19:32
what does the code do?
19:32
why do you see a default tee for other players (and not the first skin in your skin list)?
19:32
*for other players with skins that you don't have
Avatar
it gets set
19:35
cant find it heinrich
19:35
oh wait
19:36
mhh
19:36
no
19:36
:/
19:37
@heinrich5991
Avatar
have you found the call site?
19:40
??
Avatar
what do you see there?
Avatar
what do you mean
Avatar
// find new skin m_aClients[ClientID].m_SkinID = g_GameClient.m_pSkins->Find(m_aClients[ClientID].m_aSkinName); if(m_aClients[ClientID].m_SkinID < 0) { m_aClients[ClientID].m_SkinID = g_GameClient.m_pSkins->Find("default"); if(m_aClients[ClientID].m_SkinID < 0) m_aClients[ClientID].m_SkinID = 0; }
Avatar
yes i see that
Avatar
so what does the code do?
19:42
(can you describe it in words)
Avatar
it sets the skin id to the id of the current skin and if the id is under 0 it sets the id to the id of the default skin
Avatar
yea
19:43
what does it mean for the ID to be below zero?
19:44
so the skin doesnt exist
Avatar
yes
19:44
so at this call site, the "skin does not exist" case gets detected and the skin gets replaced by "default"
19:44
at our call site, which we want to fix, it looks like this: (edited)
19:45
const CSkins::CSkin *pOwnSkin = m_pClient->m_pSkins->Get(m_pClient->m_pSkins->Find(Skin));
19:45
i.e. the Get function gets called with whatever we return from m_pSkins->Find
19:45
so what happens here if the skin does not exist?
Avatar
it sets the skin to the first?
Avatar
this is the observed behavior, but why?
19:48
but why does it happen? we call m_pSkins->Get(-1)
19:48
look at the Get function of CSkins
19:48
see what happens with the integer -1 there
19:50
(in src/game/client/components/skins.cpp)
19:51
(what I'm trying to tell you here is how you can search around in code to understand behavior)
Avatar
i see but i dont understand the get function at this point (edited)
Avatar
yea, it's a bit convoluted: return &m_aSkins[max(0, Index%m_aSkins.size())];
19:53
max(x, y) gives the larger number of x and y
19:53
you can pretend for a moment that the function says return &m_aSkins[max(0, Index)];
Avatar
why is there this &
Avatar
that means "return a pointer to what is on the right"
19:55
ok, the important part there is max(0, Index)
19:55
this ensures that the index is not negative
19:56
i.e. if the index is negative, then 0 is the bigger number and gets used
19:56
otherwise, it's Index
Avatar
so this is why it's the first skin in the list
Avatar
i see
19:56
make sense
Avatar
steps forward: change the call site that exhibits the bug
19:57
or change the Get function to return the default skin if it gets passed -1
Avatar
thats probably the best
19:58
so wait
19:58
how exactly do i get that to work
Avatar
you can check whether you get passed -1 in Get
19:59
then you can look for a skin named "default"
Avatar
int CCollision::IntersectLineTeleHook(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision, int *pTeleNr) whats that?
Avatar
if you want to look for inspiration, check the call site in src/game/client/gameclient.cpp
Avatar
@heinrich5991 sendhelp
20:00
ok
Avatar
@ezy sounds like the function that takes hook movement and tells you where where it will be after the tick
20:00
e.g. applying hook teleporters
Avatar
but in gameclient theyre working with clientids
Avatar
or hitting walls
20:01
what do you use for editing the source, @fokkonaut ?
20:01
msvc?
Avatar
msvs
Avatar
then you can probably right-click m_SkinID of m_aClients[ClientID].m_SkinID = g_GameClient.m_pSkins->Find(m_aClients[ClientID].m_aSkinName); and select something like "go to definition"
Avatar
it leads me to gameclient.h
Avatar
what does it say about m_SkinID?
Avatar
nothing
Avatar
huh
20:05
I see something about m_SkinID there: int m_SkinID; in struct CClientData
20:06
so it's just assigning it to an int of some unrelated structure
20:06
you can just use a local int variable instead
20:07
how does this help with the Get function
20:07
im confusd again xd
Avatar
what happens in the Get function when our bug triggers?
20:08
what's the value of the variable Index?
Avatar
yes
20:09
we want to do something different from the normal get function in this case
20:09
how can we do this?
20:10
what programming construct allows us to choose different code paths depending on a condition?
Avatar
Switch?
Avatar
yes, one of them. but I ment if
20:10
in this case
20:10
so we're using if(Index == -1)
20:10
and then choose to do things differently
20:11
we want to look for a skin named "default", how do we do this? @fokkonaut
20:11
(you can look at the src/game/client/gameclient.cpp code)
Avatar
Find("default")
Avatar
okay. what does Find("default") return?
Avatar
index of default skin
Avatar
yep
20:13
what do we want to return?
Avatar
the id
Avatar
not really, we get passed the ID and return some kind of pointer
20:13
so now we have to do something to the ID of the default skin to get to the pointer
20:14
but the rest of the function already does that for us
20:14
so we can just set Index to Find("default") in that if, and skins that were not found will be replaced by the default skin
20:17
that was too fast @heinrich5991
Avatar
do you see the signature of the function?
20:18
const CSkins::CSkin *CSkins::Get(int Index)
Avatar
what funciton
Avatar
Get
Avatar
it says that it takes an int and returns a const CSkins::CSkin *
20:19
is that clear (even if we might not know what a const CSkins::CSkin * is)
20:19
?
Avatar
okay
20:20
so whatever we do to that function, it still has to take an int and return a const CSkins::CSkin *
20:20
we're currently at
Avatar
ye (edited)
Avatar
if(Index == -1) { // something with Find("default") } return &m_aSkins[max(0, Index%m_aSkins.size())];
20:21
we want to do something differently if the given index is -1
Avatar
Bojidar Marinov 2018-07-25 20:21:59Z
Great news! I got multi-layer editing up and running 😃
Avatar
oh wow, you're fast 🙂
Avatar
Bojidar Marinov 2018-07-25 20:22:21Z
a good amount of the code was already there 😉
Avatar
nice
20:22
@fokkonaut do you see how I arrived at the code skeleton above?
Avatar
i guess y
20:23
so look
Avatar
Bojidar Marinov 2018-07-25 20:23:12Z
better check for index < 0, not for index == -1
Avatar
if(Index == -1) { Index = Find("default"); } return &m_aSkins[max(0, Index%m_aSkins.size())];
20:23
i have it like this now
20:23
ok @Bojidar Marinov
Avatar
index < -1 is a bug anyway ^^ (edited)
20:24
ah
20:24
so -1 or <0?
Avatar
idc
Avatar
i will use < 0
20:25
i have seen it in gameclient.cpp too
Avatar
Bojidar Marinov 2018-07-25 20:25:06Z
<0 is more future-proof, in case we decide to use -2 for some other error code
Avatar
then you'd hopefully check all call sites!
20:25
but okay, it makes sense to mirror the other call sites
Avatar
is that right like it is now?
Avatar
kinda
Avatar
but dont tell me thats it xD
Avatar
we're only missing handling if the "default" skin cannot be found
20:26
that's basically it
Avatar
what gameclient.cpp does is that it uses the first skin (index 0) if "default" cannot be found
20:26
that sounds reasonable
20:27
so that is this: if(m_aClients[ClientID].m_SkinID < 0) m_aClients[ClientID].m_SkinID = 0;
Avatar
yes
20:27
you have to adapt it for our code, obviously ^^
Avatar
place inside the if?
20:28
or under it
Avatar
I'd put it inside the if
20:28
because it's what we want to do if the above fails
20:28
if(Index < 0) { Index = Find("default"); if (Index < 0) Index = 0; } return &m_aSkins[max(0, Index%m_aSkins.size())];
Avatar
Bojidar Marinov 2018-07-25 20:29:01Z
what is a good limit for the amount of layers edited at once?
Avatar
@Bojidar Marinov unlimited
20:29
100
20:29
128
Avatar
Bojidar Marinov 2018-07-25 20:29:45Z
hope no one makes that one function recursive, then
Avatar
@heinrich5991 its right like i showed?
20:29
xD
Avatar
yes. we can remove the max now
20:30
i.e.
Avatar
what is i.e.
Avatar
roughly "in other words", or the german "das heißt"
Avatar
oh ok
Avatar
the return will be just return &m_aSkins[Index % m_aSkins.size()];
Avatar
done
Avatar
and we can reduce the code at the gameclient call site
Avatar
in wiefern @heinrich5991
Avatar
@Bojidar Marinov Are you working on the map editor? can you briefly tell me what this multi layer feature is? im interested
20:33
is it about editing multiple layers at once?
Avatar
@heinrich5991 if(m_aClients[ClientID].m_SkinID < 0) { m_aClients[ClientID].m_SkinID = g_GameClient.m_pSkins->Find("default"); if(m_aClients[ClientID].m_SkinID < 0) m_aClients[ClientID].m_SkinID = 0; } remove that because we have it in Get?
20:33
@timakro yep it is
Avatar
@fokkonaut yes, exactly 🙂 (edited)
Avatar
so you can make design and game layer in one go?
Avatar
only if you have set up some tiles in your map, as a brush
Avatar
i think its for copying multiple layers at once
Avatar
afaik, the space select is disabled
Avatar
@heinrich5991 it works nicely 😃 was that it?
Avatar
that multilayer feature was requested forever, looking forward to it
Avatar
Bojidar Marinov 2018-07-25 20:36:57Z
yes, it is for editing multiple layers at once, mainly for moving exisiting parts around
Avatar
@fokkonaut there's another call site that needs fixing
20:37
in src/game/client/components/ghost.cpp
20:38
im in
20:38
remove that if(SkinId < 0) { SkinId = m_pClient->m_pSkins->Find("default"); if(SkinId < 0) SkinId = 0; }
Avatar
yes 🙂
Avatar
thats it
20:40
so i will pr this now
Avatar
yes 🙂
Avatar
@heinrich5991 i guess you can merge it
Avatar
Bojidar Marinov 2018-07-25 20:44:41Z
ha, my multilayer implementation has a slight misfeature -- it works even on quad layers
20:44
not sure if I should keep this :]
Avatar
@heinrich5991 may i ask why you dont merge your own UI stuff? (edited)
Avatar
because I wrote it
20:45
and someone else should look over it
Avatar
i tested it :p
20:45
xD
Avatar
yes, someone who is a reviewer
20:46
you can e.g. ping Learath2 if you want it merged sooner
Avatar
Bojidar Marinov 2018-07-25 20:46:33Z
I tested the multilayer editing on Kobra 4 and Goo!, still not sure it works correctly in all cases (and doesn't crash, hehe)
Avatar
would deen also work?
20:46
ah hes offline again
Avatar
well, the forward to IRC means that we already pinged both of them 😦
Avatar
Bojidar Marinov 2018-07-25 20:47:25Z
going to push and PR what I've got, since, you know, "release early, release often"
Avatar
sure, go ahead, @Bojidar Marinov
Avatar
Bojidar Marinov 2018-07-25 20:48:18Z
are there any mappers who know how to compile the DDNet client by hand? I think it would be nice to get some feedback
Avatar
i used to create some maps, i will try it out
Avatar
Resolves #486. Please test, I'm still not completely sure it won't crash or mess up a map from time to time.
Avatar
Bojidar Marinov 2018-07-25 21:01:39Z
@fokkonaut @timakro Created the pull request, you might follow https://help.github.com/articles/checking-out-pull-requests-locally/ in order to pull the changes locally
21:01
(or just go over to my repository, select the correct branch, and click Download)
Avatar
(i think they know how to do that)
Avatar
Bojidar Marinov 2018-07-25 21:02:41Z
(better safe than sorry)
Avatar
Bojidar Marinov 2018-07-25 21:02:57Z
)
Avatar
wait i have a good one
Avatar
Bojidar Marinov 2018-07-25 21:03:30Z
been there seen that
Avatar
what branch is it
Avatar
hm, so how do i get started in the editor?
Avatar
Bojidar Marinov 2018-07-25 21:06:50Z
the branch is the one starting with 486
Avatar
git remote add bojidar git@github.com:bojidar-bg/ddnet.git
Avatar
Bojidar Marinov 2018-07-25 21:07:10Z
@timakro to enable multi-layer, just shift-click a few layers
Avatar
git fetch bojidar (edited)
21:07
git checkout 486-multilayer-editing
Avatar
Bojidar Marinov 2018-07-25 21:07:34Z
anyway, I'm going off to that dreamy thing sleep, if you spot anything odd, comment on the issue or mention me here 😃
Avatar
good night 🙂
Avatar
git fetch https://github.com/ddnet/ddnet pulls/1227/head
ddnet - DDraceNetwork, a mod of Teeworlds
21:08
git checkout FETCH_HEAD
Avatar
Bojidar Marinov 2018-07-25 21:08:09Z
meh, forgot the monero miner again 😉
21:08
jk
Avatar
a crypto miner
Avatar
@Bojidar Marinov okay, nice works generally. issues i see at first glance:
  • layers need to be in the same group
  • when you pick tiles from the "space" selection things dont make sense, maybe this should be disabled (or maybe there is another clever use for that)
Avatar
@timakro best to post these things into the PR
Avatar
sure, sec
Avatar
(apparently they're not offline yet :D)
Avatar
(but might still make a good reminder)
Avatar
Bojidar Marinov 2018-07-25 21:13:03Z
1) no sane way around, especially if Parallax is on 2) yeah, noticed it somehow still gets triggered, going to look into it tomorrow (3) it's a he) (edited)
21:14
still, feel free to comment on the PR
Avatar
well, you could just ignore parallax (or disable it but i dont think thats worth it)
Avatar
oh my god -
Avatar
ignoring parallax doesn't sounds like a good idea
Avatar
its perfect xd
21:15
improve it and it will be very perfect
Avatar
well, by ignoring i mean it just wouldnt make sense to use it with parallax then
21:15
ofc you could also disable it for groups with different parallax but thats a stupid limitation
Avatar
nah, that sounds like the right thing to do, to me
Avatar
yeah no problem for me, just little more code preventing that
21:17
it would be super nice to have it work for tile and game layer
Avatar
@heinrich5991 how would we make the vanilla+prefix to work together?
Avatar
that sounds like a harder problem
21:24
mh. wait
Avatar
oh noes ddnet is down
21:26
ddnet.tw
Avatar
nope
Avatar
@fokkonaut line 212 in src/game/client/components/skins.cpp could use our new variable m_IsVanilla as well
21:28
and you could reorder line 65 to before m_OrgTexture (same in the header file), so that initialization order is consistent
21:28
(just style, this doesn't make the current program wrong)
Avatar
so is it neccessary or can you do it afterwards?^^
Avatar
mhmh
21:30
it would be nice if you could still do that
Avatar
ok sec
21:32
what do you mean with the 212
Avatar
replace !IsVanillaSkin(m_aSkins[i].m_aName) by !m_aSkins[i].m_IsVanilla
21:34
struct CSkin { bool m_IsVanilla; int m_OrgTexture; int m_ColorTexture; char m_aName[24]; vec3 m_BloodColor; bool operator<(const CSkin &Other) { return str_comp(m_aName, Other.m_aName) < 0; } };
21:34
header
Avatar
yes 🙂
Avatar
CSkin Skin; Skin.m_IsVanilla = IsVanillaSkin(aFilenameWithoutPng); Skin.m_OrgTexture = pSelf->Graphics()->LoadTextureRaw(Info.m_Width, Info.m_Height, Info.m_Format, Info.m_pData, Info.m_Format, 0);
Avatar
yes
Avatar
just add it to the existing one ^^
21:35
or have you removed your ability to do so in some way?
21:40
done btw
21:40
@heinrich5991 how would we make the vanilla+prefix to work together?
Avatar
haha apparently you can crash the editor by making an automapper without a [section] line (edited)
21:43
without xD
21:43
this crashes it Index 1 Pos 0 0 EMPTY
Avatar
is there some kind of mod api that makes it easy to create new gametype concepts
Avatar
no. unfortunately not
Avatar
is it too hard to make or is it because everyone plays ddrace anyways
Avatar
it's because it's hard to make
22:02
lot of games implement the game logic in a scripting language
22:02
and the engine in c/c++
22:03
there is also 0 documentation on how the code is organized... its hard to get started
Avatar
thats sad. :/
Avatar
(the ddnet code also has quite some ugly places, where layers are not properly separated. stuff like that would have to be broken up before something like that would work)
Avatar
there are also some big if statements that are really hard to decrypt
Avatar
if(Temp.x > 0 && ((pCharCore->m_TileIndex == TILE_STOP && pCharCore->m_TileFlags == ROTATION_270) || (pCharCore->m_TileIndexL == TILE_STOP && pCharCore->m_TileFlagsL == ROTATION_270) || (pCharCore->m_TileIndexL == TILE_STOPS && (pCharCore->m_TileFlagsL == ROTATION_90 || pCharCore->m_TileFlagsL ==ROTATION_270)) || (pCharCore->m_TileIndexL == TILE_STOPA) || (pCharCore->m_TileFIndex == TILE_STOP && pCharCore->m_TileFFlags == ROTATION_270) || (pCharCore->m_TileFIndexL == TILE_STOP && pCharCore->m_TileFFlagsL == ROTATION_270) || (pCharCore->m_TileFIndexL == TILE_STOPS && (pCharCore->m_TileFFlagsL == ROTATION_90 || pCharCore->m_TileFFlagsL == ROTATION_270)) || (pCharCore->m_TileFIndexL == TILE_STOPA) || (pCharCore->m_TileSIndex == TILE_STOP && pCharCore->m_TileSFlags == ROTATION_270) || (pCharCore->m_TileSIndexL == TILE_STOP && pCharCore->m_TileSFlagsL == ROTATION_270) || (pCharCore->m_TileSIndexL == TILE_STOPS && (pCharCore->m_TileSFlagsL == ROTATION_90 || pCharCore->m_TileSFlagsL == ROTATION_270)) || (pCharCore->m_TileSIndexL == TILE_STOPA)))
22:06
xD
22:06
btw use 3 ` for multiline code
Avatar
all of this, just to produce buggy blockers
22:06
this is a single line
22:06
in the source
22:06
but it will look better still xD
22:07
and u cant fix the buggy blockers
22:07
cause maps use them
Avatar
yes 😦
Avatar
@heinrich5991 will there be Something Like "prefix skin [fokkonaut]" in the changelog? xd
Avatar
i wish i could code
Avatar
@fokkonaut im the one who does most changelogs :D
Avatar
@Im 'corneum what are you doing? school? uni? work?
Avatar
you can start learning
Avatar
work. dont try to get me started :D
Avatar
@Ryozuki will there be?
Avatar
even my bro gave up on c++
Avatar
on next update, if i remember to (most times i do) yeah
Avatar
nice
Avatar
i like c++
22:09
i like programming in general
22:09
it feels really nice when u get things working
Avatar
i like turtles
Avatar
cant find this in any other activity
Avatar
i can find that in mapping
Avatar
specialy when u spend over 4 hours
22:10
😮
Avatar
@Im 'corneum what do you work if I may ask?
Avatar
its called Kontruktionsmechaniker. i usually weld or drill work on miling mashines and lathes sometimes. no computers :D
Avatar
so proper work 🙂
22:13
not shifting bits around ^^
Avatar
"actual" work ye
22:14
easy to find a job likr that, now that everyone wants to be a dev 👀
22:17
or more corners per quad?
Avatar
thats rly interesting
Avatar
tl;dw?
Avatar
different paralax on different corners on quads to create a 3d effect
Avatar
we already have this right
Avatar
how can i do it?
Avatar
para x and para y
Avatar
yes but thats only for the whole quad
Avatar
then separate the quad
Avatar
what do you mean
Avatar
have 2 quads
Avatar
but they will have one picture each. what i meant was one picture thats has different paralax within itself.
22:30
like when you choose 2 corners of a quad and move them in the editor
Avatar
won't it be the same effect
Avatar
i dont think so.
Avatar
why not
Avatar
try it out
Avatar
don't u just put one with larger para x and y
Avatar
i dont think you can create something like in the video with the editor now
Avatar
do you mean like the sides of the objects
Avatar
yes. or the ground
Avatar
lol is the testing channel free to use again?
22:37
@Im 'corneum doesnt have dev role
Avatar
yes (edited)
Avatar
ha i'm safe i have the role
Exported 639 message(s)