« first day (2881 days earlier)      last day (2145 days later) » 

8:58 AM
hi
Am I alone here :(
Why code when you can code()
@genaray Yes. The + signs in the bottom line are misplaced
 
9:24 AM
@KevinvanderVelden hi
@doppelgreener hi
 
how are you all
Can someone help me with generating terrains with negative positions
 
user92578
once again, ask, dont ask to ask
 
I have a terrain and I need to support terrains with negative positions colliding with the player
 
You're not going to get someone going "yes! i will help with that" before they know what the problem even looks like, so asking if someone will help is kind of a waste of time. Just post the question and if someone can respond to it helpfully they may do so.
 
user92578
9:38 AM
And why do negative heights currently not work?
 
no negative positions don't work not heights
 
user92578
okay lol
 
so If I set the whole terrain to a negative coordinate the player-terrain collision will just return 0
 
user92578
first of all, what is a negative position?
 
Where the terrain is positioned in the world
I repersent that as a vector
If one of the values are negative than the collision returns 0
 
9:48 AM
you don't need help generating terrain with negative values then, your collision code is messed up instead
 
@doppelgreener I'll show it here:
 
You really need to debug and unit test this stuff.
 
public float getTerrainHeight(float worldX,float worldZ) {
		float terrainX = worldX - this.x;
		float terrainZ = worldZ - this.z;
		if(this.x > worldX) {
			terrainX = this.x - worldX;
		}
		if(this.z > worldZ) {
			terrainZ = this.z - worldZ;
		}

		float gridSize = SIZE / ((float) heights.length -1);
		int gridX = (int) floor(terrainX / gridSize);
		int gridZ = (int) floor(terrainZ / gridSize);

		if(gridX >= heights.length - 1 || gridZ >= heights.length - 1 || gridX <= 0 || gridZ <= 0) {
			return 0;
 
Dude, debug your stuff.
Set a breakpoint and start debugging.
Have you debugged it?
You should be coming to us only after you've debugged it and are still not sure.
 
yes I have and I am sure that the code is ok
 
user92578
9:53 AM
well then there must be no issue!
 
Is it getting input that looks correct, doing the right things to it, and providing the right output? Because if your code isn't working the way you expect, then one of those things is wrong.
 
well the output of the program says otherwise
 
If there is no bug in this code, then there are bugs elsewhere, such as the collision detection code that uses this output.
 
@doppelgreener I have looked and changed stuff and I'm sure that the terrain generation code is the problem
 
user92578
okay fuck this i dont have the patience for this right now
 
9:55 AM
@TheMaskedRebel Then you haven't debugged properly.
 
I'm going get some concrete information
 
I need to make this really clear: we are not, and cannot be, a debugging service. Like, we cannot be in that we do not have the resources to debug (we don't even have your game files -- and we're not going to download those to go through it). You need to do the debugging yourself.
This may mean also learning how to debug effectively.
But it is very clear you have not debugged, because you cannot have a bug and also be sure your code is fine. Somewhere it's broken, and you need to set breakpoints and step through and examine the code to find where.
 
I think I know where the problem is.
 
Good, set breakpoints and/or make changes to find that out.
 
The code I'm using doesn't seem to allow the generation of negative terrains
@FreezePhoenix yes I have a list that gets all the objects in the scene
@JamesTrotter hi
 
10:03 AM
yo
im back with more "I still don't know how to interpret algorithms" questions
if anyone wants to help
 
I'd love to
 
preface: im implementing beat detection using whats talked about here
i'm currently on 2a1, "Frequency selected sound energy algorithm #1"
where it says "Compute the FFT on the 1024 new samples taken in (an) and (bn). The FFT inputs a complex numeric signal. We will say (an) is the real part of the signal and (bn) the imagenary part. Thus the FFT will be made on the 1024 complex values of:" and then gives the equation (an) + i x (bn)
wait i think i've answered my own question in my head by typing it out
 
tell me
 
i didn't know what the context of running that equation was, as in when to run it and what to do with the output, but it's saying to run that equation against my source file, pass it to a FFT function and take the output from that and store it in an array
i think
 
Cool try it out and see
 
10:10 AM
the problem with this thing is that screw ups are easy to make and hard to debug since it's all based on when I as a human interpret a beat in music...
 
What are you actually making @JamesTrotter
 
I'm not really making anything at the minute, I'm writing a library for processing songs for use in rhythm-based games
 
i don't actually have a solid concept for the game I'm going to make once the library is finished, just that it's going to be rhythm-based
have you ever played Audiosurf?
basically, audiosurf loads in a song from various sources (you can take from youtube, or a file on the local disk) and processes it in to a playable "map"
I'm writing a library that abstracts the taking in songs and processing them in to an object that could be used for generating "maps" procedurally
it's intuitive to you as a person where beats in songs are and how to make something move/react to music, because it's just just part of our pattern-processing brains to break that sort of stuff down
feeding a music file in to a program and trying to get it to do something similar is a lot trickier
 
How do I use infinite random terrain generation with lwjgl?
I looked up on google and I found nothing useful
 
10:25 AM
I have no experience with lwjgl, but it really depends on your approach. You could write it from scratch from the ground up if you wanted... im not sure if there's specific built-ins in lwjgl that make it easier though
 
@JamesTrotter Do you know of any algorithm
 
it depends what you want to do, are you wanting caves/overhangs to be automatically generated, or are you just happy with it being a single "plane" with hills/mountains/cliffs etc
basically it all boils down to one thing, noise generators
the most common used for terrain generation AFAIK is perlin noise
you can either generate 2D or 3D noise, 3D noise can be used for creating the sort of voxel-based terrains you get in space engineers/minecraft etc where theres cave systems and land bridges over holes and stuff like that
2D noise generation can be used for simpler height-map based techniques
a good real-world analogy is a body of water. if you introduce "noise" in to water randomly by blasting audio at it, the water forms valleys/bumps based on the frequency of the music
if you took a "snapshot" of the surface of the water, it would be a pretty boring map that rolls up and down in a repeated fashion, but it wouldn't be a flat plane
now if you took your audio source and played a tonne of overlapping sine waves all at different frequencies and volumes, the interference will create seemingly random bumps/valleys in the surface of the water, if you took a "snapshot" of that and turned it in to a mesh and loaded it in to a game, you'd have a slightly more interesting map to play on
noise generators basically work on a similar principle, you create values determined from overlapping signals in memory, and generate a mesh based on that
heres a good write-up of it
the interactive examples really help get across what they're talking about
simplex noise is a good algorithm too
 
user92578
10:46 AM
Here's also a very good tutorial on world generation: jgallant.com/…
 
thanks @Tyyppi_77 and @JamesTrotter
@JamesTrotter I'd really like 3D noise
 
11:41 AM
ultimately what you are going to want is a 3d noise generator for the terrain values, and an implementation of the marching cubes algorithm to generate a mesh from your voxel data
 
12:03 PM
When i read about using maps or lists... i often read about the speed, for example -> OLog(n) or something similar... Well... but what does this exactly means ?
 
user92578
It's how the time that it takes for something to happen grows
 
yeah, it's just saying the time it takes is logarithmic against the number of elements in the list
 
user92578
If you're interested, you can google "Big O notation"
 
Ah alright ^^ thanks a lot :) Im gonna take a look at it...
 
for example, adding all elements in an array together should be relatively linear in terms of how long it takes to run vs how many elements are in the array
100 elements would take 1ms, 200 elements would take 2ms etc, but for functions that have to refer to other elements in the array e.g sorting the time it takes can increase exponentially against the no. of elements in the array
 
 
1 hour later…
1:35 PM
which one you find more intuitive? http://coliru.stacked-crooked.com/a/849a41bd5ca2eaa3
menu changing through singnal emtting or direct call of the slot method
 
second is more readable IMO
does anyone here have much experience with Fast Fourier transform algorithms?
 
user92578
not really, but I'd suggest searching for a library that does that for you
 
i would use eigen
i use eigen for pca.
 
The sound library I am using has an FFT built-in, I'm just confused about the usage.. specifically in terms of feeding in sample data from sound files
like, it has a function to add data for the left & right channel of the audio, but another that accepts an array of samples
im not sure how the second function works, and since I might have n channels i'd rather use that
now, this library has very little documentation so I spend most my time poking round the source code to try and work out what I need to feed in to it
the class im currently looking at is this
line 77 is the function where you can feed in the left and right channels, all it appears to do is add them both together and divide by 2
does that mean I could treat everything as a single channel if I were to just average out the sample value across all channels?
actually, you know what, I just remembered there's an example project in the git repo that calls this FFT class, i'll see what that does.
 
user92578
Well the generic function does the same
 
user92578
1:45 PM
See MergeSamples at the bottom, it just averages the N channels instead of just two channels
 
oh yeah
that's where i've gotten confused, basically I have a float[][] of samples, the first level being channels the second level being the actual sample data for that channel
so if i build an array twice the size of my number of samples and "mush"/interlace the values i should be golden
 
i dont understand that... my lambda expression doesnt find my object... it always returns "no such object" but it exists O.o
 
(well, n size the number of samples - n being my channel count, i just generally have 2)
 
I DONT UNDERSTAND THIS ANYMORE... my map contains 1,5,7 and my lambda expression tells me that such elements arent existing O.o
 
user92578
show your code
 
1:58 PM
boolean exists = entrys.getValue().entrySet().stream().anyMatch(item -> item.getValue().id == id); not good to understand... but it should iterate over my map to look if one of the entrys contains the id
Its an ested map... thats why it looks a bit strange
When i loop over it to print the ids of the entrys ... it shows me that those entrys i search for are clearly in there
 
user92578
what does getValue do?
 
getValue() returns a Map<Integer, Chunk> in this case
 
It's a lot of separate steps joined together, spread them out and see where it goes wrong with a debugger would be my first step
Also o/
 
user92578
2:13 PM
\o
 
\o/
 
 _o\       *
Goal!
Kinda big goal BUT I EDITED IT ENOUGH TIMES ALREADY >:(
 
you did it!
mexico 2-0 germany!
 
I don't watch sportsball
 
2:19 PM
@Tyyppi_77 Btw... saw your game "GunHero" on steam :) Looks great ! Do you think steam is a indie-game friendly platform ?
@doppelgreener Dont hurt me pls
 
How long has it been going on anyway?
 
@KevinvanderVelden i haven't been watching it either but there was a match in which mexico beat germany 1-0 and a lot of people had a lot of strong emotions about it
 
i have now plumbed about 50% of my knowledge of the fifa sportball world cup
 
I know the dutchlands aren't in this years world cup
I mostly know this because the dutchlands aren't going insane over the sportsballs
 
2:21 PM
@genaray i never would :O
 
@doppelgreener Too late :c ... nah im honestly not that interessted in football either ^^
 
user92578
@genaray Thanks! I would answer "yes" and "no". You basically have to do all the marketing, Steam doesn't really help with that anymore. But I feel like that's the situation with all marketplaces, but as a plus for Steam I like their Steamworks features like Workshop and cloud saves etc.
 
user92578
also everyone should be watching sportsball
 
user92578
such great matches
 
I would love to, but in the UK you have to have a TV license. I do not have a TV or a TV license. :(
 
user92578
2:35 PM
no net-tv?
 
user92578
I watch the day matches on my second monitor and the night matches in the living room
 
any live broadcast needs a TV licence in the UK AFAIK
 
user92578
we used to have a TV license system here too but it was changed into tax
 
its a strange system and nobody likes it
it's also impossible to actually enforce
 
@Tyyppi_77 net TV needs a TV license
 
2:37 PM
but people pay it out of fear
they have no power to actually gather the evidence required to prove you are watching live TV without a licence
so the whole concept is flawed
 
@JamesTrotter but not without its perks! for example, for the low price of not having a TV license, you will have people occasionally knock on your door insisting they be allowed to come in to snoop around and make sure that you do, in fact, not have a TV that you are secretly watching TV on.
 
i think there's something you can do to stop those unsolicited visits
 
@Tyyppi_77 Australian TV is funded by common tax sources as well and I don't like the UK TV license idea. :/
 
I can't remember what though, I just remember it coming up in conversation some time ago
 
I haven't myself had one yet, but I am living in an apartment building with a couple of layers of locked doors.
 
2:40 PM
my favourite part about the whole attempting-to-enforce-the-clearly-unenforceable is the smear campaign the BBC used to run claiming they have super-sensitive high tech vans capable of detecting when someone is watching TV, with such a degree of information that they can pinpoint the location of the TV down to a room in a house and what channel they are watching
they've been claiming this since the '60s and if you ring up and ask they'll still say its the truth
you know, aside from the fact that the technology required doesn't exists and even if it did buying/maintaining it would probably cost as much revenue as the TV licence brings in
TV detector vans are vans, which, according to the BBC, contain equipment that can detect the presence of television sets in use. The vans are operated by contractors working for the BBC, to enforce the television licensing system in the UK, the Channel Islands and on the Isle of Man. == History == When television broadcasts in the UK were resumed after a break because of the Second World War, it was decided to introduce a tax called the television licence fee to finance the service. When first introduced on 1 June 1946, the licence covering the monochrome-only single-channel BBC televis...
emphasis on according to the BBC
 
2:55 PM
OK, so theres a line in this document that says "We compute the square of their module and store it into a new 1024 buffer"
I currently have a buffer of 1024 complex numbers... how do i compute the square of the module of a complex number?
i guess what i really need to find out is how to calculate the module...
 
user92578
I think the square of the module is just x^2 + y^2
 
so heres my complex.. are you just saying Imaginery^2 + Real^2?
 
user92578
yup
 
ok cool ill give that a go, thanks
 
user92578
module of a complex number represents the distance from origin
 
3:03 PM
 
user92578
we get that from our dear friend pythagoras
 
user92578
then the square of that just removes the root
 
makes sense
 
from mathworld.wolfram.com/ComplexModulus.html -- that equation is the modulus of the complex, so it looks like the square of the modulus is x^2 + y^2 like tyyppi says
since the square root gets cancelled out
 
yeah I came across that wolfram page
but I dont think my base level of math knowledge was enough to decipher it
lol
 
3:06 PM
yeah it was tough for me to read as well
 
i need a "signal processing for dummies" book
of course thats a thing that actually exists
is there nothing that series wont cover
 
Brilliant
 
user92578
complex numbers are just 2D points that are easy to rotate
 
3:30 PM
void OpenGLWidget::setCamControlStateOn()
{
camControlStateLabel.setText("On");
camControlStateLabel.setBackground(Qt::green);
}
//-----------------------------------------------------------------------------
void OpenGLWidget::setCamControlStateOff()
{
camControlStateLabel.setText("Off");
camControlStateLabel.setBackground(Qt::red);
}
arrg doesnt like it
 
user92578
struct CameraControlLabelState { std::string Text; Qt::Color Color; }
 
user92578
std::map<bool, CameraControlLabelState> CameraControlLabelStates;
 
user92578
void setCameraControlState(bool enabled) { CameraControlStateLabel.setText(CameraControlLabelStates.at(enabled).text); }
 
user92578
dunno, UI programming is a pain anyways
 
ups....dont like it...sorry for my bad english
 
3:40 PM
never gets old
the amount of times i accidentally mis-type shift and chuckle when I read back what actually wrote..
 
@Tyyppi_77 right, just when you only have to set flags which effects the rendering.
 
user92578
 
user92578
almo will kill me but whatever
 
4:01 PM
hmph.. this implementation still isn't working
its this part thats failing in my implementation... the result of the sum of the 32 "energy" values is so small that multiplying it by 32/1024 takes it to zero
so clearly something is going wrong
like all the energy values returned from FFT/squaring are so tiny its unreal
	Complex[] buffer = new Complex[sampleInspectWindowLength];
	provider.GetFftData(buffer);

	float[] frequencyAmplitudesBuffer = new float[sampleInspectWindowLength];
	for (var i = 0; i < sampleInspectWindowLength; i++)
	{
		var c = buffer[i];
		//compute the square of their module and store it into a new 1024 buffer
		frequencyAmplitudesBuffer[i] = (float) (Math.Pow(c.Real, 2) + Math.Pow(c.Imaginary, 2));
	}
how 2 format code
nvm too late
anyway, that block of horribly formatted code is returned values like 1.29327032E-06
 
maybe that's fine
why would multiplying that by 32/1024 take it to zero?
 
4:25 PM
[edits, formats]
 
hmm, good question since that should only be 4.04146975e-8, well above float.minvalue
god damnit
beginners mistake
i do subBandEnergy *= (subBandWidth / sampleInspectWindowLength);, subBandWidth being 32, sampleInspectWindowLength being 1024
both are ints so the result gets cast to int
so then it multiplies the subBandEnergy by 0
-_-
 
4:40 PM
\o/ I unlocked review queues!
On AI.SE
 
29c today
as a brit i disapprove
send help
 
@JamesTrotter Ahh.....
o/
@JamesTrotter This is 911 what is your emergency
 
5:38 PM
Hello fellow devs!
 
5:49 PM
greetings fellow human
 
How are things?
 
busy monday, but otherwise pretty good
 
I am watching Lord of the Rings. Also added in some sound to my game.
 
6:10 PM
+1 for special effects
 
i don't know Jackson did such a good job with the material on LotR and then fucked up the Hobbit movies so badly.
 
6:29 PM
It comes as hardly a surprise to me that a single book about a group of dwarves stealing a dragon's treasure, smaller than each tome of a epic-form trilogy, makes for a worse movie trilogy.
 
@Jimmy True
 
 
2 hours later…
8:05 PM
I'm watching SGDQ and I was wondering if anyone has tried to speedrun gunhero yet
 
8:21 PM
Is asking about game theoretic approaches to balancing classes in MMORPGs on topic here? I'm interested in theoretical approaches (i.e. not beta testing) to balancing classes.
 
dunno, feels like a rather open-ended question
but then again i don't really have any experience with it, so could be easier answered than i know
 
But the subject matter itself and intent of the question is okay?
 
8:52 PM
OpenAI Five: OpenAI writes about how their AI is kicking peoples' asses.
2
@KevinvanderVelden gunhero isn't on the schedule this year at least, alas :(
No presence on Speedrun.com or Speed Demos Archive but tbh there's only 522 PC games on SDA at all
 
 
2 hours later…
user92578
10:29 PM
given the linearity of the game it might not be a very fun game to speedrun
 
user92578
Mostly about jumping past enemies and learning the obstacle timings; On the other hand that's sort of how super meat boy is speedrun
 
user92578
Speedran?
 
10:45 PM
:D
I'd say you had it right the first time
 

« first day (2881 days earlier)      last day (2145 days later) »