• What Are You Working On? September 2015
    1,261 replies, posted
[QUOTE=Lumaio;48798099]Something about that font pleases me greatly[/QUOTE] [url]http://www.dafont.com/attack-of-the-cucumbers.font[/url] I applied a shadow to it. :v:
[QUOTE=false prophet;48798491][url]http://www.dafont.com/attack-of-the-cucumbers.font[/url] I applied a shadow to it. :v:[/QUOTE] As a certified pickle, I approve of that font name.
High level question: I have a list of objects, want to have a list of integers keeping track of their index, then sort the int array based on a parameter of that object (like sorting by their x position or something). How do in Java?
Today I added the ability for my level editor to bake shadow maps for each light into the map's save file, and successfully load them back into the scene when the map loads. Although each light can opt to render its own shadow in real time, I wanted the flexibility to only do it when I want it to and save it for later. Because who knows, maybe me or someone else would want a directional light with a 5k*5k shadow texture and not refill it 60 times a second. On a small map with a 256*256 shadow map the file size is only 1mb, but a 1024*1024 shadow map pushes it further to 16mb. Save times are good enough for now, but parsing in 1024*1024*4 integers goes pretty slowly, I'm going to have to devise a different function for loading it. After that, I aim to add some smoothing to the shadows and other techniques to reduce shadow acne, and then move right on to ambient occlusion.
What should I study for my interview tomorrow? Algorithms, data structures, etc.
[QUOTE=proboardslol;48799381]What should I study for my interview tomorrow? Algorithms, data structures, etc.[/QUOTE] Just as the interviewer seemed to be finishing up with his questions, he glanced at his notes and frowned. "Alright, one last question." "What's that?" "D... do you know Rant?" "Yeah, sure d-" "[I]YOU'RE HIRED, YOU GLORIOUS BEAST![/I]" he screeched suddenly, confetti bursting from his orifices.
[QUOTE=Berkin;48799597]he screeched suddenly, confetti bursting from his orifices.[/QUOTE] am I wrong in assuming you used rant to make this? :v:
[QUOTE=Lumaio;48799663]am I wrong in assuming you used rant to make this? :v:[/QUOTE] No Rant used. That's how I actually write.
Okay so lemme review fizzbuzz, in Java: [code] for(int i = 0; i < 100; i++){ if(!(i % 3)) System.out.println("Fizz "); if(!(i % 5)) System.out.println("Buzz "); if((i % 5) || (i % 3)) System.out.println(i); } [/code] and with my own mod function is: [code] int modulo(int n, int d){ return n - d * Math.floor(n/d); } [/code] and with a bitwise mod function is [code] int modulo(int n, int d){ return n % (d-1); } [/code] but this only works with powers of two right?
[IMG]http://i.imgur.com/rVQGbjf.gif[/IMG] going to add sliding and wall jumping next.
[QUOTE=DoctorSalt;48798945]High level question: I have a list of objects, want to have a list of integers keeping track of their index, then sort the int array based on a parameter of that object (like sorting by their x position or something). How do in Java?[/QUOTE] Normally you'd group them into pairs and then sort based on a comparer or value selector, but I'm unsure how Java handles it. In C# it's (roughly) [code]var indices = ( from pair in stuff.Select((x, i) => new KeyValuePair<int, dynamic>(i, x)) orderby pair.Value.YourParameter select pair.Key ).ToArray();[/code], and I think now that Java has (something like?) lambdas it shouldn't be terribly different if you don't care too much about the highest possible performance. Another option: [code]var indices = stuff.Select((x, i) => new KeyValuePair<dynamic, int>(x, i)).ToDictionary(kv => kv.Key, kv => kv.Value); // I'm surprised there's no .ToDictionary(...) overload that also takes the index into account. stuff.Sort(comparer); var result = stuff.Select(x => indices[x]).ToArray();[/code] I have no idea which is faster.
Still working on a rigidbody character controller with parkour controls for Unity. Things are working a lot better even though it may not be completely evident from the Webm. Been doing lots of fun Vector math for slope calculations recently. [vid]http://webm.host/42fa1/vid.webm[/vid]
Looks pretty good, although the gravity seems a little light or your player doesn't have a lot of mass.
So I got really annoyed at collision detection, researched quadtrees, got frustrated, researched grid based collision detection, got weirded out because I mispelled a word, then rewrote some stuff and now I have a chase camera that I can change on the fly. I also changed the way my animations are done, but only slightly. Also now my entities have trees for storing any children they have created. And I found a castlevania sprite to act as a placeholder because my artwork annoyed the crap out of me. :v: Also, another audio warning.. OBS is still recording spotify. [vid]http://anotherprophecy.com/webm/new1.webm[/vid]
[QUOTE=icantread49;48798347]Wait, what? They still teach that GridWorld crap? :v: .[/QUOTE] Having googled GridWorld yesterday, the wiki page said that it was being tested until 2014.
Eugh, somebody save me from C# class. We have to generate lotto numbers and do shit with them without arrays! :s:
[QUOTE=false prophet;48800606][...] And I found a castlevania sprite to act as a placeholder because my artwork annoyed the crap out of me. :v: [...][/QUOTE] The idle animation was cute though.
The while loop checks are so long it's gonna be spaghetti.
I just LOVE going through other people's old code! It's always so well written and makes a lot of sense! No crazy amount of iterators or unnecesarry amounts of loops! Never! [code] if(main.pdmls.Count > 0) { libraryList = new TreeViewItem[main.pdmls.Count]; int i = 0; ArrayList sortedA = new ArrayList(main.pdmls.Keys); sortedA.Sort(); foreach (string a in sortedA) { if(!(main.pdmls[a] as Hashtable).Contains("name")) { TreeViewItem[] library1 = new TreeViewItem[(main.pdmls[a] as Hashtable).Count]; int j = 0; Hashtable indexed_a = main.pdmls[a] as Hashtable; ArrayList sortedB = new ArrayList(indexed_a.Keys); sortedB.Sort(); foreach (string b in sortedB) { Hashtable indexed_ab = indexed_a[b] as Hashtable; if(!(indexed_ab.Contains("name"))) { TreeViewItem[] library2 = new TreeViewItem[indexed_ab.Count]; int k = 0; ArrayList sortedC = new ArrayList(indexed_ab.Keys); sortedC.Sort(); foreach( string c in sortedC) { library2[k] = new TreeViewItem(c, delegate() { main.setPDMLType(c); StartCoroutine(main.StartGhost("PDML"));}); k++; } library1[j] = new TreeViewItem(b + " >", library2, "button"); } else { library1[j] = new TreeViewItem(b, delegate() { main.setPDMLType(b); StartCoroutine(main.StartGhost("PDML"));}); } j++; } libraryList[i] = new TreeViewItem(a + " >", library1, "button"); } else { libraryList[i] = new TreeViewItem(a, delegate() {main.setPDMLType(a); StartCoroutine(main.StartGhost("PDML"));}); } i++; } amountOfEntities++; } [/code] Yes! Totally digging this internship right now!
[vid]http://files.facepunch.com/ziks/2015/October/01/2015-10-01-1341-04.mp4[/vid] Made a little dial thing for some tools to use
Has nobody noticed it's October
[QUOTE=TheEyes;48802094]Has nobody noticed it's October[/QUOTE] Have you noticed the forums being down?
I am still an advocate of going to 5000 posts. I like my computer keeping its sanity.
I'll get to work on the October thread today.
Berkin for Mod of Programming Also had my interview today. Nothing technical, and I think it went well. It really depends on what they have available in the company, but I'm just excited to hear from him on how the interview went. When should I email him back?
[QUOTE=krix;48802201]Have you noticed the forums being down?[/QUOTE] Oh hey, they're back!
[QUOTE=Darkwater124;48802268]Oh hey, they're back![/QUOTE] Forums seem to still be down for me
This creeped me out to no end. [IMG]https://dl.dropboxusercontent.com/u/27714141/Screenshot%20from%202015-10-01%2021%3A14%3A21.png[/IMG] Why do I get the feeling that it's trying to tell me something?
[QUOTE=Mattz333;48797334]Use bitmasking, ie first bit up, second right, third down, fourth left: 0000 means nothing 0001 means right 0101 means left to right 1100 means up and right[/QUOTE] I am doing this :). And then just cycle/rotate stuff.
[QUOTE=voodooattack;48802465]This creeped me out to no end. [IMG]https://dl.dropboxusercontent.com/u/27714141/Screenshot%20from%202015-10-01%2021%3A14%3A21.png[/IMG] Why do I get the feeling that it's trying to tell me something?[/QUOTE] [I]"Yooou should use spaaacess instead of taaaabssss...."[/I]
Sorry, you need to Log In to post a reply to this thread.