Whoa that's sweet, I love XCom. Question though, is that guy saying "It's hot" because of the combat? Or because none of them are wearing pants?
[QUOTE=Naelstrom;52772165]Whoa that's sweet, I love XCom. Question though, is that guy saying "It's hot" because of the combat? Or because none of them are wearing pants?[/QUOTE]
thanks! the latter although "its hot" is the only thing in their dictionary so even when they die or comment about your leadership they let out a "it's hot".
[QUOTE=Mr_Razzums;52772640]thanks! the latter although "its hot" is the only thing in their dictionary so even when they die or comment about your leadership they let out a "it's hot".[/QUOTE]
that's hot
One of the highlights of the legacy codebase I'm chewing my way through has to be the series of if-else statements that hits GCC+clangs limits for branching, which is approximately 340 if-else statements
All for converting strings read from a file into enum values. I'm desperate to replace it with JSON for reading from file and metastuff for serializing stuff back to a file (or setting up initial objects based on a JSON file). the file looks something like:
[code]
str_Input_Payload_Type TECHSAT 1 0
str_Input_Payload_Name ControlStation 1 0
num_Input_Payload_Mass 46.94 1 0
num_Input_Payload_SemimajorAxis 24503136
num_Input_Payload_Eccentricity 0.7275
num_Input_Payload_Inclination 0
num_Input_Payload_LongitudeAscendingNode 0
num_Input_Payload_ArgumentOfPerigee 178
num_Input_Payload_TrueAnomaly -90
bl_Input_Payload_DoPositionOutput 0 1 0
bl_Input_Payload_DoVelocityOutput 0 1 0
bl_Input_Payload_DoClassicalElementsOutput 1 1 0
bl_Input_Payload_DoAttitudeOutput 0 1 0
[/code]
when it could be something like
[code]
"vessel-0" : {
"payload-0" : {
"PayloadType" : "MXER Control Station",
"Name" : "ControlStation",
"Mass" : "4682",
"DragCrossSection" : "5.00",
// rest of payload info, pos, angle, moment of inertia, etc
},
"payload-1" : {
// now we have another payload attached to the same vessel without janky indices and flags in a cfg file...
},
"ClassicalElements" : {
// classical elements == keplerian elements
},
// flags for output yay
"PositionOutput" : false,
"VelocityOutput" : false,
"ClassicalElementsOutput" : false,
"AttitudeOutput" : false
}
[/code]
The original method for parsing this passed around FILE pointers like they were the town bicycle, because thats never a bad idea, and used the token custom "string" class thats the hallmark of codebases written before C++ could into a half-decent string implementation. The only upside is that clang-format and clang-tidy are a godsend, and that replacing outdated code with cleaner, faster, and safer code exploiting modern C++ is quite nice. Since the codebase isn't bad, just an artifact of its time, its easy to "refit" and refurbish and is pleasurable to work with for the most part. Hopefully I'll have media to show off, assuming I get the all-clear from my CEO.
Also, I'm now effectively the CEO's personal coding lackey and its apparently why I got hired. So, job security, maybe? :v:
[editline]edited[/editline]
also found this gem
[cpp]
// Macro for performing x^2
static Number sqrarg;
#define sqr(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg)
[/cpp]
my terminal is FULL of "multiple unsequenced modifications to "sqrarg" warnings :s:
[editline]12th October 2017[/editline]
also this thing is our CEO's baby so it's been a mix of "fix this thing and show it off!" and either "don't fix the thing" or "fix the thing, [I]real[/I] quiet-like"
I brought my volumetric clouds into a real test-scene today and started working on refining the plugin.
It has ways to go yet but I recently implemented LODing which allows for details up close while using huge rendering distances. This in turn re-ignited my interest in working on it and I'm now starting work on generating better 3D-textures to drive the cloud model!
[img]https://puu.sh/xWtVE.jpg[/img]
[QUOTE=Mr_Razzums;52771970]Somewhat related. The AI fighting each other in a game I've been spending too much time on. Built with monogame.
Still haven't added any pants or a second type of shirt.
[/QUOTE]
Did you write the GUI yourself? I've been looking for a library but nothing stands out as easy to use.
I could always..
Write my own GUI library.
edit: I found this, looks boss
[url]https://github.com/prime31/Nez[/url]
[QUOTE=reevezy67;52775633]Did you write the GUI yourself? I've been looking for a library but nothing stands out as easy to use.
I could always..
Write my own GUI library.
edit: I found this, looks boss
[url]https://github.com/prime31/Nez[/url][/QUOTE]
Yeah just rolled my own.
I'm curious now to see how well [url=http://blog.qt.io/blog/2017/10/11/qt-3d-studio-source-code-pre-release-snapshots-available/]Qt 3D Studio[/url] does, and how well it's going to integrate into other places where Qt is used.
I mean, many projects tend to do Qt for launchers and the like, so the possibility to do other UI with it as well might be interesting. Don't think it's going to beat out CEF/HTML UI though.
Weell the facebook interview went ok. I solved 1 out of 2 problems. We'll see :{
What were the problems?
[QUOTE=false prophet;52777879]What were the problems?[/QUOTE]
they both dealt with arrays
yeah yeah you fuckers, I know, super informative, i signed an NDA
I implemented source movement into unity, then I drag and dropped some source maps.
[video]https://youtu.be/C40phUKg2fk[/video]
There's still some issues that need to be solved, for example air deceleration needs to scale 1:1 with how fast you're going. As it is now it (a constant 350) made me gain way too crazy heights on the early puzzles, and made the last jump almost impossible. I also have no idea what the gravity or other stats should be (but it should be easily fixed).
I'm pretty excited to get the code all cleaned up and make a real game for once.
[url=https://youtu.be/PtZE15g4QA4]Climb maps kinda work too.[/url]
All of C#'s special syntax and features are spoiling me to the point that I come out with random things like this that really have no business existing. This should really just be an if else.
[code]
public static (bool, T) IsNetworkEvent<T>(this MemoryStream ms, Event e) where T : NetworkedEntity
{
using (ms) {
using (var sr = new BinaryReader(ms)) {
var ev = (Event)sr.ReadUInt32();
return e != ev
? (false, null)
: new Func<(bool,T)>(() =>
{
// ReSharper disable once AccessToDisposedClosure
var otherBytes = sr.ReadBytes((int) (ms.Length - sizeof(uint)));
ms.Seek(sizeof(uint), SeekOrigin.Begin);
var deserializedEntity = Serializer.Deserialize<T>(ms);
return (true, deserializedEntity);
})();
}}
}
[/code]
[QUOTE=reevezy67;52781970]All of C#'s special syntax and features are spoiling me to the point that I come out with random things like this that really have no business existing. This should really just be an if else.
[code]
public static (bool, T) IsNetworkEvent<T>(this MemoryStream ms, Event e) where T : NetworkedEntity
{
using (ms) {
using (var sr = new BinaryReader(ms)) {
var ev = (Event)sr.ReadUInt32();
return e != ev
? (false, null)
: new Func<(bool,T)>(() =>
{
// ReSharper disable once AccessToDisposedClosure
var otherBytes = sr.ReadBytes((int) (ms.Length - sizeof(uint)));
ms.Seek(sizeof(uint), SeekOrigin.Begin);
var deserializedEntity = Serializer.Deserialize<T>(ms);
return (true, deserializedEntity);
})();
}}
}
[/code][/QUOTE]
You've done something fucking monsterous with turning that ternary operator in a composite anonymous function soup.
[QUOTE=Naelstrom;52781072]I implemented source movement into unity, then I drag and dropped some source maps.
[video]https://youtu.be/C40phUKg2fk[/video]
There's still some issues that need to be solved, for example air deceleration needs to scale 1:1 with how fast you're going. As it is now it (a constant 350) made me gain way too crazy heights on the early puzzles, and made the last jump almost impossible. I also have no idea what the gravity or other stats should be (but it should be easily fixed).
I'm pretty excited to get the code all cleaned up and make a real game for once.
[url=https://youtu.be/PtZE15g4QA4]Climb maps kinda work too.[/url][/QUOTE]
Are physics tied to framerate or a fixed timestep? Cuz that's a p. big detail.
[QUOTE=JohnnyOnFlame;52783003]Are physics tied to framerate or a fixed timestep? Cuz that's a p. big detail.[/QUOTE]
Who do you think I am? [sp]Yeah it's tied to a dynamic framerate.[/sp]
Messing around with Unity I made this so far.
[video]https://youtu.be/6YFxnJXfq2g[/video]
Generates random planets, locations, names and resources. Then when you attack a planet it turns into one of those games where you gather resources and build guys then attack. I don'teven know what they are called, my son plays a stick figure one on his tablet.
The player is on the left and the enemy AI is on the right. I am trying to make it as complicated as possible to force myself to learn new things.
It is pretty clumsy but is working and I am learning so I am happy with how it is going.
Any waywo guys who will be attending 34c3 this year?
Made a noclip mod for Battlefield 3. There's currently no way to get the vertical rotation of the camera, so the up/down movement is a bit harsh. I'll smooth it out eventually.
It's going to be useful for when we get the level editor up and running.
[vid]http://powback.com/u/59e133e62ebbf.webm[/vid]
I'm also working on a new HUD which looks a little bit like this:
[t]http://powback.com/u/59e4a32562ec2.png[/t]
I really wish I got code reviews at work, or even on my personal projects. I'd ask the other extremely talented C++ dev here, but he's way too busy for that. Its hard to improve when my only way of doing so is either coding more or just reading textbooks and exposing myself to lots of other people's code
speaking of said C++ dev, he wrote a neat little TMP c++ logging utility for our radios. You set a logging level to include in the binary and a log level to report at compile-time, and then use macro-like syntax such as
[cpp]
LOG<TRACE> << "Invalid branch";
LOG<INFO> << "Setting up state machine...";
[/cpp]
to do the logging stuff. Its pretty neat and kinda blew everyone's minds at a code review for some firmware stuff, because most people there are EE's who mostly use C, barely touch C++, and hardly get to see neat modern C++ and TMP stuff. What really convinced them that this is worth doing was being able to set the runtime level such that the logging calls compiled down to nothing in assembly, which is pretty important for things like space hardware where binary sizes are [I]very[/I] constrained (and rumors about TMP + binary bloat abound)
Also, we've started using a number of nice formal procedures at work - from going for Agile (vs no real strategy / management method), to using git-flow and git vs tortoise svn, and using JIRA for managing tasks and keeping better track of whats being done. Going from R&D to high-demand production has been tense, but things are feeling good and getting much better now
[QUOTE=RocketSnail;52777296]Weell the facebook interview went ok. I solved 1 out of 2 problems. We'll see :{[/QUOTE]
lol speaking of interviews, I recently did an on-site Amazon intern interview. There was like 60 kids with laptops and we all had to take an online assessment that consisted of Debugging, Logic/Pattern Matching, and then Algorithms questions. Aced the Debugging/Algorithms with time to spare, missed two questions on the Logic/Pattern Matching. Got rejected [I]immediately[/I] the day after, then when I spoke to my friend who was also interviewing, he said his friend was extended an offer after outright failing to even attempt one of the algorithms questions, but he got all the "Logic" questions right. I was a bit floored tbh. Good luck with Facebook.
I wrote my first AutoHotkey script earlier today: [code]#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; [Start of actual program that wasn't there when I created the file.]
^j::
SetKeyDelay, 1000, 100 ; [I don't know why this doesn't work.]
Loop 100
{
Send {Up} ; [Most of these could go on one line, I think.]
Send ^{a}
Send {BS}
Send {Enter}
Sleep 250
Send {Enter}
Sleep 250
}
Return[/code][new comments in square brackets]
I'm pretty sure it's outright terrible, but it did what it was supposed to (i.e. [sp]delete a bunch of messages in Discord[/sp]).
Are you working at the same time as studying? Or alternatively?
Either way it's quite hard, I've been trying to update my lib for C++17 but just haven't had the time/motivation recently to do it.
[QUOTE=srobins;52786532]lol speaking of interviews, I recently did an on-site Amazon intern interview. There was like 60 kids with laptops and we all had to take an online assessment that consisted of Debugging, Logic/Pattern Matching, and then Algorithms questions. Aced the Debugging/Algorithms with time to spare, missed two questions on the Logic/Pattern Matching. Got rejected [I]immediately[/I] the day after, then when I spoke to my friend who was also interviewing, he said his friend was extended an offer after outright failing to even attempt one of the algorithms questions, but he got all the "Logic" questions right. I was a bit floored tbh. Good luck with Facebook.[/QUOTE]
I've done one of these for Amazon and it was completely nuts. The test was an hour long and I had 3 tasks to read and complete. By the time i'd finished reading the requirements I was down to about 10 minutes each for implementation of various tree creation, traversal and sorting algos. I decided partway through the process that I didn't want to work for Amazon if this is what they put people through for a starting salary and ended the tests. Fuck that.
I am attempting to make a script in order to change the proxy settings based on the IP Address or DNS. I can't seem to figure it out so I made a manual Windows Form in C# that changes the registry keys and refreshes the OS to apply the settings, which is okay but the people who will be using this will get so confused no matter how straight forward I do it.
I just can't seem to get a PAC file to work the way I want it to but I won't let it defeat me.
[QUOTE=Clive;52788213]I am attempting to make a script in order to change the proxy settings based on the IP Address or DNS. I can't seem to figure it out so I made a manual Windows Form in C# that changes the registry keys and refreshes the OS to apply the settings, which is okay but the people who will be using this will get so confused no matter how straight forward I do it.
I just can't seem to get a PAC file to work the way I want it to but I won't let it defeat me.[/QUOTE]
Could this be of use?
[url]http://www.netsetman.com/en/freeware[/url]
Got a job offer from a AAA studio but it's less than I earn now and probably the tasks are more mundane. Pretty much the only plus would be going away from consulting, totally not worth it just for that.
[QUOTE=Skipcast;52788233]Could this be of use?
[url]http://www.netsetman.com/en/freeware[/url][/QUOTE]
I recommended that to my boss (or something similar) but he told me he wants something to be made by us so we can say that we made it for them, I'm not even a programmer for this company I'm a support guy so god knows why I am tasked with this.
Working on the last fixes for my thesis. I have to hand in the printed thesis tomorrow. My supervisor returned from a 2 week holiday today, and gave me a last second proof-read, which I am implementing now. It's gonna be a long as fuck night...
[QUOTE=Sam Za Nemesis;52787003]How do you people cope with your daily schedule? I think that working on interesting out-of-work projects with other people is my best way to succeed in (and out) of this country but college and work seem to eat all my time and motivation to do anything and I feel like I'm deeply failing because of that[/QUOTE]
I have multiple projects going on at once so if I get bored/frustrated with one of them I'll switch to a different one to keep things rolling. I've also found that starting out with a small goal in mind when working on something has been a great motivator, at the very least you can say to yourself that you've done some work on the project and at best you work on more than just the small goal.
Sorry, you need to Log In to post a reply to this thread.