• What Are You Working On? - December 2014
    1,204 replies, posted
[QUOTE=Larikang;46759222]But that doesn't work either. You can easily end up planning [i]too much[/i], and when you start implementing it you realize that your design is impractical. Good programming is about finding the right balance between careful planning and figuring out things as you go.[/QUOTE] It's also worth mentioning that the code you write for yourself rarely has a set objective and a specification so it's impossible to structure your project so perfectly that anything you want to add later fits in. And adding stuff later is basically all you do anyways...
[B]Working on my inventory system.[/B] [video=youtube;SJbriLhbl10]http://www.youtube.com/watch?v=SJbriLhbl10&feature=player_detailpage[/video]
[QUOTE=sarge997;46759469]-stuff-[/QUOTE] Interesting item descriptions
[QUOTE=sarge997;46759469][B]Working on my inventory system.[/B] [video=youtube;SJbriLhbl10]http://www.youtube.com/watch?v=SJbriLhbl10&feature=player_detailpage[/video][/QUOTE] Man, what you are doing is something I've wanted to do for a LONG time. I'm just starting to learn Unity, and I was thinking of doing something like this but in 2D for that "lel INdie dezigner" feel. (that and the fact I can't do 3d stuff for shit lol) It's really cool watching this develop. Good on you! I've got a while to go yet before being as good and pretty much ANYONE in this thread, but I'm hoping it wont take TOO long. :)
After 10 weeks of literally the most amount of work i've ever had to do, its back to fun programming again (PS do not take an uneven module split between terms at uni) Anyway, hooray! I THINK this might be wavelet noise [IMG]https://dl.dropboxusercontent.com/u/9317774/wavelet.PNG[/IMG] Unfortunately the [url=https://en.wikipedia.org/wiki/Wavelet_noise]wikipedia[/url] page is hilarious, and the paper I'm referencing from is not exactly much better. This is so I can do the cool wavelet upscaling thing for a low resolution navier-stokes gpu simulation, hopefully to generate high frequency noise and simulate very high detail smoke with a very low level of computation
I made a cute little program to fix steam's annoying size 16 chat font they changed to a while back: Quicker then your mom and dirtier then a $1 hooker.. but it works! [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace SteamFix { class Program { static void Main(string[] args) { string dir = "C:\\Program Files (x86)\\Steam\\resource\\styles\\steam.styles"; try { string text = File.ReadAllText(dir); text = text.Replace("font-size=16", "font-size=14"); File.WriteAllText(dir, text); Console.WriteLine("Fonts Fixed! :D"); } catch (FileNotFoundException e) { Console.WriteLine(e.Message); throw; } Console.ReadLine(); } } } [/code]
Not to diminish your hard work. But you could have achieved that a lot faster with the replace feature in just about any text editor.
[QUOTE=reevezy67;46760592]Not to diminish your hard work. But you could have achieved that a lot faster with the replace feature in just about any text editor.[/QUOTE] There's a charm in over-engineering things for fun tho.
Even more assets for the little runnerXborderlandsXcrashbandicoot game, this are the characters in the release version. If things go well we will do more, but for an initial version it should be enough to test the water. [img]http://i.imgur.com/A2IVRCR.png[/img] Next time it's going to be gameplay content!
[QUOTE=Sidneys1;46759176]A video would be cool, I want to see this in action :D[/QUOTE] Sure, there you go. [video=youtube;I_kNGB4DkqE]http://www.youtube.com/watch?v=I_kNGB4DkqE[/video]
On the topic of terrible indentation: [url]https://github.com/Eddlm/TheHunt/blob/master/gamemodes/thehunt/gamemode/init.lua[/url] :suicide: [editline]20th December 2014[/editline] Like seriously what the fuck is this shit [code]if GetConVarString("h_default_loadout") == "" then else print("[The Hunt]: Loaded "..GetConVarString("h_default_loadout").." for the players at start.") local sentence = ""..GetConVarString("h_default_loadout").."" local words = string.Explode(", ", sentence) table.foreach(words, function(key, value) table.insert(STARTING_LOADOUT, value) end) end[/code]
I spent a couple of hours making the necessary improvements to associative carriers so that gender-neutral names would match with either pronoun. I rewrote the algorithm three times, but couldn't get it to work. I finally gave up trying to plot out the logic mentally and drew it on a whiteboard: [t]http://i.imgur.com/DpjSazL.jpg[/t] After pausing to cackle wickedly, the above mess was magically transformed into this: [code]public static bool AssociatesWith(this RantDictionaryEntry a, RantDictionaryEntry b) { bool aNoneRequired = !a.GetRequiredClasses().Any(); bool bNoneRequired = !b.GetRequiredClasses().Any(); if (aNoneRequired && bNoneRequired) return true; // If both have no required classes, pass. // One or both have required classes. // Remove B optionals from A required. var aRequired = a.GetRequiredClasses().Except(b.GetOptionalClasses()); // Remove A optionals from B required. var bRequired = b.GetRequiredClasses().Except(a.GetOptionalClasses()); // Both should be either empty, or have exactly the same classes. return !aRequired.Except(bRequired).Any() && aRequired.Any() == bRequired.Any(); }[/code] [B][URL="http://berkin.me/rantbox#FED672206A947B7C9D497D05CDB6EE273C7B22AA"]And it works![/URL][/B]
[QUOTE=Berkin;46761764][B][URL="http://berkin.me/rantbox#FED672206A947B7C9D497D05CDB6EE273C7B22AA"]And it works![/URL][/B][/QUOTE] [img]http://i.imgur.com/ztpw55n.png[/img]?
[QUOTE=DaMastez;46761955][img]http://i.imgur.com/ztpw55n.png[/img]?[/QUOTE] You found an edge case where "Jessie" contains the optional class "female?", which can be fixed by specifying a class filter on the pronoun. Something I need to fix. But the majority of names will provide a correct output.
[QUOTE=HiredK;46761270]Sure, there you go. [video=youtube;I_kNGB4DkqE]http://www.youtube.com/watch?v=I_kNGB4DkqE[/video][/QUOTE] Does it have collisions? [editline]21st December 2014[/editline] [QUOTE=Berkin;46761974]You found an edge case where "Jessie" contains the optional class "female?", which can be fixed by specifying a class filter on the pronoun. Something I need to fix. But the majority of names will provide a correct output.[/QUOTE] Does it stay consistent? [editline]edit[/editline] [URL="http://berkin.me/rantbox#5DDA90D90CC967252089B0EA432A506FA559EB31"]It seems so[/URL], nice!
A small python 2 script to auto accept Dota 2 in linux: [vid]http://webmup.com/EHbPr/[/vid] dota_auto_accept.py: [CODE]import glib import dbus from dbus.mainloop.glib import DBusGMainLoop import subprocess messagelist = [] def notifications(bus, message): messagelist = [arg for arg in message.get_args_list()] #print messagelist if dbus.String(u'Your game is ready') in messagelist: subprocess.call(["./dota_autoacc.sh"]) DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.add_match_string_non_blocking("eavesdrop=true, interface='org.freedesktop.Notifications', member='Notify'") bus.add_message_filter(notifications) mainloop = glib.MainLoop() print 'Dota 2 Auto Accepter armed' mainloop.run() [/CODE] dota_autoacc.sh: [CODE]#!/bin/sh xdotool search --name 'Dota 2' windowactivate --sync xdotool search --name 'Dota 2' windowactivate --sync xdotool search --name 'Dota 2' windowactivate --sync sleep 0.1s xdotool mousemove 467 291 sleep 0.1s xdotool click 1 sleep 0.1s xdotool mousemove 770 492 sleep 0.1s xdotool click 1 sleep 0.1s xdotool type 'Auto-accepted by Dota 2 Auto Accepter - Abaddon Technologies' sleep 0.1s xdotool key Return sleep 0.1s [/CODE] Make sure to have python subprocess module installed before using this
me debugging segmentation faults: [code] #define FUCK() printf("FUCK: %d\n", __LINE__); [/code] example: [img]http://i.imgur.com/KWvqC1R.png[/img]
[QUOTE=reevezy67;46760592]Not to diminish your hard work. But you could have achieved that a lot faster with the replace feature in just about any text editor.[/QUOTE] Yes, but now I only need to press a button on my desktop ;) Originally I was planning to have it only change the specific size 16 fonts that mattered.
[thumb]http://files.1337upload.net/Screen_Shot_2014-12-21_at_18.24.49-f8b5c2.png[/thumb] okay the font texture atlas now grows when needed the growing algorithm kind of sucks since this is what you would get if you originally specified that above size [thumb]http://files.1337upload.net/Screen_Shot_2014-12-21_at_18.28.39-4df0ca.png[/thumb] but whatever it's good enough for now unless you add too many glyphs [thumb]http://files.1337upload.net/Screen_Shot_2014-12-21_at_18.35.26-61fb53.png[/thumb]
[QUOTE=Tamschi;46762265]Does it have collisions?[/QUOTE] Not yet, but it's definitely on the todo list.
If you guys had to store data of a simulation with several million to billion data points (3d vectors), what format would you use?
[video=youtube;DVl6uhtxE_s]http://www.youtube.com/watch?v=DVl6uhtxE_s[/video][code][ComponentLink] Speed Speed { get; set; } [Script(ScriptStage.Actuators)] async Task Dampen(Context context) { while (true) { await context.Wait(.5f); //BUG: This formula isn't quite correct. Speed.Add(-await context.WaitFrame() * _strength * Speed.Value); } }[/code]
I was not expecting to watch a video of integers dancing to Christmas music today.
[QUOTE=DrDevil;46765297]If you guys had to store data of a simulation with several million to billion data points (3d vectors), what format would you use?[/QUOTE] Just a flat array with documented endianness. If you expect repetitions stream it through a compression algorithm. At least that's the most convenient way to get reasonable storage. If the data is compressible you can likely find a better way to do it (but it would be a lot more complicated to set up). If the data is composed of multiple frames of varying size I'd prefix it with an index so whoever reads it can skip around. (You could also append it, but I'd only do that if you have absolutely no way of knowing how much space you'll need before processing the points.) If it's just one huge point cloud but the user may want to examine certain parts I'd sort them into an adaptive tree structure and put that index at the front of the file, after a pointer to the data. If you do it like this, a "dumb" program can still trivially open it and save it as single tree node if you don't want to bother sorting them. (There are likely one or two possible tweaks that would make the format better than just the very plain specification, for example if you require a specific maximum amount per tree node the index alone would give you some rough density data. Choosing the right number most likely depends on the tree though. You'd also need to decide whether to work with an initial bounding box or expand the tree upwards as you find points outside its reach. The former may require scanning through all points once before you can start sorting them.)
[QUOTE=DrDevil;46765297]If you guys had to store data of a simulation with several million to billion data points (3d vectors), what format would you use?[/QUOTE] It depends a lot on the use case, the data itself sometimes it's not the most important thing, it could be more important what you do with it, are you going to search the existence of specific points? are you going to load a range of points? are you going to load all points? are going to do analysis over the points? is ACID important? is there more to it or is it a simple list of vectors? it's more important writing or reading speed?
[QUOTE=Hentie;46763571]me debugging segmentation faults: [code] #define FUCK() printf("FUCK: %d\n", __LINE__); [/code] example: [img]http://i.imgur.com/KWvqC1R.png[/img][/QUOTE] have you tried valgrind? [editline]21st December 2014[/editline] Also, the weirdest thing happened. I can't scroll in my VM. I don't know why, it's really weird. Of all the things that could possibly go wrong...
[img]http://i.imgur.com/6kSJuvW.png[/img] [thumb]http://i.imgur.com/npDhnch.png[/thumb] Working on glua dynamic bindings for my GSharp module proof of concept (pure C# module for GMod) Currently it can convert arrays, dictionaries, functions, numbers, string and so on between lua and .NET and it can convert delegates to lua C functions.
[QUOTE=AntonioR;46756765]I uploaded a video showing five scenes with 2D ragdoll physics and some other fun stuff that can be made using Box2D and my editor. [media]http://www.youtube.com/watch?v=RCBEOd0Frp0[/media] - skeleton flipping/scaling, joint limits - custom gravity for maps, mouse joint - skeleton animation to ragdoll transition - player controlled vehicles (event-action) - removing bodies and joints in realtime - railgun - adding joints in realtime - stakegun You can download it if you want. There are some rendering glitches, that luckily aren't appearing in the video. There are always some problems when I want to share something :( [url]http://antonior-software.blogspot.com/2014/12/broken-mug-engine-2d-ragdoll-physics.html[/url][/QUOTE] I thought garrys said he would never release facewounds source?
[url]https://dl.dropboxusercontent.com/u/128114072/Scroll/scroll.html[/url] You guys are constantly complaining about GIFs, so I invented the clearly superior format. Animating a PNG by scrolling to the right frame.
[QUOTE=Quiet;46766731][url]https://dl.dropboxusercontent.com/u/128114072/Scroll/scroll.html[/url] You guys are constantly complaining about GIFs, so I invented the clearly superior format. Animating a PNG by scrolling to the right frame.[/QUOTE] But its three times larger than the gif, did you learn nothing?
Sorry, you need to Log In to post a reply to this thread.