• What Are You Working On? September 2015
    1,261 replies, posted
[QUOTE=Berkin;48653805]The project is still going, but you must understand that there are many, many aspects to it that are whole projects in themselves. The TTS engine I am working on is for that game. I am doing virtually all the work on all these things right now, so progress can only go so quickly. [editline]10th September 2015[/editline] And I'm stuck on making a realistic-sounding glottal pulse train. That's going to take a while.[/QUOTE] Ah, I didn't realize it was for that. Makes sense!
[QUOTE=Killowatt;48649910]What color theme is that?[/QUOTE] Uh, I forget where I got it, but I don't think there's a name for it. Here's the template though I think I might have just generated it myself in some online webapp [img]http://i.imgur.com/xUUfB75.png[/img]
[QUOTE=Rocket;48653956]I am honor bound to defend my liege: [img]http://i.imgur.com/2LnrRL1.png[/img][/QUOTE] I wonder if there is a programming language with no errors at all. Like, even if you get the syntax wrong it won't error it just silently fails and continues running.
In other news: [url]https://www.reddit.com/r/programming/comments/3ke7ug/eye_tracking_software_for_sufferers_of_alsmnd_can/[/url]
[QUOTE=foszor;48654078]I wonder if there is a programming language with no errors at all. Like, even if you get the syntax wrong it won't error it just silently fails and continues running.[/QUOTE] You mean like LaTeX? :v: It does some kind of half-arsed attempt at correcting it if you get something wrong, it's.. not great :v:
LaTeX is markup, not programming. By that logic, HTML would apply as well
[QUOTE=proboardslol;48654101]LaTeX is markup, not programming. By that logic, HTML would apply as well[/QUOTE] That's really not quite right, you could write actual programs in LaTeX, no sane soul would want to, but it's entirely possible. LaTeX is more of a markup language which accidentally became turing complete in the process of doing what it needed to do. It has conditionals, loops and recursion. While the code turns out quite horrific, it's not like HTML in the sense that it's "just markup". [url]https://gitlab.brokenpipe.de/stettberger/avremu/tree/master#README[/url] [url]https://gitlab.brokenpipe.de/stettberger/avremu/blob/master/tex/latex/avremu/avr.binary.tex[/url]
Huh I didn't know that! I always just used latex to make my physics lab reports look fancy
[QUOTE=foszor;48654078]I wonder if there is a programming language with no errors at all. Like, even if you get the syntax wrong it won't error it just silently fails and continues running.[/QUOTE] PHP?
[QUOTE=proboardslol;48654187]Huh I didn't know that! I always just used latex to make my physics lab reports look fancy[/QUOTE] Indeed, it's awesome for what it does, but never look inside. Looking at the sourcecode of the thing is likely to give you cardiac arrest, jesus christ :scream: Some things we are better off not knowing :v:
[QUOTE=Ac!dL3ak;48654209]PHP?[/QUOTE] PHP won't continue running but you have to specifically ask for errors
I spent a few hours last night and this morning trying to figure out why my point lights were "skewing" or were offset on a surface relative to the lights position, because it resembled an old bug I had before when first implementing deferred shading. It turns out it was just normal maps doing its job and moving the light around according to the surface normal :v: Anyways, it lead to me realizing that I improperly made some of my normal's a while back for my test/dev textures, so I decided to make some new ones and see how they looked when pushed to the [B]extreme[/B] end: No normal VS old normal VS new normal [t]http://i.imgur.com/ssnvxq1.png[/t] [t]http://i.imgur.com/6PbhtWD.png[/t] [t]http://i.imgur.com/8VvhINs.png[/t] And now, I hit one of my worst problems, having to make a decision! I realized that I made a typo in my lighting code a little while ago, one which isn't present in any of my older shaders or any tutorials that I followed in the past. However, I think it makes my lighting look more rich, colorful, and vibrant compared to the older model. The only downside is that it can't get much brighter, where as conversely using the older light achieves much brighter scenes but also illuminates surfaces that aren't facing the light. :snip: I forgot about the lights' intensity multiplier, I've fixed the lights and can now get both looks from the same code. [t]http://i.imgur.com/2XgnGmH.png[/t]
I released my little sat images downloader and sticher: [url]https://github.com/AJ92/TileDownloader/releases/tag/v0.01[/url] [IMG]http://3devs.bplaced.net/wp-content/uploads/2015/09/tiledownloader.jpg[/IMG] [QUOTE][IMG]http://3devs.bplaced.net/wp-content/uploads/2015/08/F-1-1.jpg[/IMG] [IMG]http://3devs.bplaced.net/wp-content/uploads/2015/08/satmap.jpg[/IMG][/QUOTE]
[img]http://i.imgur.com/mdZAp6Z.png[/img] added sounds, announcers (the ones from unreal tournament for now), killtext. also demonstrating a bug where it parses players as objects for some reason :v:
[QUOTE=war_man333;48654704]added sounds, announcers (the ones from unreal tournament for now), killtext. also demonstrating a bug where it parses players as objects for some reason :v:[/QUOTE] Looking pretty fun. Sorta reminds me of a multiplayer Super Meat Boy.
Seeing the stuff you guys are making blows my mind. The most I can do is std::cout!
[QUOTE=sarge997;48654811]Looking pretty fun. Sorta reminds me of a multiplayer Super Meat Boy.[/QUOTE] It's definitely an inspiration. See it as a mix between Super Meat Boy and Unreal Tournament.
[QUOTE=Rocket;48653956]I am honor bound to defend my liege: [img]http://i.imgur.com/2LnrRL1.png[/img][/QUOTE] I was thinking more along the lines of [img]http://i.imgur.com/umHXoqX.png[/img] Sure, you'll get an error when you actually try to evaluate it, but...
Alright, Skybox, highlights, and an ambient lighting pass are all in again. [t]http://i.imgur.com/4Nkwy7P.png[/t] Next up, fixing the point light boundary being before its falloff, and then fixing that weird spotlight issue that still persists. [editline]10th September 2015[/editline] I fixed my stupid cone problem for spot lights. It turns out I somehow fucked up the cone generator, where it essentially wrapped over itself like 6 times, but it didn't finish the last loop, so the whole thing had weird thick patches of light where there was less triangles. (video may seem choppy, but that's just me switching between rotating knobs to typing in absolute values and changing other properties by hand) [vid]https://my.mixtape.moe/gkzklc.mp4[/vid] Anyways, one last bug to fix one last bug, and then either attempt new things or try my hand at shadow mapping again.
[url=http://www.twitch.tv/drluke4]Printer is up and running again![/url] I printed slightly larger feed-wheels to better fit the hole-spacing, and also made the spokes a tiny little bit longer so they grip the holes better. I also got a new 3d-printed part that holds down the paper right next to the printing area. Kermit by Ott: [t]https://d.maxfile.ro/opckduswar.jpg[/t]
-snip- seems like people on FP are too sensitive for a transgender joke.
I'm finally finished porting over all my stuff to my deferred shading system! Took me 7 days too! I tested the scene with a shit load of things in it, but before I even added any lights to the scene I noticed I was at 20 fps, because I've never implemented any vertex array objects yet. However, even with that, I added 2 ambient lights, 2 directional lights, 6 point lights, and 2 spot lights, and none of them dropped my fps a single point. So the real question is this, what do I implement next? [t]https://facepunch.com/fp/ratings/zing.png[/t]Shadow maps [t]https://facepunch.com/fp/ratings/rainbow.png[/t]Cubemap reflections (gonna wing it I think) [t]https://facepunch.com/fp/ratings/wrench.png[/t]Vertex array objects aka model instancing Shadow maps will lead me down a path of creating and using multiple types of shadows, after completion. Cubemap reflections will require me to revise my texture management system to take in defined properties, such as reflect-ability. Will look cool though. Vertex array objects will require me to make a system for managing object loading to limit single copies of identical objects into VRAM, improves performance but is more complex
[QUOTE=Cinnamonbun;48656673]-snip- seems like people on FP are too sensitive for a transgender joke.[/QUOTE] I just remembered why I had you on the ignore list.
Sorry for no content but does anybody here have experience with rendering 3d models in html canvas? Something like three.js or your own creation? (just not unity)
So you have a game with the following object representing it. [code] var o = { world: { players: [ { name: "Steve", data: { pos: [0, 1] } }, { name: "Dave", data: { pos: [1, 2] } }, { name: "Bob", data: { pos: [2, 3] } }, { name: "Hank", data: { pos: [3, 4] } } ] } }[/code] For some reason, what you want to do is shuffle around all the individual coordinates of the players among them. You have a shuffle function that knows nothing about your players, it just looks like this [code]function shuffle(arr) { var res: T[] = arr.slice(); for (var i = res.length - 1; i >= 0; --i) { const rand = Math.floor(Math.random() * i); const temp = res[rand]; res[rand] = res[i]; res[i] = temp; } return res; }[/code] (you also have a flatten function that JS lacks, it's signature is T[][] -> T[]) How do you do it? Getting an array out of your structure is easy. [code] var arr = flatten(o .world .players .map(obj => obj.data) .map(obj => obj.pos))[/code] But what now? You can give that array to your shuffle function, but how do you then put the numbers back into your structure? The problem here is that these array transformations are all one directional. But what if they weren't? I wrote a small library for composable setters. With it you can write this [code] var newObj = Set.setter(o) .prop(obj => obj.world, "world") //Get the world property .prop(obj => obj.players, "players") //Get the players property (array) .all(obj => obj.data, "data") //Get the data property of all of the elements in the array .all(obj => obj.pos, "pos") //Get the pos property of all of the elements in the array .concat() //Flatten the array .modify(shuffle); //Apply a modifying function console.log(JSON.stringify(newObj, null, 4)); //Print the resulting structure[/code] And the result looks like [code]{ "world": { "players": [ { "name": "Steve", "data": { "pos": [ 1, 1 ] } }, { "name": "Dave", "data": { "pos": [ 3, 3 ] } }, { "name": "Bob", "data": { "pos": [ 4, 2 ] } }, { "name": "Hank", "data": { "pos": [ 2, 0 ] } } ] } }[/code] Neat! This is all in TypeScript and it's all type safe (except for the fact that you need to provide the property name as a string). It won't let you get properties that don't exist on the current object and it won't let you call 'all' when what you currently have isn't an array. I'll implement the same thing in C# and then release it. Should be simpler to do there using extension methods. In TS I have now way of exposing different functions based on what the generic parameter is so it's very hacky. On the other hand, I doubt all the various IEnumerables in C# will play nice. We'll see.
[QUOTE=Darwin226;48658575][...] I'll implement the same thing in C# and then release it. Should be simpler to do there using extension methods. In TS I have now way of exposing different functions based on what the generic parameter is so it's very hacky. On the other hand, I doubt all the various IEnumerables in C# will play nice. We'll see.[/QUOTE] They won't, considering they don't expose anything but the values. (You could probably reflect the information out of them, but that's outside the specification. It's better to provide an alternative set of functions instead.) You can create overloads that provide shorthands for e.g. [I]Tuple<Func<TValue>, Action<TValue>>[/I] getter-setter pairs (or use a custom type, since [I]Tuple<...>[/I] is a class and would produce quite a bit of garbage) and let the original methods do the heavy lifting though. (Some) C# lambdas implicitly convert to [I]Expression[/I]s, which make it much easier to grab the relevant getters and/or setters from a single parameter. You could write [code]world.players .SelectGetSet(player => player.data) .SelectGetSet(data => data.pos)[/code] that way with two overloads (or just [code]world.players .SelectGetSet(player => player.data.pos)[/code] if you support more complex [I]Expression[/I]s). It's not [I]quite[/I] statically safe since there's no way to limit the expression to a certain internal form afaik. It's possible that there are implicit casts to the limited cases derived from [I]Expression[/I] but I doubt it. If you call the method [I].Select[/I] then it should work with LINQ comprehension syntax, though it would cause an overload resolution error for the first step if normal [I]System.Linq[/I] is used too. You should be able to provide it for the modified queries without conflict though. (It would be good to also provide a [I].SelectGetSet<TSource, TField>(Func<TSource, TField> getter, Func<TSource, Action<TField>> setter)[/I] overload for systems that don't support dynamically compiled code. The calling syntax for that is just [I].SelectGetSet(x => x.y, x => y => x.y = y)[/I]. If you used an [I]Action<TSource, TField> setter[/I] the calling syntax for just that would be [I](x, y) => x.y = y[/I] and have to have an additional layer of indirection internally.)
[QUOTE=Tamschi;48659036]They won't, considering they don't expose anything but the values. (You could probably reflect the information out of them, but that's outside the specification. It's better to provide an alternative set of functions instead.) You can create overloads that provide shorthands for e.g. [I]Tuple<Func<TValue>, Action<TValue>>[/I] getter-setter pairs (or use a custom type, since [I]Tuple<...>[/I] is a class and would produce quite a bit of garbage) and let the original methods do the heavy lifting though. (Some) C# lambdas implicitly convert to [I]Expression[/I]s, which make it much easier to grab the relevant getters and/or setters from a single parameter. You could write [code]world.players .SelectGetSet(player => player.data) .SelectGetSet(data => data.pos)[/code] that way with two overloads (or just [code]world.players .SelectGetSet(player => player.data.pos)[/code] if you support more complex [I]Expression[/I]s). It's not [I]quite[/I] statically safe since there's no way to limit the expression to a certain internal form afaik. It's possible that there are implicit casts to the limited cases derived from [I]Expression[/I] but I doubt it. If you call the method [I].Select[/I] then it should work with LINQ comprehension syntax, though it would cause an overload resolution error for the first step if normal [I]System.Linq[/I] is used too. You should be able to provide it for the modified queries without conflict though. (It would be good to also provide a [I].SelectGetSet<TSource, TField>(Func<TSource, TField> getter, Func<TSource, Action<TField>> setter)[/I] overload for systems that don't support dynamically compiled code. The calling syntax for that is just [I].SelectGetSet(x => x.y, x => y => x.y = y)[/I]. If you used an [I]Action<TSource, TField> setter[/I] the calling syntax for just that would be [I](x, y) => x.y = y[/I] and have to have an additional layer of indirection internally.)[/QUOTE] I'll see about using reflection to get the property names. That sounds like it will probably work fine. I do already provide the SelectGetSet combinator!
[QUOTE=Darwin226;48659151]I'll see about using reflection to get the property names. That sounds like it will probably work fine. I do already provide the SelectGetSet combinator![/QUOTE] [I]System.Reflection.Emit[/I] isn't necessarily a core API, so there are quite a few places that don't support it. (Most notably Unity, unless that recently changed.) If you don't compile the getters and setters the resulting query will run very slowly due to the amount of type checking and dynamic casts involved.
How have I not known about this? [IMG]http://i.imgur.com/6mwSoqK.png?1[/IMG] F7
[QUOTE=Rocket;48656936]Protip: if you edit your dumb post with a dumb message, it does not make it better.[/QUOTE] Whatd he say
Sorry, you need to Log In to post a reply to this thread.