« first day (1846 days earlier)      last day (3471 days later) » 
00:00 - 16:0016:00 - 00:00

00:18
cut the cycles on signal pattern detector to 278, compared to Almo's 179. yeah that's definitely a genius solution, lol
00:55
hehe :)
 
8 hours later…
08:46
@Joe only one I know if is the one linked to earlier in the discussion: angryfishstudios.com/2011/04/adventures-in-bitmasking
09:33
This is how the "masking" (via using partial tiles) would look like for the 64 possible hexagonal tiles boiled down to just four "base" tiles would look like:
Jon
Jon
makes sense. looks cool
(Need more coffee, sentence structure broken)
Jon
Jon
very early
need sleep then coffee
Sleep sounds good
Wait, I'm at the office? Crap I can't sleep :(
@MartinSojka you're missing one of the required base sets though, the full empty one (yes that makes sense, somehow)
@KevinvanderVelden No, I don't. You see ... this is "brown place bordered by something else" set. That means that the 64 possibilities range from "brown place surrounded by something else on all sides" to "brown place surrounded by more brown places on all sides" - but never "no brown place".
09:42
Aah makes sense
As said above "Sleep sounds good"
Seriously, I went to bed at 10pm and was still freaking tired at 8am =/ (when I woke up)
Layout out tilesets with multiple terrains can be done in two different way anyway (I like to call them "hierarchical" and "equally-important"), and they have subtly different results in which combinations you need, but this diagram isn't about that.
 
1 hour later…
user92578
10:54
Hi
user92578
I've got tons of homework but I hope I can find some time to get some progress done on the tilestuff
Have fun. :)
user92578
Thanks...
user92578
11:27
It seems like it is really important for me to know which churches were separated from the eastern church of Christianity in the 400s
Armenian and Ethiopian would be the biggest ones, I think.
Possibly Coptic?
Tell us @Tyyppi_77!
user92578
Yeah those that Martin listen
user92578
Either you're really interested in religion or you just have a really good general knowledge of things
user92578
Ethiopian is listen as a Coptic church in my book tough
11:36
I was just guessing, really.
user92578
How does one make guesses like that???
By being @MartinSojka
user92578
I had never even heard of Armenian church before.
Well, 400s is still rather close to modern times and Christianity is my religion, so it's more or less knowledge by osmosis. Also, modding CK2.
user92578
Oh lol :D
user92578
11:39
I should try modding Portal and getting access to a nice new way of transportation it seems.
It's like dealing with genealogy and different calendars leads to the "rough" knowledge about the longest year so far (it had about 450 days, without looking it up), and who's responsible (Gaius Iulius Caesar).
Just stuff I cram into corners of my brain and they never go away ...
user92578
The most important task of high school in Finland is to offer a general knowledge of everything to the students. "Sad" part is, 50% of students that graduate from elementary, just go straight to a vocational college, that just speedhacks you a career and a profession in three years.
user92578
So we in high school have to take courses about philosophy, history, maths, different languages, music, arts, sports, psychology...
user92578
Which is a great thing... but really, Armeanian church???
Knowing that it exists and which slot to (roughly) put it into, spatially and temporally, is enough. For everything else, there's Google.
user92578
11:48
Yeah, true. But still to be honest, 1 obligatory course of physics + 1 obligatory course of chemistry is way too little compared to 3 obligatory courses of religion.
user92578
Ah, finally to the interesting homework: boundaries in math.
I wonder if you can upload SVGs here ...
"Failed to upload image, please try again!" ... meh.
user92578
I'll probably get to learn about derivatives this week!
12:00
Updated hexagonal "minimal" tile map example, with letters everywhere:
user92578
Yeah that was a good video.
Lots of people send them seeds afterwards
As in, actual seeds
Hahaha nice
user92578
Stupid math question, but sqrt(x - 2) - 2 is the same as sqrt(x - 2 - 4), right?
12:02
@Tyyppi_77 No.
user92578
Or did that work differently than what I remember.
user92578
Ah, so there's the problem
sqrt has 2 answers
user92578
Yeah, I know that
12:03
It's the same as sqrt(x-2-4) and sqrt(x-2+4) I suppose
user92578
I need to clean up this one fraction function for figuring out it's limit.
... or you can just cheat and ask MathWorld. :)
Hey guys
Do you know how transitioning between controls are made in UI?
user92578
My calculator could probably do this, but we need to learn how to do this by hand, because tasks like this will be in the no-calculator part of our test.
user92578
Hi Jesus
user92578
12:07
What do you mean by that?
You probably want to specify which UI toolkit you're using, at least ...
I could tell you how to do it in Flash, but I'd have to kill you. Just to be sure.
For wanting to use flash I presume? Seems the safest bet
user92578
What is transitioning between controls?
@Tyyppi_77 You have Ui screen. With buttons. Say, "Start game", "Save game", "sound options", etc. How switching between those buttons are made? Are you using state graph? Or code, that scans everythinh what's down (if you press "down" arrow) and tells which button to choose?
user92578
Oh
12:10
Because we have a serious problem in our game
With controller, and a ton of bugz
user92578
My UIs are so simple that I just either increment or deincrement m_ActiveChildIndex, that is used to access m_Children
user92578
If the menu layout is vertical (it's specified by the menu-user class), I listen for the up & down keys, or if it's horizontal, I listen to the left & right keys
user92578
I just actually had to implement the bi-direction support thing for message boxes
user92578
That's how I do it, I don't know how people with UIs that aren't just either left / right or up / down layoutted
Generally, you have a FocusManager which deals with recording which element is in focus, which can be in focus, what their order is, and which input events (keyboard, mouse, controller) lead to what focus changes. The UI elements just define if they can be in focus or not, how their "skin" changes when they are (including transition effects), and possibly an order number or something like that.
user92578
12:13
HOMEWORK IS DONE
user92578
Now, tile mapping
user92578
So yeah, my UI focus movement is purely dependent on the order items are added to the menu
user92578
And my Debug tool UI code doesn't support that at all, they're all mouse based
here the example screen
I use scan down, scan left, scan right scan up functions to find which next button to set focus to
but pay attention to circles
I just can't choose them with current Ui system
user92578
Right
12:16
they can be present and they can be hide away
user92578
Yeah I have no idea how to do something like that
because scan up, for example, will scan only up, and never check what's on the side
if it will check, then focus will be sent to wrong element
@JesusChrist Have an (invisible) container for the boxes, including the circles. When you scan down, the focus changes to those containers. They have data which tell the focus manager which interior element should get the first focus.
user92578
So I'm not at all sure anymore what would be a good way to do the tile mapping.
user92578
A part of me wants to just copy paste 256 tiles into a tilesheet, one part wants to use the table in the angryfish article about 8-bit tilemapping using only 48 tiles, and then a small part of me wants to use something else.
Joe
Joe
12:26
jfxr giving me 20k wav files.... how am i supposed to use sound for my js13k if one jump sound is larger than my whole submission?? D:
user92578
can you use something else to compress the files more?
Joe
Joe
thats what im googling right now
i dont crap about audio though
user92578
yeah me neither
Joe
Joe
apparently wav is a large file size format?
user92578
no idea, im an audio noob
user92578
12:28
also a bitmasking tiles noob
@Joe wav is raw
There's no compression in it even, so yes, it is a large format =p
@Tyyppi_77 So why not use the 5-tile variant I've shown earlier? In use, it can be as simple as a bunch of table lookups to get whichever actual tile you need from it.
Joe
Joe
@KevinvanderVelden perchance do you know the best / most compressed format?
@Joe as with most things there's no single best format; using ogg or mp3 is a safe bet though
user92578
@MartinSojka I don't actually know how that would help me.
Joe
Joe
12:31
@KevinvanderVelden well lets ignore best for now... quality is of little concern right now, filesize matters in this case
@Joe Ogg Vorbis is often used and quite good.
Joe
Joe
ill try ogg
@Joe yeah, as I said, ogg or mp3 =p
And you don't need to pay royalties, as opposed to MP3 ...
user92578
Like I've got the tiles drawn that I'll need (I think might have messed something up from looking at the reference image)
12:32
The other commonly used one that I know off is flac, which is losless which you don't need
@Tyyppi_77 Less stuff to draw, more stuff to stuff into a single texture.
user92578
The 48 ones that are compressed from the 256
The 48 can be compressed to 5 =p
Joe
Joe
20k wav down to 5k ogg... still 10 times too big
user92578
Yeah, but that generates another lookup issue, which is where I'm stuck now
12:33
@Joe Compress more. :)
I'll look into making a renderer for it when I get back
Joe
Joe
im going to need to read up on audio to understand wth the variables are
(pygame? Yes probably in pygame, nice and easy)
user92578
I think I should first get the compression from 256 to 48 working before starting to compress the 48 into a 5.
user92578
But I might write a tool for generating the 48 tiles from 5 offline, so that adding new terrain types will be easy
12:34
@Tyyppi_77 Which language/library setup?
user92578
I'm using C++, SDL2
user92578
@Tyyppi_77 Kevin already did that.
user92578
So that's basically what I'd have to implement now
user92578
@MartinSojka Oh, I did not know that
12:35
@MartinSojka I was about to say =p
17 hours ago, by Kevin van der Velden
@Pip https://github.com/KevinVDVelden/Utilities/tree/TextureTileGen
@Tyyppi_77 I'm not sure what the hell I'm looking at. ;)
Spreadsheet from the adventures in bitmasking article
user92578
It's the table for compressing the 256 different values got from the 8-bit tile masking to the 48
user92578
Did chat just go down for you guys for a while too?
user92578
@KevinvanderVelden So what kind of data do I need to supply to this?
12:39
I made a thing
17 hours ago, by Kevin van der Velden
user image
And it has a readme documenting that I spend 2 hours making it
Ah, that one. That's what you get for trying to cram everything into bitmasks, I guess. :D
user92578
How does that generate 48 tiles for me from 5 tiles?
Magic, and a lookup table
The five tiles are 0, 1, 8, 9 and 38.
user92578
Yeah I've seen that
12:42
Every other tile is a combination of half-tiles of those.
(Well, those with letters on them anyway)
user92578
@KevinvanderVelden So is this the result of that or not??? I can't really see how that generates the wanted tiles for me
user92578
But still, I've got the 48 tiles that I need
No that was step one
user92578
Ah, okay, that makes more sense
You can just paint those 5 tiles yourself if you like.
12:44
17 hours ago, by Kevin van der Velden
user image
user92578
Ah...
(Look at the transcript =p)
user92578
Which one is the correct branch?
The one that has the relevant thing in it =p
user92578
TerrainTileGen?
user92578
oh right that one, good
user92578
But anyways, I think I just need to do a huge if chain to get the compression from 256 to 48 working
user92578
As described in the table I posted above
user92578
user92578
Or do you guys happen to have a better idea of implementing the look up table?
12:48
And the lookup table gives me headache. Why would you order the bits like that, instead of simply in order, doubling the side bits? Then it's just a bitmask and a shift to get the right quarter corner of the tile.
Like, I would order the bits something like A1BB2CC3DD4A ...
user92578
So simply by doing the bitmasking in a different order I could get the correct tile without a lookup table?
You then have three 8 lines long lookup tables for each corner: one for A1B, one for B2C, one for C3D and one for D4A.
Joe
Joe
3k for a .25 second jump sound MP3 ... slowly crunching this down from 20k
i need 500 bytes
user92578
Does that require me to re-order the tiles in the sheet?
user92578
Because that sounds very doable to me otherwise.
12:51
Not really, it just adds a bit of indirection to get to the result.
user92578
Okay, so this sounds really good. One thing tough, now that you guided me towards a solution, you might have to hold my hand all the way trough to the finished result.
Well, my idea was more for the 5-tile setup, because that would make it very easy to do it, but it works in general as well. I just need to find out which logic is behind the tile sheet ...
user92578
Ah, okay
user92578
Yeah I would really prefer doing this with the actual whole tiles
user92578
And at this point, if a better ordering could have be performed to the tile sheet, I surely could order it better if that would be necessary
user92578
12:57
I guess I also could ask the Broforce guys how they do this
bloop
user92578
blip?
hey
was justchecking if it was still logged in
user92578
hi
user92578
13:12
hardcoding the 256 values into a map and loading from there would also be an option i guess
Map? Surely you mean a simple array =p
user92578
oh right
Joe
Joe
@MartinSojka 200byte jump sound, and then converted to base64 string so i dont need to even make a http request for the file
time to do the same for the rest
user92578
Now here's a thought: I only care about the diagonal values if the top, bottom, left and right tiles are placed?
user92578
aaaaaand that's not true
user92578
13:42
This is by far the most annoying thing I have ever tried to make
user92578
And I'm just stuck trying to figure out how to do this without handcoding 256 values into an array
user92578
4 bit solution is so easy
@Tyyppi_77 at most you write a simple script to generate the table for you
But seriously, a lookup table is fast and easy
user92578
Okay, the script thing is what I found somewhere else
user92578
I would need some help on how to write one tough
user92578
13:54
I'm just missing the "easy" part of the look up table
TileIWant = lookup[bitmaskSum]
user92578
Yeah
That is the code at runtime, that is the easy bit
@Tyyppi_77: Damn, that tile sheet is annoying. Anyway, here's a simple solution: Assign each of the edges and corners a numerical value (A=145, B=50, C=100, D=200, 1=16, 2=32, 3=64, 4=128). For every edge or corner that's set, take the number and binary-OR it with every other set edge or corner. The result is an 8-bit number, one of exactly 48. Use it to look up in a (sparse) table which tile to take.
user92578
That sounds good :)
Here is the Google Spreadsheet with the lookup table (the last two columns), as well as how the bits look like for every combination.
"click Add new, select level, and a dialog will appear"
nope
just makes a new blank level, no template dialog
@Tyyppi_77 Martin speaks truth
user92578
Okay
Why I picked 145, 50, 100, 200, 16, 32, 64 and 128 is left as an exercise to the reader. ;)
user92578
sounds like an annoying exercise :D
user92578
14:00
So, first, I would have to detect if I'm putting in an edge or a corner instead of a complete tile?
Not really; you can look those numbers in the "Decimal" column and compare which binary numbers they correspond to.
No, you don't detect anything, you just binary-OR up to 8 numbers.
user92578
Okay, so that's the "bitmasking" part
my blank level doesn't even show the grid :(
You know, like the 3x3 matrix the page has around the middle? Only it looks like this now:
128 | 145 | 16
200 | - | 50
64 | 100 | 32
user92578
yeah, i think i got that
user92578
14:04
aight
user92578
and that gives me the "Decimal" column
user92578
And now I just bind the Decimal columns to my tile numbers
user92578
Which I need a simple way of doing given the starting point of the 48 number grid, and the size of the tileset
user92578
oookay, thanks a lot for doing all this
14:06
Instead of the "Val" column, you can also use the (x,y) offsets to the tile set.
user92578
Oh right
user92578
Well I index my tile rects with the actual Val index
user92578
But my tileset is wider than 8 pixels
user92578
But maybe I'll think about generalization a bit later
user92578
aaargh
14:17
GIMP?
user92578
how do I modify an int every 8th value
user92578
LOL
user92578
so 0-7, I want 0-7
user92578
8-15, I want 0-7 + something
x & 7
x & 8 > 0 ? x + something : x & 7
14:19
that gets an award for super-legible code :)
x & 8 > 0 ? (x & 7) + something : x & 7
user92578
i seem like a huge noob trying to make a game
user92578
and then again, at 16-23, I want 0-7 + something + something
It would be easier to do it you told us what "something" is.
user92578
So basically, because my tileset isn't 8x6 ( for the 48 tiles), I need to jump to the next row of tiles every 8th tile in a row
user92578
14:21
And the tiles don't start at 0, but that should be simple
user92578
So the next tile from 7 isn't 8, it's something like 64, or whatever
Else: int baseVal = x & 7; int[] addition = [0, something, something + something]; return baseVal + addition[x>>3];
user92578
ah
hahaha
user92578
lol
user92578
14:23
cats are funny
user92578
lol
If you have a multiplier for "something": return base + (x & 7) + multiplier * (x >> 3);
user92578
The tileset looks like this, the numbering being correct here, right?
user92578
user92578
So only having 6 rows of tiles is correct
14:28
Yes.
user92578
ooookay
user92578
and then a stupid question, is taking the initial starting position for the first tile (being 26 for me, not 0) is just adding the initial index to the value got from incrementing with the row change
I have no idea what the question is, @Tyyppi_77.
user92578
i think it just works
user92578
14:30
I'll clarify tough, just for the sake if it
user92578
The first tile in my tilesheet is at index 26
user92578
Not at 0, as in the reference image
user92578
So once I've added the row manipulator int baseVal = x & 7; int[] addition = [0, something, something + something]; return baseVal + addition[x>>3]; (done that), can I just add the starting index to the result
Well, I'd just change the "Val" column, probably. The layout above is done so that graphic artists have an easier time generating the sheet, not because the computer cares about the exact numbers.
user92578
I'm working on a script that prints out an copyable std::map for me
user92578
14:32
modifying the values there
user92578
looks like I have screwed up somewhere in the OR process
user92578
I'm only getting 255
@Tyyppi_77 I'd use base + (x & 7) + something * (x >> 3); if "something" is a constant or independent from x and you expect x values bigger than 23.
user92578
base is the one in the Val column in the original spreadsheet?
user92578
no
user92578
14:36
x is the val
user92578
base is the starting index
No, base is where your tile sheet start. It's 0 in the original.
user92578
something is row size
So you need to add the base before you modify it: x += base; return (x & 7) + rowSize * (x >> 3);
user92578
I think I've already got the data working, and looking correct
14:38
Good. :)
user92578
How do I inspect data in an arrray of pointers in visual studio?
user92578
CLevelEditorTile** neighbours = new CLevelEditorTile*[8]();
user92578
I'd need to see what lies in there
user92578
ah, got it
user92578
oh now I see what I did wrong
user92578
14:43
I need to separate empty tiles from "outside of level" tiles
user92578
Not quite there, but almost:
user92578
user92578
Something is a bit wrong
@Tyyppi_77 ... or just make your level surrounded by (not rendered, inaccessible) extra layer of tiles in the internal level array.
user92578
true
user92578
14:48
sooo
user92578
looks like the corner tiles are like "inverted"
user92578
maybe some of the flags are wrong
user92578
OR
user92578
my lookup table is wrong
user92578
lookup table seems right
user92578
14:52
decimal 255
user92578
That means that all the neighbours tiles are there?
0
A: What does \. mean when matching in Perl? (backslash dot)

AlmoIt's escaping the period so that it can match a period instead of using the period's usual special meaning.

let's see if my snipe holds
Sometimes, I answer something I'm not sure of to be first, and if it gets downvoted I just delete it. :)
oh yes upvote! looks like I might have it right
user92578
But why does 255, correspond to 46
user92578
14:54
which is an image where there's edge on every side of the tile
Hell if I knew, I just copied the Val columns. :)
user92578
and 0, a tile where there are no neighbours, corresponds to 47, a tile where there are no borders at all
If that's inverted, then use "1" for when there's NO same tile to that side/corner.
(or rather, the bitmasks)
user92578
I don't get that
user92578
oh no
14:57
I just pirated my first book. I feel like a real college student already. :P
user92578
i think i'm just one off
When are you OR'ing the values, when there's the same tile on that side, or when there's NO tile on that side? Whatever of those you do, invert it.
@Tyyppi_77, Is this C#?
user92578
C++
Oh right :P
I have the autotiler stuff from my Terraria-clone lying around. Want to have a look?
user92578
14:58
How many bit autotiling?
user92578
4?
user92578
Oh, yeah, I might be atleast a bit curious
user92578
if it's not too much trouble
user92578
15:00
IT WORKS
user92578
ITS ALIVE
user92578
I JUST NEED TO UPDATE THE NEIGHBOURS TOO
Of course you do! If you change a tile, you force a 3x3 update :P
user92578
Yeah
user92578
Now I need to do that in a smart way...
user92578
15:01
hmm
user92578
I suppose tiles need to know where they're located
user92578
Or
user92578
No they don't they're just placed in a grid
Basically, the helper returns what tile from the sheet to draw. :)
user92578
15:04
Ah, I see
user92578
Hardcoding :)
user92578
TileIndexFromNeighbor[0] = new Point(2, 10);
TileIndexFromNeighbor[1] = new Point(2, 10);
TileIndexFromNeighbor[2] = new Point(3, 3);
TileIndexFromNeighbor[3] = new Point(3, 3);
user92578
I guess you just hardcoded a bit more than I
user92578
More straight forward
user92578
15:22
THANK YOU GUYS SO MUCH, SPECIALLY @Jon who got me started and then @MartinSojka who really got me trough it, and thanks for the "other way of doing this" @William'MindWorX'Mariager!
user92578
nice one dude
user92578
thanks
:D
user92578
one bug tough
15:29
you suck then give it up ;)
user92578
lol
user92578
this must be one of the coolest things "I" have ever made
:)
user92578
Okay got it
user92578
Added the dirt noise:
user92578
15:37
user92578
Next up I think I need to start thinking about Z ordering
dood that looks good
user92578
Thanks'
user92578
Once I'm done with this, level creation will be so much nicer and smoother and provide more instant feedback and stuff and everything and I'm so exited
yup
good tools make game dev much less annoying
user92578
15:45
yeah
user92578
oh no, I just remembered that I'm not allowed to dev tomorrow
user92578
so I can't continue on doing the cool stuff tomorrow :((((
D:<
there
user92578
computer rules get kinda lame when you're 17
user92578
but I don't want to get all Psycho (see what I did here?) and complain about my parents
15:55
hhaha yeah
user92578
:D
user92578
So this day will be known as the day Tyyppi got autotiling working and as the day Tyyppi made a pun
00:00 - 16:0016:00 - 00:00

« first day (1846 days earlier)      last day (3471 days later) »