« first day (2314 days earlier)      last day (2707 days later) » 

1:42 AM
Just for the fun of it, this is with a perspective camera. It would require a fair bit of work to get right, but...
I think I'm done for now with playing with the perspective, but it could be fun still.
 
Pip
I think that looks pretty nice actually
 
Yeah, it does.
It would take a fairly signficant re-write of my world wrapping code, however.
I think that's in my cards one way or another, however, so...
I'm glad the changes I made to do a tilted work still mostly work with this system, however.
Also, the movement looks a bit weird. The mountains are a bit higher than they probably should be, so...
The only two things that my current world wrapping doesn't do well are clouds and allow for this perspective.
I'd also have to re-write my minimap code a bit, but not too badly I would hope.
 
2:11 AM
 
 
11 hours later…
user92578
12:57 PM
So how do games usually handle having a bunch of sound emitters next to each other which makes the sound a lot louder than it's supposed to be?
 
user92578
I can't really come up with anything, maybe like doing a pass on sounds and seeing if their ranges overlap, and if they do, I would pick the middle point and place a sound there and remove the others?
 
user92578
A max number of (the same) sound effects playing at once?
 
user92578
Would that mess up the stereo positioning though?
 
user92578
If a limit is exceeded, only play the nearest ones to the player?
 
I don't get why they should get louder?
 
user92578
1:02 PM
Because there are like 8 blade sound effects going on at once
 
well if you have a bunch of enemies making stepping sounds they will amplify
Why not make something like a listener zone around the player. Only play sound effects in that zone? You can even layer it so you have a constant background sound and then sounds based on distance
 
Well if you set the volume at X db, many time, how could you get a higher volume out of it?
 
or several ranges in the listner zone that control the volume based on distance
 
user92578
 
user92578
That's basically a test scenario
 
user92578
1:05 PM
Blades have a saw sound going on at a loop
 
user92578
The sound is emitted at the center of the blade, and I have set it to have a minimum distance, under which the sound is heard at 100% volume
 
user92578
The sound also has an attenuation factor, which will decrease the volume once the player is out of the minimum distance zone
 
user92578
@UriPopov A static zone won't work because some sounds need to be heard from afar
 
its not static it follows the player
 
user92578
Well it is static around the player
 
1:10 PM
I'm thinkingof the audio listener component in unity
it does what you want
You can even layer it so you have a constant background sound and then sounds based on distance
 
I dunno, I have not faced that issue before. I mean. I have often situations where there are a lot of things colliding (rock-rock and rock-metal) types of collisions, but the behaviour was as expected.
 
Dev Blog- Sea Trading Game. Improved perspective, rendering, and choosing a hold configuration! kd7uiy.com/2016/12/dev-blog-sea-trading-game-angled-camera.html
3
 
user92578
1:27 PM
@AlexandreVaillancourt Odd, I would think this issue would be universal
 
user92578
?
 
Sorry, youtube wanted me to copy the URL instead of doing it for me...
 
user92578
I see what you mean, but I'd argue that those sound effects are a little different
 
Yes, probably :)
 
user92578
1:36 PM
They are not played at the same time, and not looped
 
user92578
So that's what you do for a living?
 
user92578
What does that mean like more in-detail? What aspect of the simulation do you handle?
 
@Tyyppi_77 Agreed.
 
user92578
So I think the easiest initial tweaks from the question I linked are 1) Alter the pitch a little 2) Offset the sound a little
 
user92578
1:38 PM
But I don't still think that will change the volume really
 
Hmm, we're about 5 ppl working on the software, so I get to do a lot. I'm not the expert on the physics, and I'm not the expert on the graphics, but I still tackle both of these parts once in a while. I tend to take care of the architecture of the software, and the optimization, and the audio.
 
user92578
That's really cool
 
I like it :)
 
user92578
So that's a custom engine then?
 
Each simulator is a software based on a load of in-house libraries and open source libraries. I would not call it an engine..
We build a new simulator by copying the files of the last one we did, remove what was specific to it, and add the new stuff in. The 'core' of the software keeps evolving, and we can retro-fit some improvements if we feel it's needed.
 
user92578
1:44 PM
Ah, so like more like a framework then
 
More like it, yes!
If it were to be all re-done, I'd do some things differently (I've been here for 4-5 years now).
 
user92578
2:03 PM
// make a passthru processor function that does nothing...
void noEffect(int chan, void *stream, int len, void *udata)
{
    // you could work with stream here...
}
 
user92578
That's pretty much all the documentation I get for how effect processors work
 
user92578
Am I assumed to know what the hell is even in stream???
 
That's SDL documentation?
 
user92578
SDL_Mixer documentation
 
2:12 PM
I guess you'll have to dig in the code?!
 
user92578
yeah I guess so
 
user92578
I got slightly side-tracked from the original issue with this pitch-shifting idea
 
user92578
stream seems to be an array of int8
 
user92578
what could those represent?
 
I can't tell.. been a while since I've worked with core audio
 
2:17 PM
Sound samples? Presumably
Though I think 256 levels of sound isn't much, TO THE GOOGLES
 
user92578
So for an example to pitch shift to twice the pitch I would basically just remove every other element from stream and then move all the samples together?
 
I don't think it's 8 bit actually
 
user92578
oh right my bad
 
user92578
FUUUUCK
 
user92578
so apparently it can be 8 bit
 
user92578
2:20 PM
It can also be 16
 
user92578
it can also be unsigned
 
user92578
The library actually implements panning with the effect pipeline
 
user92578
That file is 1.6K lines long
 
Also you can't remove elements, that'd wouldn't be a pure pitch shift either that would just be a speed up
 
user92578
really not sure if I want to get into this at all tbh
 
2:23 PM
Pitch shifting is rather complex
 
user92578
yeah I think I'll just skip this, looks like other users of SDL_Mixer have come to the same conclusion
 
user92578
The lack of documentation also doesn't help
 
user92578
2:43 PM
aaand somehow I've managed to make the blades sound very very glitchy
 
user92578
with 2 FPS in release...
 
user92578
yeah this was not the way to go
 
quick! Revert!
 
user92578
Me: Well surely SDL_Mixer then must have functionality to start the playback at a specific time in the effect
 
user92578
Developer of SDL_Mixer laughs manically
 
2:52 PM
me every time I break the build youtube.com/watch?v=l12Csc_lW0Q
and I need to explain to the other people at the startup why things dont work right now :D
 
user92578
sigh
 
@UriPopov would this not be a better method?
 
was going on a smoke break. Now I have to listen to shaggy
 
3:38 PM
So is Tyyppi just gonna keep asking about this basic audio problem and nobody is gonna answer him?
I'll repeat for the millionth time. Dynamic Range Compression.
Dynamic Range Compression. that's how you maintain constant volume with a varying number of sound fx playing at once
also jfc
Why do you guys guess?
@AlexandreVaillancourt @KevinvanderVelden yes. they are sound samples
it's usually straight linear PCM, and yes 256 discrete positions is plenty to encode decent audio, you get 44100 of them per second.
 
Yes, duh, of course they're sound samples. The question is how big are said sound samples
 
I mean, you only use 256 discrete brightnesses to encode each color
 
And I've not worked with audio so meh
 
Though using 16 bit samples is customary these days
since it's cheap af
 
Yeah, that's why I thought it wouldn't be 8bit despite what the one reference Tyyppi found in that mess =p
 
3:46 PM
also dithering applies, but the important thing is that the resolution is the sample rate, not the depth
sample depth corresponds to color depth, aka barely noticable until it gets way too low, then painfully obvious
anyways pitch shifting is definitely the wrong way to go
 
Makes sense, does dithering work well with only one dimension though? (video is 2d, sound is multiple 1d things?)
 
well it only needs to be in one dimension for audio because each channel is independent
you can separately imagine each speaker's extension over time as the 1d signal
so time domain dithering gets naturally decoded by the physical process back into a smooth motion
and the artifacts occur above 22kHz so you can't hear them even if the physical decoder isn't perfect
please gently tell tyyppi that shifting pitch is a wild goose chase... then you will still have the volume problem, plus a new beat frequency introduced by the amount of frequency shift, as well as an extremely noticable phase cancellation effect sweeping across the frequency range with this beat frequency
and it's way harder than it needs to be
 
d
 
You just need to track the highest peak of your total output signal, and then use volume = 1 / peak
Then you use the usual peak *= 0.99 kind of trick to gently bring it to zero over periods of quiet
that's dynamic range compression
 
@MickLH aah, that makes sense. Dithering works because there's basically a filter smoothing it out anyway
 
3:57 PM
also a nice side effect of such simple dynamic range compression: heavy gunfire or explosion sounds will give you a split second of everything else being a bit quieter, with a fairly realistic exponential recovery
 
I don't think that's what tyyppi is working on by the way =p
 
I know
It's just a freebie you get from even the most basic algorithm
Literally most of the advanced stuff goes towards removing that natural effect, for musical purposes
 
Uuuuuuuugh this song. WHY DOES THE OFFICIAL YOUTUBE VIDEO HAVE A BACKGROUND HUM?
 
also I've personally tried exactly what Tyyppi is trying, it's a non-fruitful path of research and the presented concept is significantly easier to code, faster at runtime, and actually robustly solves the problem
 
Not if the effect he wants is pitch shifting to simulate say, doppler effect? =p
 
4:04 PM
I get that you like to play devils advocate, and I enjoy that too. I don't look for these technicalities, but it really isn't exactly applicable
I've worked on pitch shifting a lot actually, and you're really really gonna want to pre-process the files if you plan on playing with that and expect any kindof decent quality or efficiency
A pitch shifter suitable for a doppler effect will work differently from one designed for phase blurring
(btw what he's trying to invent is called phase blurring)
It's not meant to reduce volume while maintaining waveform height... it's meant to maintain volume while reducing waveform height.... there really is a subtle difference
and it only sounds acceptable for unrelated harmonies, which very much excludes harmonies of the same exact sample
If you wanted a doppler shift, you can trade memory for time effectively also
I particularly like the strategy of storing the integral of the waveform and then computing the resampling from that on the fly, for frequency modulations that can cover a large range in short time
If the instantaneous pitch bend goes outside (0.5x - 2x) then the simple linear blending becomes totally wrong, also the linear thing sounds cruddy anyways, you should use a windowed sinc interpolator
(eg lanczos windowed sinc)
in contrast, for fixed shifts like Tyyppi talked about, clearly a lookup table of pre shifted samples is fastest
(but I emphasize, that wouldn't solve his problem, the simplest first thing I said with volume=1/peak is all he needs)
 
I haven't seen all of this, but I'm wondering why he has to worry about this at all
is there no decent audio engine in SDL?
 
he wants to play a ton of sound fx at once
enough to clip the volume apparently
 
user92578
SDL_Mixer (which is what I use) is quite basic
 
user92578
Kinda like the renderer in SDL
 
user92578
Gets basic stuff done, but nothing more advanced really (like shaders for the renderer)
 
4:19 PM
so he's trying to shift the pitches to intuitively unalign the peaks
but that doesn't much help the average case, which is why it's a goose chase
I should probably just make an open source library that black boxes an unrestricted input signal into a volume limited output...
 
It sounds like Mick has some really good advice for you on this audio thing. Maybe unblock him temporarily, and you guys nicely discuss a way to accomplish what you need?
Just a thought. Do what you like. ;)
 
I won't hold my breath lol, but before I go I will say that the straight peak detector approach is decent, but for only slightly more complexity it can feel a lot more natural
If instead of the exponentially smoothed peak you use the windowed RMS average, you'll have a smoother control signal, but it will lose its very strict non-clipping property, though this is arguably a good thing you might find in "feels" testing
You can mitigate the main drawbacks of clipping using a non-linear output mapping, something with value 0 at the origin, going to 1 at infinity
 
Say Mick, you'd know this. I'm curious (having never done audio coding before) how do you add 2 sounds together anyway?
 
You just add the samples independently, if they are at the same rate
 
Do you work with the deltas from the previous sample each time or
 
4:32 PM
(if they are at different rates its more complicated but effectively boils to upsampling the lower rate)
 
@MickLH doesn't that give lots of clipping? Or do you do it in a higher bitsize
 
That's exactly the problem Tyyppi is up against lol
interestingly, in the average case there's not as much clipping as expected
 
Ah so keep track of the volume as well
 
but in the case where the two sounds are equal, you get clipping more often (unless you do the increased bit depth thing)
actually increased depth is the only correct way
but the sound cards only spit out 16 bit depth
so you need to do weird things that are often case-by-case
 
And sound samples are signed, duh. That makes sense
I was still thinking like colours, you don't have negative colours
 
4:36 PM
lol can of worms detected
...well we don't have negative pressure eitherrrrr
 
True, bit we're not talking about pressure, we're talking about displacement of the diagram
Er not diagram
WHAT'S THE THING THAT MOVES IN A SPEAKER
Damnit brain stop not working
 
diapraghm?
or sth
 
Right that thing
 
the thing
 
Aanyway, negative pressure indeed doesn't exist. But we're not starting at 0 we're starting at 1 atm
 
4:39 PM
lol that train of thought leads to an interesting concept
the physically maximum audio volume :P
 
Didn't someone calculate that?
 
I'm pretty sure
I think it's only in the hundreds of decibels also
 
Well, "only" hundreds on a logarithmic scale...
 
:P
 
hehehe
 
4:42 PM
"only" the maximum imposed by physics
still if a jet can make 100dB on accident then my quest for ultimate bass looks possible
 
In water the maximum would be quite a bit louder
 
I'd be afraid the sound would work too well in water and just kill me, actually I'm afraid 190dB in air would too
 
Oh it definitely would kill you
 
mmm killer bassdrop bro
 
190db creates near vacuum in the low pressure bits, I don't think people survive that for very long
 
4:46 PM
so the wavefront gives you whiplash and then crushes your bones, leaving you as a jelly ball to explode in the vacuum a millisecond later?
 
Pretty much
 
so... all music is metal! with sufficient volume
 
Going from 2atm to 0atm at audible Hz range probably doesn't play well with organs or bones
 
heh
 
even if it's not very probable, you get plenty of tries per second
 
4:49 PM
Also: Can you truly hear a sound if the first thing it does is rupture your ears?
 
I think that's related to the thing with astronauts seeing flashes of light lol
a philosophical question I mean, asking if it counts as sight, if a cosmic ray excites your optical nerve lol
I argue that it's also equivalent to: If someone is sure a fair coin will give heads next, and it does give heads next, were they actually sure even though they couldn't possibly have been?
 
If you're mathematically sure a fair coin will give heads next: It's not a fair coin =p
 
Exactly! the coin is fair and they just got lucky
 
That's the problem with that question, you first need to define what you mean by sure
 
I believe that development also translates back through the metaphor
What does it mean to truly hear a sound?
 
4:55 PM
Sure as in "I'm sure that god exists", you can claim that. It's totally disconnected from reality in any way but still, you can be sure in that definition about the heads
 
lol can of worms detected
 
Mostly why I picked it
 
So I guess then, if you experience something so loud the wavefront immediately blows out your ear before the first cycle... it sounds like a lifetime of deafness, so therefore you can in fact "hear" it :P
but not the 2nd one lol
 
But is that "half" of the wavefront even a sound?
 
(using "hearing" meaning pressure waves causing ear related sensations that are consciousally perceptible and produce a sense of some type of sound)
 
5:04 PM
That's reasonable
 
@KevinvanderVelden hm. Is an electron matter?
Guys would a fully riced out 3d sound plugin sell on Unity store?
I obviously want to do that but the only projects I can gut for time are income related
 
I have no idea
 
Huh, so blood... and bbl lol
 
5:50 PM
I think I'm almost at an alpha quality level of build for my game...
 
user92578
cool
 
It's playable, there's still a lot of issues, but it's coming along.
I should probably add a few menu items like exiting, and loading dialogs, etc, but...
dropbox.com/s/oqz4vummieqh6co/SeaTradingGame.zip?dl=0 is an updated test build. It's really starting to look and feel like something.
2
Wow, it's Monday and I've already finished all of the things I said I was going to do for the week...
 
user92578
no 1080p?
 
It's an option for the computer I'm on now...
Of course, I'm going to have to do something about that loader. Not sure what yet, but...
 
user92578
oh sorry
 
user92578
5:58 PM
I can't do windowed 1080p
 
user92578
my bad
 
Yeah, I see the same thing actually.
The fact you mentioned that though will allow me to record higher quality video the next time I try:-)
 
user92578
so a stupid question: what's the challenge?
 
user92578
everything works really nicely though and the game looks awesome
 
What do you mean challenge?
 
user92578
6:01 PM
like can I lose somehow?
 
Right now, no.
There are 3 features which are implemented to some extent that will eventually allow for a game over condition, lack of food, water, or money.
Plus I'll add in random events like storms and pirates that if you are properly supplied, you can survive, otherwise you will likely die.
But I don't have a game over condition yet.
I think I'll add that to my short term list, however, it seems like a good idea of something to have!
 
user92578
Are you aware of the cloud artifact when the world wraps?
 
Yes.
Honestly, I'm just not quite sure how to get rid of that...
I'll come up with something eventually, but it's never been particularly high on my priority list.
 
user92578
yeah, anyways, I gotta head off, but the game's looking and feeling really nice
 
Good, that's what I'm hoping for at this point. Thanks!
 
 
2 hours later…
7:42 PM
I know where this happened. not far from where I am now
 
8:07 PM
Buses unable to stop in Montreal is not a new thing :P
 
hahah yeah
but it's interesting it made a national (global?) blog
 
imagine Peel coming down from des Pins
o_0
 
That accident was epic. Unfortunately. lots of ppl involved
 
Does someone here works with Unity3D and maintains an ERD diagram?
 
@Almo some streets are badly under-used for their fun factor... :P
 
:)
 
 
1 hour later…
9:33 PM
@Stud I don't even know what an erd diagram is
 
9:47 PM
This I guess?
An entity–relationship model (ER model) describes inter-related things of interest in a specific domain of knowledge. An ER model is composed of entity types (which classify the things of interest) and specifies relationships that can exist between instances of those entity types. In software engineering an ER model is commonly formed to represent things that a business needs to remember in order to perform business processes. Consequently, the ER model becomes an abstract data model that defines a data or information structure that can be implemented in a database, typically a relational database...
 
Yes, that's what I'm talking about
Basically it helps you keep track of the architecture of your code
 
I'd never do something like that, unless the game were pretty big
I don't comment my code much, either
 
Unfortunately that's the case for me
 
I don't like spending time maintaining things I never use
 
This is the AI
 
9:49 PM
yheah looks big enough to warrant it
 
Plus I'll need to maintain this for years I think
But Unity3D doesn't really help with making an ERD. The component oriented architecture doesn't make that easy
Maybe I should post on Software Engineering SE. Not sure I'll have answer here though, Unity3D is specific to video games.
 
If you think game devs will give a better answer, ask here
I don't think they would, honestly
you're probably looking for help from some programmer at a big corp like a bank with a huge system to manage
 
Actually, I'm not sure that an ERD is the best way to document all this
 
Why do you need to document it?
 
Because I'm going to work on this for several years if everything goes well
And after one year the thing is already quite big, and I don't have all the mechanic implement, far from that.
I think I don't have a third of the final AI with that screenshot.
I'll forget things, I'm sure.
 
9:55 PM
So is it a plan, or is it the actual thing?
 
It is the actual thing
 
Ok, I see why you'd like to document it.
 
Maybe I should just look at the other tools I could used. ERD may be the wrong way for what I need
 
I think I might buy assetstore.unity3d.com/en/#!/content/71057 and use the icons for various types of food in my game.
The question is, I suppose, if the pixelated graphics feels appropriate with my game. But hey, the price is only $2, so...
 
2$ isn't that much, even for a placeholder
 
10:08 PM
Done!
It should give at least a chance to test out my algorithms for managing the icons.
 
What do yo udo with them?
 
I'm loading them up at run time, will be using them in a variety of locations.
I'll show you one place, give me a sec...
The white boxes will be replaced with the new icons.
 
So you'll need more than food icons I guess?
 
Yes, but it's good enough to start with.
 
Sure
It allows you to work and test
 
10:16 PM
And see if the style is even appropriate.
The next thing on my list is to improve the display of my goods, so this seems like a good step in that direction.
 
It seems like there is nothing for documentation in the asset store. I don't believe this.
 
It did work, more or less, on the first shot!
At least, for some of the food types.
It's nice to know a system I have had in place for months and never tested worked!
 
user92578
Cool!
 
Also, these images are too pixelated I think to work with my style, but that's okay.
They will do for now.
 
10:32 PM
Having some image to test your layout is still good. It allows you to test how you show the informations to the player
Looks like your game have a lot of infos to display
 
Yeah, that's a challenge for sure.
Some of the information that's on that display will eventually go away, I believe.
 
user92578
I personally would make the UI more "floaty"
 
user92578
Basically get rid of the massive bars that are taking like 40% of the window width
 
On the right end?
 
user92578
But this is just me again, jumping the gun with your UI stuff
 
10:41 PM
I agree with that actually, it's just not that easy...
 
user92578
Yeah I understand that
 
Unity's Grid Layout, of which this is based on, requires a fixed size.
 
unity UI is a pain
it works really well, until you want to decide exactly how it looks
suddenly everything is a pain in the ass
 
And actually, it's not really jumping the gun. I'm working on that now.
 
user92578
I would probably make the side thingys hideable or something, and transparent
 
10:43 PM
Actually, this is the thing that I'm working on improving, but...
Yeah, I should do some work to that. Hmmm...
At least I could remove one of them. Most of the left one is wasted.
 
user92578
My view is that it should go "render game, the UI slightly transparent ontop of it", not "ui bar, game, ui bar"
 
I could easily replace it with a much smaller bottom menu with popups.
 
user92578
Yeah something like that!
 
I think the right one adds value, I'm hesitant to remove it.
 
user92578
Not necessarily remove
 
10:45 PM
I'm not sure how much value the ship really adds. Maybe I'll put the minimap there, keep the money bar, and leave the other stuff.
Hmmm...
 
user92578
Just make it transparent and draw it over the world, or something that looks less heavy
 
Hmmm. Will think on it some.
 
user92578
Yeah, do what feels right for you
 
user92578
You might have already seen this, but gamedevelopment.tutsplus.com/tutorials/…
2
 
10:58 PM
@jgallant that guy was right, horsea is really, really hard on Picross Touch. I currently have 22 blocks and about the same number of Xs, and it's very hard to make any more progress
 
11:13 PM
Really something like Civilization is kind of what I'm thinking about, so...
@Almo No kidding...
 
:D
 
Even the first movie is tricky.
 
agreed
 
Just a thought. It might be nice if blank tiles showed up as gray on the upper left, and X's with white.
It'd be nice to differentiate them somehow...
(Also, curse you for getting me to do another almost impossible one!)
 
11:36 PM
@Almo It seems there is a point at which it starts to become a lot easier... And you are almost there.
You probably passed it already;-)
Still not easy, but at least a path presents itself...
 
11:57 PM
I just realized something. For right now, sheep go in barrels in my game...
 

« first day (2314 days earlier)      last day (2707 days later) »