• What are you working on? v67 - March 2017
    3,527 replies, posted
[QUOTE=Icedshot;52686450]Everything I've ever read about the AAA games industry (I'm assuming this is one) has suggested that its a rather poor place to work - you get worked to the bone for not enough pay, with management making constantly boneheaded decisions, on a game that you only have very limited creative control over IMO the AAA industry will be killed by indie studios eventually, not because indie games are more profitable or easy to make, but simply because the AAA industry treats its staff so incredibly badly. I think I've read double digit stories of 'we used to work at massive company x which sucked then we formed an indie studio which was awesome by the way here's an incredibly inventive game we just made'[/QUOTE] I just spent like half an hour trying to type up a nuanced argument why I'd be sad if AAA would die completely, including an attempt starting with "I just spent like 15 minutes trying to type up a nuanced argument..." and it didn't really work out so here's a very opinionated statement instead: I'd be sad if AAA would die completely HOWEVER I think I like the trend of smaller studios with AAA values popping up atm (like Boss Key). This is very biased because I probably enjoy game tech more than I enjoy actually playing the games so I'm not that much a fan of pushing innovation in gameplay over pushing innovation in tech (unpopular opinion, I know), but that doesn't necessarily conflict with what you've said I guess so yeah make of that whatever you want.
[QUOTE=war_man333;52686420]I work at a relatively big consultancy company (400 people) but interviewed at a rather well-known game recently. I feel like the job description sounds awesome and just for me, but I got the impression that either the other devs didn't like me or their own job during the interview. To me they sounded annoyed and depressed. So after the interview I was feeling quite confused on how to proceed. There is gonna be another interview if all goes well. But I'm wondering, is it a normal thing that employees in game companies are just sort of depressed? My problem with my current job is that there aren't enough interesting projects. I'll soon be doing some VR stuff which is awesome but I don't know how long before they say 'actually we can't do this anymore. But hey we got some ASP.NET you can take care of?'[/QUOTE] Depends on what stage of the project you're in, being in the final stages is legit depressing for programmers. At least when you're working on a console game. Most of the time you're the only group still working on the game fixing weird issues that come back from Sony or Microsoft certification, while management is already making mistakes in planning in time for the next project. Start of the project and through the middle it's usually fine.
[QUOTE=JWki;52686526]I just spent like half an hour trying to type up a nuanced argument why I'd be sad if AAA would die completely, including an attempt starting with "I just spent like 15 minutes trying to type up a nuanced argument..." and it didn't really work out so here's a very opinionated statement instead: I'd be sad if AAA would die completely HOWEVER I think I like the trend of smaller studios with AAA values popping up atm (like Boss Key). This is very biased because I probably enjoy game tech more than I enjoy actually playing the games so I'm not that much a fan of pushing innovation in gameplay over pushing innovation in tech (unpopular opinion, I know), but that doesn't necessarily conflict with what you've said I guess so yeah make of that whatever you want.[/QUOTE] I don't wish that AAA would die, but I really think it will, and itll be entirely the industries own fault There's a lot of interesting tech coming out of indie studios these days - I'm personally glad that we've moved past *lighting* and realism as the end goal of graphics, and people are focusing more on physics/interactivity slightly more, as well as having an actual art style. EG look at astroneer - really beautiful game right there, really well put together Edit: I've been working on making the controls to my game much more fluid, as well as making the transition into systems/battles as seamless as possible [media]https://www.youtube.com/watch?v=-zvvTl0-QH4[/media] Smooth scrolling turned out to be surprisingly hard to implement. But on the plus side, you can now go battle -> system -> universe very fluidly, and entering a system is significantly less rigid than it was before (instead of being a fixed snap into its now completely freeform, and multiple systems can render at once) There's currently no way to go from a system -> battle seamlessly, as battles have no visible UI object in a system - so it'd be very confusing. I will also likely disable seamless battles -> system transitions as honestly its just annoying scrolling too far out and then leaving the battle by mistake
Purchased a Kobo e-Reader and started screwing around with e-Books, not realising it would track my progress. Wanted to reset them, could not find an easier way so I decided I'm going to make a simple toolkit to interact with the device through it's SQLite database and configuration files... Here's the configuration parser working! [IMG]https://image.prntscr.com/image/hCnOVDNcT4eUub3aphD6lg.png[/IMG] Don't mind the Stephen King stuff.
[QUOTE=Comfort Jones;52682672][video=youtube;bgfB1fdwG4Q]https://www.youtube.com/watch?v=bgfB1fdwG4Q&feature=youtu.be[/video] Currently working as the ai lead on a remake of Condition Zero: Deleted Scenes. The models are just silly placeholders. If anyone here is working on a promising source engine project and need some ai work please do hit me up.[/QUOTE] Better than SMOD Tactical :D
I just got a $200 gamedev course off Udemy for $10. I'm hoping to buff up my C# skills and knowledge of object orientated programming. Should be fun, and when I complete it I get a lil' certificate that says I did just that.
[QUOTE=sarge997;52688677]I just got a $200 gamedev course off Udemy for $10. I'm hoping to buff up my C# skills and knowledge of object orientated programming. Should be fun, and when I complete it I get a lil' certificate that says I did just that.[/QUOTE] How'd you get it for such a low price?
Decided to gently ease myself into hackmud. I don't want to get obsessed with that game again because its literally crack to me, but I've been tinkering with the RNG generator just as a small break from spacegame. I'd like to find a more direct solution that I can either port to JS (for an ingame crack), or a crack that I can run outside of Z3 Obviously cracking an rng isn't easy, but the current goal is to try and reduce the search space enough so that I can brute force the rest of it To this end I've started building some bit equation generators for xorshift128+ so that I can have a look and see what on earth I get. Successfully reducing these equations with known state should drastically reduce the available search space This is the basic xorshift128+ bit equations, where s0 represents the state 0, s1 is state1, b's represent the bits involved, and a ? means the state of that bit is unknown (because I haven't supplied it) Here I set state 0, but not state 1 [cpp]((((s0b63^(s0b40 << 23))^s0b63)^s1b63?)^s1b63) ((((s0b62^(s0b39 << 23))^s0b62)^s1b62?)^s1b62) ((((s0b61^(s0b38 << 23))^s0b61)^s1b61?)^s1b61) ((((s0b60^(s0b37 << 23))^s0b60)^s1b60?)^s1b60) ((((s0b59^(s0b36 << 23))^s0b59)^s1b59?)^s1b59) ((((s0b58^(s0b35 << 23))^s0b58)^s1b58?)^s1b58) ((((s0b57^(s0b34 << 23))^s0b57)^s1b57?)^s1b57) ((((s0b56^(s0b33 << 23))^s0b56)^s1b56?)^s1b56) ((((s0b55^(s0b32 << 23))^s0b55)^s1b55?)^s1b55) ((((s0b54^(s0b31 << 23))^s0b54)^s1b54?)^s1b54) ((((s0b53^(s0b30 << 23))^s0b53)^s1b53?)^s1b53) ((((s0b52^(s0b29 << 23))^s0b52)^s1b52?)^s1b52) ((((s0b51^(s0b28 << 23))^s0b51)^s1b51?)^s1b51) ((((s0b50^(s0b27 << 23))^s0b50)^s1b50?)^s1b50) ((((s0b49^(s0b26 << 23))^s0b49)^s1b49?)^s1b49) ((((s0b48^(s0b25 << 23))^s0b48)^s1b48?)^s1b48) ((((s0b47^(s0b24 << 23))^s0b47)^s1b47?)^s1b47) ((((s0b46^(s0b23 << 23))^((s0b63^(s0b40 << 23)) >> 17))^s1b46?)^s1b46) ((((s0b45^(s0b22 << 23))^((s0b62^(s0b39 << 23)) >> 17))^s1b45?)^s1b45) ((((s0b44^(s0b21 << 23))^((s0b61^(s0b38 << 23)) >> 17))^s1b44?)^s1b44) ((((s0b43^(s0b20 << 23))^((s0b60^(s0b37 << 23)) >> 17))^s1b43?)^s1b43) ((((s0b42^(s0b19 << 23))^((s0b59^(s0b36 << 23)) >> 17))^s1b42?)^s1b42) ((((s0b41^(s0b18 << 23))^((s0b58^(s0b35 << 23)) >> 17))^s1b41?)^s1b41) ((((s0b40^(s0b17 << 23))^((s0b57^(s0b34 << 23)) >> 17))^s1b40?)^s1b40) ((((s0b39^(s0b16 << 23))^((s0b56^(s0b33 << 23)) >> 17))^s1b39?)^s1b39) ((((s0b38^(s0b15 << 23))^((s0b55^(s0b32 << 23)) >> 17))^s1b38?)^s1b38) ((((s0b37^(s0b14 << 23))^((s0b54^(s0b31 << 23)) >> 17))^s1b37?)^(s1b63? >> 26)) ((((s0b36^(s0b13 << 23))^((s0b53^(s0b30 << 23)) >> 17))^s1b36?)^(s1b62? >> 26)) ((((s0b35^(s0b12 << 23))^((s0b52^(s0b29 << 23)) >> 17))^s1b35?)^(s1b61? >> 26)) ((((s0b34^(s0b11 << 23))^((s0b51^(s0b28 << 23)) >> 17))^s1b34?)^(s1b60? >> 26)) ((((s0b33^(s0b10 << 23))^((s0b50^(s0b27 << 23)) >> 17))^s1b33?)^(s1b59? >> 26)) ((((s0b32^(s0b9 << 23))^((s0b49^(s0b26 << 23)) >> 17))^s1b32?)^(s1b58? >> 26)) ((((s0b31^(s0b8 << 23))^((s0b48^(s0b25 << 23)) >> 17))^s1b31?)^(s1b57? >> 26)) ((((s0b30^(s0b7 << 23))^((s0b47^(s0b24 << 23)) >> 17))^s1b30?)^(s1b56? >> 26)) ((((s0b29^(s0b6 << 23))^((s0b46^(s0b23 << 23)) >> 17))^s1b29?)^(s1b55? >> 26)) ((((s0b28^(s0b5 << 23))^((s0b45^(s0b22 << 23)) >> 17))^s1b28?)^(s1b54? >> 26)) ((((s0b27^(s0b4 << 23))^((s0b44^(s0b21 << 23)) >> 17))^s1b27?)^(s1b53? >> 26)) ((((s0b26^(s0b3 << 23))^((s0b43^(s0b20 << 23)) >> 17))^s1b26?)^(s1b52? >> 26)) ((((s0b25^(s0b2 << 23))^((s0b42^(s0b19 << 23)) >> 17))^s1b25?)^(s1b51? >> 26)) ((((s0b24^(s0b1 << 23))^((s0b41^(s0b18 << 23)) >> 17))^s1b24?)^(s1b50? >> 26)) ((((s0b23^(s0b0 << 23))^((s0b40^(s0b17 << 23)) >> 17))^s1b23?)^(s1b49? >> 26)) ((((s0b22^s0b22)^((s0b39^(s0b16 << 23)) >> 17))^s1b22?)^(s1b48? >> 26)) ((((s0b21^s0b21)^((s0b38^(s0b15 << 23)) >> 17))^s1b21?)^(s1b47? >> 26)) ((((s0b20^s0b20)^((s0b37^(s0b14 << 23)) >> 17))^s1b20?)^(s1b46? >> 26)) ((((s0b19^s0b19)^((s0b36^(s0b13 << 23)) >> 17))^s1b19?)^(s1b45? >> 26)) ((((s0b18^s0b18)^((s0b35^(s0b12 << 23)) >> 17))^s1b18?)^(s1b44? >> 26)) ((((s0b17^s0b17)^((s0b34^(s0b11 << 23)) >> 17))^s1b17?)^(s1b43? >> 26)) ((((s0b16^s0b16)^((s0b33^(s0b10 << 23)) >> 17))^s1b16?)^(s1b42? >> 26)) ((((s0b15^s0b15)^((s0b32^(s0b9 << 23)) >> 17))^s1b15?)^(s1b41? >> 26)) ((((s0b14^s0b14)^((s0b31^(s0b8 << 23)) >> 17))^s1b14?)^(s1b40? >> 26)) ((((s0b13^s0b13)^((s0b30^(s0b7 << 23)) >> 17))^s1b13?)^(s1b39? >> 26)) ((((s0b12^s0b12)^((s0b29^(s0b6 << 23)) >> 17))^s1b12?)^(s1b38? >> 26)) ((((s0b11^s0b11)^((s0b28^(s0b5 << 23)) >> 17))^s1b11?)^(s1b37? >> 26)) ((((s0b10^s0b10)^((s0b27^(s0b4 << 23)) >> 17))^s1b10?)^(s1b36? >> 26)) ((((s0b9^s0b9)^((s0b26^(s0b3 << 23)) >> 17))^s1b9?)^(s1b35? >> 26)) ((((s0b8^s0b8)^((s0b25^(s0b2 << 23)) >> 17))^s1b8?)^(s1b34? >> 26)) ((((s0b7^s0b7)^((s0b24^(s0b1 << 23)) >> 17))^s1b7?)^(s1b33? >> 26)) ((((s0b6^s0b6)^((s0b23^(s0b0 << 23)) >> 17))^s1b6?)^(s1b32? >> 26)) ((((s0b5^s0b5)^((s0b22^s0b22) >> 17))^s1b5?)^(s1b31? >> 26)) ((((s0b4^s0b4)^((s0b21^s0b21) >> 17))^s1b4?)^(s1b30? >> 26)) ((((s0b3^s0b3)^((s0b20^s0b20) >> 17))^s1b3?)^(s1b29? >> 26)) ((((s0b2^s0b2)^((s0b19^s0b19) >> 17))^s1b2?)^(s1b28? >> 26)) ((((s0b1^s0b1)^((s0b18^s0b18) >> 17))^s1b1?)^(s1b27? >> 26)) ((((s0b0^s0b0)^((s0b17^s0b17) >> 17))^s1b0?)^(s1b26? >> 26))[/cpp] Oh boy. This is before I add addition into the mix! You can ignore the shift operators here as well, saying b31 ^ b29 tells you that one of the bits has been shifted. They're purely informational so you know which bit was shifted when, but you can skip reading them entirely Interestingly if this approach is successful, it would be straightforward to extend to other similar algorithms. I'm going to attempt to see if i can reduce the search space for s1, given s0 + s1 and s0 initially Edit [cpp]((0^s1b63?)^0) ((0^s1b62?)^0) ((1^s1b61?)^0) ((1^s1b60?)^0) ((0^s1b59?)^0) ((0^s1b58?)^0) ((0^s1b57?)^0) ((1^s1b56?)^0) ((1^s1b55?)^0) ((1^s1b54?)^0) ((1^s1b53?)^0) ((1^s1b52?)^0) ((1^s1b51?)^0) ((0^s1b50?)^0) ((1^s1b49?)^0) ((1^s1b48?)^0) ((1^s1b47?)^0) ((0^s1b46?)^0) ((0^s1b45?)^0) ((0^s1b44?)^0) ((0^s1b43?)^0) ((0^s1b42?)^0) ((1^s1b41?)^0) ((1^s1b40?)^0) ((1^s1b39?)^0) ((0^s1b38?)^0) ((0^s1b37?)^(s1b63? >> 26)) ((0^s1b36?)^(s1b62? >> 26)) ((1^s1b35?)^(s1b61? >> 26)) ((1^s1b34?)^(s1b60? >> 26)) ((0^s1b33?)^(s1b59? >> 26)) ((0^s1b32?)^(s1b58? >> 26)) ((1^s1b31?)^(s1b57? >> 26)) ((0^s1b30?)^(s1b56? >> 26)) ((1^s1b29?)^(s1b55? >> 26)) ((0^s1b28?)^(s1b54? >> 26)) ((0^s1b27?)^(s1b53? >> 26)) ((1^s1b26?)^(s1b52? >> 26)) ((1^s1b25?)^(s1b51? >> 26)) ((1^s1b24?)^(s1b50? >> 26)) ((1^s1b23?)^(s1b49? >> 26)) ((0^s1b22?)^(s1b48? >> 26)) ((0^s1b21?)^(s1b47? >> 26)) ((1^s1b20?)^(s1b46? >> 26)) ((1^s1b19?)^(s1b45? >> 26)) ((1^s1b18?)^(s1b44? >> 26)) ((1^s1b17?)^(s1b43? >> 26)) ((0^s1b16?)^(s1b42? >> 26)) ((0^s1b15?)^(s1b41? >> 26)) ((1^s1b14?)^(s1b40? >> 26)) ((0^s1b13?)^(s1b39? >> 26)) ((1^s1b12?)^(s1b38? >> 26)) ((1^s1b11?)^(s1b37? >> 26)) ((0^s1b10?)^(s1b36? >> 26)) ((0^s1b9?)^(s1b35? >> 26)) ((1^s1b8?)^(s1b34? >> 26)) ((1^s1b7?)^(s1b33? >> 26)) ((1^s1b6?)^(s1b32? >> 26)) ((1^s1b5?)^(s1b31? >> 26)) ((1^s1b4?)^(s1b30? >> 26)) ((1^s1b3?)^(s1b29? >> 26)) ((0^s1b2?)^(s1b28? >> 26)) ((1^s1b1?)^(s1b27? >> 26)) ((0^s1b0?)^(s1b26? >> 26))[/cpp] Here's it substituted down. If you add an = whatever to the right side of the thing for each bit, its a giant system of simultaneous equations (oh boy my favourite). I need to actually encode function state in here, and then dynamically search for simultaneous equations, which should allow me to solve the case for s1, given s0 + s1 and s0 initially (ie this isn't a crack, just a concept for how a crack might be created). I haven't considered yet how addition will interact with this, but this is much more promising than last time (yay!) I'm hoping that when addition enters the mix, there'll still be enough simultaneous equation nonsense that I can reduce the search space enough to be cracked feasibly. Who knows! :)
[url]https://puu.sh/xBMVC/71744f15ed.mp4[/url] I don't know how to embed things. Box me for it. Because the video won't embed, here's a screenshot for people too scared to click links: [t]https://puu.sh/xBNv2/b681f5b6f3.png[/t]
[QUOTE=Comfort Jones;52682672][video=youtube;bgfB1fdwG4Q]https://www.youtube.com/watch?v=bgfB1fdwG4Q&feature=youtu.be[/video] Currently working as the ai lead on a remake of Condition Zero: Deleted Scenes. The models are just silly placeholders. If anyone here is working on a promising source engine project and need some ai work please do hit me up.[/QUOTE] Good work so far, they look quite difficult already. Some advice: 'memory' is missing, make the NPCs prefire where they saw you last time. So that when you crouch, they still shoot where your head was. It should make them look more offensive and the fear factor will be bigger. [editline]17th September 2017[/editline] [QUOTE=LennyPenny;52685426]I finished school 3 months ago, started part time programming job at a software startup two weeks ago Had cool crypto currency idea on 3rd day for hackathon - We then went there, coded for like 2 days straight with 4h of sleep and [URL="https://twitter.com/symbioticon/status/908382034351022081"]won[/URL] Got iphone x for it and more business with biggest banking franchise in germany [editline]16th September 2017[/editline] I'm still stunned, I never actually expected to have fun working[/QUOTE] criptocarrenci projects are always fun. Keep it up mate, this is the future of finance. [editline]17th September 2017[/editline] [QUOTE=Asgard;52684657]And I've quit my job! Wooo. I'll be starting up my own game studio, with a colleague, so wish me luck.[/QUOTE] Wish you a lot of luck and willpower. It won't be easy road, expect to be porr :angry: a lot until you win big. :cool: If you succeed big time, you will be coding/making games :chem101: for quite some time.
[QUOTE=war_man333;52689103]How'd you get it for such a low price?[/QUOTE] How'd you get courses for more than $10 in Udemy
studying for a microsoft interview this upcoming week and a facebook interview the next week. both for software engineering intern positions. wish me luck :o surprisingly didn't hear back from amazon yet
[QUOTE=RocketSnail;52691443]studying for a microsoft interview this upcoming week and a facebook interview the next week. both for software engineering intern positions. wish me luck :o surprisingly didn't hear back from amazon yet[/QUOTE] Best of luck, are these on site interviews?
I'll probably be hopping back and forth between spacegame and rng breaking for a while Here's some spacegame: [vid]https://giant.gfycat.com/SeparateOfficialAfricanelephant.webm[/vid] Its a moving jif and everything, this is an upgrade for me. Next up is redesigning the ship design menu, and then i'm off to find some playtesters
[QUOTE=ben1066;52692206]Best of luck, are these on site interviews?[/QUOTE] thank you!! Microsoft is an on-campus interview and FB is a phone interview. scored an interview with goldman sachs too! :( goldman sachs rejected me
rip waywo
I started following the hex tutorials here [url]http://catlikecoding.com/unity/tutorials/[/url] I don't like his code formatting so I kind of go through it and convert it to proper Microsoft code style and C# 6
update... probably failed the facebook interview.. but got invited for an on-site interview for microsoft!
Been working on getting my IDE usable so I added code folding and keyword highlighting for a few different languages instead of one as before. [img]https://i.imgur.com/iFXQ7WF.png[/img]
I wish I had more things to post here: I've just been super busy on all sorts of fronts. Working full time, as mentioned, usually leaves me too drained for personal projects. And I can't share as much code anymore, and its not really feasible/okay to record video demos either :/ Work has been cool though: I'll be working on revamping, modernizing, and upgrading our simulation software. STK is the other big satellite sim, and they wanted literally a couple hundred grand to add the abilities we desire (namely, simulating space tethers and [URL="https://en.wikipedia.org/wiki/Electrodynamic_tether"]electrodynamic tethers[/URL]). So I'm now tasked with modernizing code that was written 12-14 years ago, including its C and FORTRAN elements lol. Plus, building a front-end and visualization: almost certainly using my renderer, since the previous API is dead and only really works on Mac OSX. With that in mind, I've been working on [URL="http://fuchstraumer.github.io/vulpes-docs/index.html"]some kind of documentation[/URL] for my rendering system (caller/callee graphs are neat, but I still need to use a stylesheet and header+footer to make this less fugly), along with preparing to add another layer of abstraction to make it easier to set up scenes including timepoints and programmed movements etc. All of this, of course, is made more "fun" by it having to run on all three major platforms to meet certain requirements from larger aerospace firms and US governmental research agencies. Yay, me! (HELP)
[img]https://i.imgur.com/PaLXgvA.png[/img]
I've been tasked with making the Advisor npc actually capable of moving. [video=youtube;ddeD8_KWsfo]https://www.youtube.com/watch?v=ddeD8_KWsfo&feature=youtu.be[/video] The attacks are not my own work, they're from this: [video=youtube;gUXETwff9Ww]https://www.youtube.com/watch?v=gUXETwff9Ww[/video] At some point I'll prob totally overhaul how that works though.
DLL hotloading is an interesting topic, and one I've been finding more and more potential uses for as of late. Dynamic loading of classes is the neatest, though. In my most recent case, I'm making it so that gravity models can be hotloaded from a DLL: the main point of this is so that updating or extending a gravitational model doesn't require recompiling the main executable, or modifying the main source code. I'll extend this to more models, eventually, which is doubly important because of how often scientific models for trajectory planning and simulation are updated: plus, some of them are only valid for certain time periods or for a few years after creation. Unfortunately, it can be a bit difficult across platforms and on windows at least it still requires linking the export library from the executable into your DLL: this means that a robust and well thought out API to expose is essential. Setting it up requires a base interface class, along with awakening the good 'ol factory pattern: (I'd like to use std::unique_ptr, but that's acted a bit odd w/ DLLs for me) [cpp] extern "C" { struct GravitationalModel { GravitationalModel() = default; virtual ~GravitationalModel() = default; // called to update [orbital_parameters] using [input_satellite_data]. Both placeholders because I haven't decided how to standardize this part of the interface, yet // used operator() mainly for the sake of compatibility w/ standard library algorithms, and since functors are useful virtual [orbital_parameters] operator()([input_satellite_data]); }; struct GravitationalModelFactory { __declspec(dllexport) virtual ~GravitationalModelFactory(); __declspec(dllexport) static void RegisterModel(const std::string& model_name); static std::map<std::string, GravitationalModelFactory*> Factories; // how a user/client/other class requests a new model static GravitationalModel* CreateModel(const std::string& _model_name); protected: // internal function to create a new model virtual GravitationalModel* createModel() = 0; }; } [/cpp] This is really all thats required: I use a map and a string so that modules can self-register during the "__attribute__((constructor))" call w/ gcc on linux, or during the dllMain call for windows. This map can then be easily interpreted either by the program, a GUI (for listing loaded modules), or by users who want to see what's available. Besides this, I've also been really enjoying std::string_view. It makes things like reading an input file and fetching values both simple and resource+performance friendly, since you can avoid copying string data nearly entirely. Plus, subtr() on a string_view is constant in complexity vs the linear (relative to string length) complexity for std::string.substr() [cpp] #include <string_view> // only works w/ CXX17, fyi void trim_whitespace_from_str_view(std::string_view & _view) { _view.remove_prefix(std::min(_view.find_first_not_of(' '), _view.size())); } // for me, reading values separated by indeterminate whitespace (several values, each spaced oddly per row) and newlines for each row becomes template<typename T> T numeric_val_from_str(const std::string_view& _view); template<> double numeric_val_from_str(const std::string_view& _view){ // data is a const char*, pointing to the current location of the view in the parent string return std::stod(_view.substr(0, std::min(_view.find_first_of(' '), _view.size())).data()); } double fetch_double_from_str_view(const std::string_view& _view) { trim_whitespace_from_str_view(_view); return numeric_val_from_str(_view); } [/cpp] tldr is that string_view isn't exactly mindblowing: you get the fairly usual find() functions and their variations from std::string, plus the neat remove_prefix() and remove_suffix() functions. but, it's faster (especially in release mode and w/ large files) and easier on memory than std::string can ever be [sp]this boring and rambling post brought to you by the "keep waywo vaguely alive" foundation[/sp]
[QUOTE=RocketSnail;52717094]update... probably failed the facebook interview.. but got invited for an on-site interview for microsoft![/QUOTE] another update... FCK YES!! facebook invited me to a second round interview! i thought I bombed it because I only solved 1 question in 1 hour and wasn't able to calculate the time complexity of the problem ... i am so pumped!
i don't program very much, just some dabbling in c++, but i just wrote a small, very specific program to do a math problem for myself [cpp]#include <iostream> using namespace std; int main() { float rateGrow = .08; int year = 2017; float usIncome = 42000; for (float chinaInitIncome = 5100; chinaInitIncome < usIncome; ++year) { chinaInitIncome = chinaInitIncome + (rateGrow * chinaInitIncome); cout << "China's Annual Personal Income for " << year << " is $" << chinaInitIncome << "\n"; } return 0; } [/cpp] is this what programming is really about because i can really get used to this
[QUOTE=RocketSnail;52727479]another update... FCK YES!! facebook invited me to a second round interview! i thought I bombed it because I only solved 1 question in 1 hour and wasn't able to calculate the time complexity of the problem ... i am so pumped![/QUOTE] If they complain about the time complexity thing, tell them you were moving too fast and breaking too many things. You'll get hired instantly.
[QUOTE=Ninja Gnome;52727499]i don't program very much, just some dabbling in c++, but i just wrote a small, very specific program to do a math problem for myself [cpp]#include <iostream> using namespace std; int main() { float rateGrow = .08; int year = 2017; float usIncome = 42000; for (float chinaInitIncome = 5100; chinaInitIncome < usIncome; ++year) { chinaInitIncome = chinaInitIncome + (rateGrow * chinaInitIncome); cout << "China's Annual Personal Income for " << year << " is $" << chinaInitIncome << "\n"; } return 0; } [/cpp] is this what programming is really about because i can really get used to this[/QUOTE] Welcome to computer applications. It took me a while also to realize that computers do more than just open a portal to facepunch, it computes stuff too!
[QUOTE=Naelstrom;52727629]Welcome to computer applications. It took me a while also to realize that computers do more than just open a portal to facepunch, it computes stuff too![/QUOTE] i will bend my computer to my will in such a way that i never have to do math again
Does ThreeJS work for this thread? I stopped working on my OpenGL-from-scratch-experiment-thing but I want to get back to it eventually when I'm not spending 90% of my time at work. After that opengl crap ThreeJS and other graphic engines make more sense now, so there is that. :v:
[QUOTE=paindoc;52726589]DLL hotloading is an interesting topic, and one I've been finding more and more potential uses for as of late. Dynamic loading of classes is the neatest, though. In my most recent case, I'm making it so that gravity models can be hotloaded from a DLL: the main point of this is so that updating or extending a gravitational model doesn't require recompiling the main executable, or modifying the main source code. I'll extend this to more models, eventually, which is doubly important because of how often scientific models for trajectory planning and simulation are updated: plus, some of them are only valid for certain time periods or for a few years after creation. Unfortunately, it can be a bit difficult across platforms and on windows at least it still requires linking the export library from the executable into your DLL: this means that a robust and well thought out API to expose is essential. Setting it up requires a base interface class, along with awakening the good 'ol factory pattern: (I'd like to use std::unique_ptr, but that's acted a bit odd w/ DLLs for me) [cpp] extern "C" { struct GravitationalModel { GravitationalModel() = default; virtual ~GravitationalModel() = default; // called to update [orbital_parameters] using [input_satellite_data]. Both placeholders because I haven't decided how to standardize this part of the interface, yet // used operator() mainly for the sake of compatibility w/ standard library algorithms, and since functors are useful virtual [orbital_parameters] operator()([input_satellite_data]); }; struct GravitationalModelFactory { __declspec(dllexport) virtual ~GravitationalModelFactory(); __declspec(dllexport) static void RegisterModel(const std::string& model_name); static std::map<std::string, GravitationalModelFactory*> Factories; // how a user/client/other class requests a new model static GravitationalModel* CreateModel(const std::string& _model_name); protected: // internal function to create a new model virtual GravitationalModel* createModel() = 0; }; } [/cpp] This is really all thats required: I use a map and a string so that modules can self-register during the "__attribute__((constructor))" call w/ gcc on linux, or during the dllMain call for windows. This map can then be easily interpreted either by the program, a GUI (for listing loaded modules), or by users who want to see what's available. Besides this, I've also been really enjoying std::string_view. It makes things like reading an input file and fetching values both simple and resource+performance friendly, since you can avoid copying string data nearly entirely. Plus, subtr() on a string_view is constant in complexity vs the linear (relative to string length) complexity for std::string.substr() [cpp] #include <string_view> // only works w/ CXX17, fyi void trim_whitespace_from_str_view(std::string_view & _view) { _view.remove_prefix(std::min(_view.find_first_not_of(' '), _view.size())); } // for me, reading values separated by indeterminate whitespace (several values, each spaced oddly per row) and newlines for each row becomes template<typename T> T numeric_val_from_str(const std::string_view& _view); template<> double numeric_val_from_str(const std::string_view& _view){ // data is a const char*, pointing to the current location of the view in the parent string return std::stod(_view.substr(0, std::min(_view.find_first_of(' '), _view.size())).data()); } double fetch_double_from_str_view(const std::string_view& _view) { trim_whitespace_from_str_view(_view); return numeric_val_from_str(_view); } [/cpp] tldr is that string_view isn't exactly mindblowing: you get the fairly usual find() functions and their variations from std::string, plus the neat remove_prefix() and remove_suffix() functions. but, it's faster (especially in release mode and w/ large files) and easier on memory than std::string can ever be [sp]this boring and rambling post brought to you by the "keep waywo vaguely alive" foundation[/sp][/QUOTE] With regards to .dll hotloading, I don't think I've posted this here before [url]https://twitter.com/wki_j/status/910414594526580738[/url] (I really have to learn how to embed things don't I) My approach is a bit different though, I'd like modules compiled with different compilers (or different versions of the same compiler) to be guaranteed to be compatible with each other so my interfaces don't use vtables. Pretty much this approach: [url]http://ourmachinery.com/post/little-machines-working-together-part-1/[/url] [url]http://ourmachinery.com/post/little-machines-working-together-part-2/[/url] [url]http://ourmachinery.com/post/dll-hot-reloading-in-theory-and-practice/[/url] Currently a bit burnt out on that project tho because I've hit a point where some major cleanup and refactor is required especially wrt asset management and I'm kinda unsure where to go with this in general so I'll probably do something stupid like writing a UI lib or something.
Sorry, you need to Log In to post a reply to this thread.