• What are you working on? v67 - March 2017
    3,527 replies, posted
[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] Yes, its especially great for making this not something humans have to calculate: (1/3 components of accel due to gravity for satellite in low-lunar orbit) [t]https://i.imgur.com/y1APDkzl.jpg[/t] Speaking of, getting all of this translated into code yesterday was [I]exhausting[/I]. And I haven't even tested it yet. which is going to be fun because the only spacecraft (afaik, might be more) that have used the data are the two satellites that recorded the coefficients used in this equation (GRAIL) and iirc the Chinese satellite Chang'E-2. So, not a lot of data to pull from. Probably going to pull epherimedes for GRAIL using the JPL HORIZONS system, and then plot similar trajectories in my simulator. So long as HORIZONS stores epherimedes from satellites in the past, I should be able to get the most accurate ephemeris data I possibly can for those satellites (maybe even the bit where they went as low as 1-2kms above the lunar surface!) [QUOTE=JWki;52728199]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.[/QUOTE] Thanks for these! I hadn't seen them in my fairly extensive searching on the topic and this is even better. I was worried about vtables as well, and wanted an alternate approach so that I can make this system even more flexible and robust. It'll be a while until I get to use this in a project, but I've bookmarked them and will be referring back to them (plus probably skimming during lunch).
[QUOTE=Ninja Gnome;52727499] is this what programming is really about because i can really get used to this[/QUOTE] Yes! Programming can simplify so many manual tasks in your life, it's ridiculous. Recently I found myself repeatedly doing the same task of starting simulations and then renaming the output files for later use, so instead I wrote a quick bash script to do it for me. I suggest you learn a scripting language like python, it requires less overhead with the compiler and allows you to more quickly write one-use code. Plus it comes with an enormous and well documented standard library that will do many things for you.
So a coworker asked me why his particle system was running slow when tweening the colors of the particles. I came over and took a look, and found this rgb2hex method. [code] public static rgb2hex(rgb: number[]): number { let r = rgb[0].toString(16); let g = rgb[1].toString(16); let b = rgb[2].toString(16); r = r.length < 2 ? "0" + r : r; g = g.length < 2 ? "0" + g : g; b = b.length < 2 ? "0" + b : b; return eval("0x" + r + g + b); }[/code] I face palmed so hard that I had a headache for the rest of the day and nearly had to go home early.
[QUOTE=thomasfn;52730223]So a coworker asked me why his particle system was running slow when tweening the colors of the particles. I came over and took a look, and found this rgb2hex method. [code] public static rgb2hex(rgb: number[]): number { let r = rgb[0].toString(16); let g = rgb[1].toString(16); let b = rgb[2].toString(16); r = r.length < 2 ? "0" + r : r; g = g.length < 2 ? "0" + g : g; b = b.length < 2 ? "0" + b : b; return eval("0x" + r + g + b); }[/code] I face palmed so hard that I had a headache for the rest of the day and nearly had to go home early.[/QUOTE] My head hurts from just looking at it.
[QUOTE=false prophet;52727755]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] I'd say it depends on what you make with it. If it's a widget for a larger web page it probably fits more in the Web Dev thread, but if it's primarily self-contained and/or a game then this one and the game developement thread seem more appropriate.
Ok I can't stand Godot anymore. I think it has huge potential but I can't deal with GodotScript and GodotSharp is too buggy. I want an XNA studio style framework that uses C# and can be deployed to mobile. Something where I don't have to faff around with an editor to do everything. Does it exist?
[QUOTE=reevezy67;52731997]Ok I can't stand Godot anymore. I think it has huge potential but I can't deal with GodotScript and GodotSharp is too buggy. I want an XNA studio style framework that uses C# and can be deployed to mobile. Something where I don't have to faff around with an editor to do everything. Does it exist?[/QUOTE] ... [url]http://www.monogame.net/[/url] I suppose? (was looking at it myself a while ago) You will end up wasting a fair bit of time just building basic stuff again, but if thats your thing :v:
Actually not a bad idea. I'll just use Monogame. I've used it before, but I didn't even consider it as an option for mobile development. I'm a little scared of scaling stuff on mobile but I'm sure it'll be fine, right?
Hi all, I've been working on a prototype of a game where you play as various cryptids running around in the woods hunting and eating the plucky teens who are hunting you. I'm struggling a bit with certain design decisions so if anyone wants to give it a quick test and feedback that would be really helpful: [url=https://niall-slater.itch.io/cryptid-prototype/download/aRmesiW8gxELsYc938lxRO6rb6TsWskF64bWMOzR]Build 0.2 | itch.io[/url] [img]https://i.imgur.com/Gg1sBI6.jpg[/img] Two questions I'm particularly interested in: -How can I make the teens more fun to hunt? At the moment they wander until they see the cryptid, flee if they get too scared and then try to find their fellow teens again. They have a vision cone for detecting the cryptid and there's a short delay between spotting it and photographing it. -Would it work better in first-person mode? I'd like to experiment with different movement systems but I worry that third-person will make that too clumsy, and it's hard enough to see where you're going as it is. Thanks guys xoxo
It just works, third person looks great, but trees gets pretty annoying
I've been restoring physgun (cleaning and fixing that old broken code from SourceSDK) and made a new beam effect: [video=youtube;LZa2u3PjsoA]https://www.youtube.com/watch?v=LZa2u3PjsoA[/video] Next step would be to make it glow... [B]DONE[/B] [video=youtube;IVYprAG41Bg]https://www.youtube.com/watch?v=IVYprAG41Bg[/video]
[thumb]http://carp.tk/$/YC3HrH.png[/thumb] Still not giving up on properly binding C++ classes in C# code. The background OOP mechanisms in C++ are surprisingly complicated to wrap your head around.
[QUOTE=cartman300;52737913][thumb]http://carp.tk/$/YC3HrH.png[/thumb] Still not giving up on properly binding C++ classes in C# code. The background OOP mechanisms in C++ are surprisingly complicated to wrap your head around.[/QUOTE] Please publish it if you manage to make something that's not too complex and doesn't require modifications on the C++ side. I had to can a project because of this.
[QUOTE=Tamschi;52738870]Please publish it if you manage to make something that's not too complex and doesn't require modifications on the C++ side. I had to can a project because of this.[/QUOTE] The idea is that you know the structure of the C++ class (via an SDK header file or whatever) so that you can implement a C# interface with the matching functions and stuff, then get the class instance from the C++ side as a pointer and convert it to a C# interface instance via an API function like this [code] interface CppClass { void MethodA(); void MethodB(); } //... void Main(string[] A) { IntPtr Instance = // ... CppClass CsInstance = API.CreateInstance<CppClass>(Instance); // ... CsInstance.MethodA(); } [/code] The C# interface definition can be partial if you know the function index. It would also be possible to write a new C# class that inherits from an interface and create it "on top of" an existing C++ class instance and pass it back to C++ code, thereby effectively extending a C++ class from C# and passing back to C++, but that would be a bonus to implement (not a priority [translation: i'm lazy]).
[img_thumb]https://i.imgur.com/dWDk8FW.png[/img_thumb] Everything is terrible, but hey - At least I got bitmap fonts to work. So yay
So I somehow [I]completely[/I] missed the fact that Apple is effectively refusing to support or implement Vulkan in favor of their Metal API (which makes sense, because Apple :/). All of my renderer code is pretty Vulkan-specific at this point (fuck), so I either have to learn and then implement Metal in that somehow, start a new OpenGL renderer locked at v4.1 max (nope), or hope that I can something like [URL="https://moltengl.com/moltenvk/"]MoltenVK[/URL] working AND that work will pay for a license. I'm using MoltenVK now and it appears to be a possible solution, which would be nice because I really don't feel I have the time to do otherwise. I've been doing a lot of dev work on Mac OSX lately, since our CEO only uses Macs, and its honestly not that bad - until I encounter things like this, and other third-party library/API support issues.
[QUOTE=paindoc;52739169]So I somehow [I]completely[/I] missed the fact that Apple is effectively refusing to support or implement Vulkan in favor of their Metal API (which makes sense, because Apple :/). All of my renderer code is pretty Vulkan-specific at this point (fuck), so I either have to learn and then implement Metal in that somehow, start a new OpenGL renderer locked at v4.1 max (nope), or hope that I can something like [URL="https://moltengl.com/moltenvk/"]MoltenVK[/URL] working AND that work will pay for a license. I'm using MoltenVK now and it appears to be a possible solution, which would be nice because I really don't feel I have the time to do otherwise. I've been doing a lot of dev work on Mac OSX lately, since our CEO only uses Macs, and its honestly not that bad - until I encounter things like this, and other third-party library/API support issues.[/QUOTE] Ugh, why does apple have to be such a damn bitch? We finally could've had one kickass API that works on all platforms.
fuck apple
[QUOTE=DrDevil;52739700]Ugh, why does apple have to be such a damn bitch? We finally could've had one kickass API that works on all platforms.[/QUOTE] Because you're not being [I]!!!creative!!![/I] enough until you're locked into their overpriced ecosystem bullshit.
[thumb]http://carp.tk/$/2YCpbd.png[/thumb] [thumb]http://carp.tk/$/LJisMz.png[/thumb] \o/
I'm trying to find the energy to start grinding away at learning to develop UE4 for VR. I'm just so swamped with work/classes and as a result just completely emotionally drained for at least a month or two now. I just don't have the energy to pursue one of my most enjoyed creative hobbies now and that's really getting me down. Idk, how do you guys face slumps like this? Because I'm at the point where I'm waking up upset that I didn't die in my sleep kind of depressed and this really isn't doing much to help that since it makes me feel lazy, even though my weekly work load makes oil field workers look like part time employees.
[QUOTE=F.X Clampazzo;52740884]I'm trying to find the energy to start grinding away at learning to develop UE4 for VR. I'm just so swamped with work/classes and as a result just completely emotionally drained for at least a month or two now. I just don't have the energy to pursue one of my most enjoyed creative hobbies now and that's really getting me down. Idk, how do you guys face slumps like this? Because I'm at the point where I'm waking up upset that I didn't die in my sleep kind of depressed and this really isn't doing much to help that since it makes me feel lazy, even though my weekly work load makes oil field workers look like part time employees.[/QUOTE] I know exactly what you feel like. The past 6 months I've been absolutely swamped with my thesis and many exams, there is just no free time to do what I actually WANT to do. I just have to keep studying bullshit and write on my thesis. Granted, the thesis is interesting to work on, but I'd rather already be done with it. Just keep your head up, the bullshit will pass.
[QUOTE=JohnnyOnFlame;52740556]Because you're not being [I]!!!creative!!![/I] enough until you're locked into their overpriced ecosystem bullshit.[/QUOTE] [I]This[/I] is what really drives me up the wall with Apple. After several days using this Macbook for development, I'm honestly pleasantly surprised. XCode is nice, if still a bit confusing due to my unfamiliarity with it. Clang being the default compiler is a plus, CMake works well enough, VS Code still works wonderfully as a text editor - but the best thing is that I can open up the terminal and treat it just like any other Unix/Linux system. That alone gets it some points for usability in development tasks. This is the nicest macbook you can buy, so the battery life is admirable and the screen is really quite nice too: but I didn't pay for it, so I'm biased. The rest of the OS isn't dreadful by any means, either, even if everything is [I]just[/I] different enough from Windows to drive me mad. But its the proprietary bullshit I can't stand, like sticking with the Metal API. Its another low-level API (hence why things like MoltenVK exist, I imagine), but its a dead-end and I don't know how they don't see that. One of OpenGL's primary advantages is that it's cross-platform, right? Well turns out that the OpenGL 4.1 support on Apple devices only "nominal" and still apparently tends to act oddly (at least its 4.0+, I guess? 4.5 would've given me DSA and made using that as an alternate easier :/ ). Vulkan definitely has the potential to become an API as widespread as OpenGL, with a lot more power and flexibility due to how low-level you can get (like loading extensions and getting device/platform info at runtime). But nope, Apple has to cockblock that. Efforts like this don't work, either. It doesn't secure your own product, it just turns people away from even getting involved with any of your products. Like how I immediately searched for and found a way to keep using Vulkan anyways, via MoltenVK. [editline]3rd October 2017[/editline] [QUOTE=DrDevil;52741321]I know exactly what you feel like. The past 6 months I've been absolutely swamped with my thesis and many exams, there is just no free time to do what I actually WANT to do. I just have to keep studying bullshit and write on my thesis. Granted, the thesis is interesting to work on, but I'd rather already be done with it. Just keep your head up, the bullshit will pass.[/QUOTE] Its also okay to let your hobby slip a bit, or not work on things like that. Overdoing it may just burn you out on programming, and that's not something you want. I don't program at home much anymore, but I don't let myself feel bad about that because it'll just make things worse. You'll get time again, someday, so don't worry yourself too much or burn yourself out F.X Clampazzo [editline]edited[/editline] [t]https://i.imgur.com/I1xfEwF.png[/t] holllllly shiiiit it works (actually said this out loud, got a few quizzical looks from coworkers lol) Almost have .obj file loading demo working (just the house from vulkan-tutorial), but: [t]https://i.imgur.com/jlfZvUy.png[/t] "this is currently not supported" == I couldn't be assed to implement it, because my usual test machines have fuckhuge memory heaps and never try to create "Private" one-off VkDeviceMemory objects. So, that's fixable. Feeling pretty proud right now - this effectively makes my rendering framework truly cross-platform. Definitely a resume item now :D
[QUOTE=paindoc;52742313][I]This[/I] is what really drives me up the wall with Apple. After several days using this Macbook for development, I'm honestly pleasantly surprised. XCode is nice, if still a bit confusing due to my unfamiliarity with it. Clang being the default compiler is a plus, CMake works well enough, VS Code still works wonderfully as a text editor - but the best thing is that I can open up the terminal and treat it just like any other Unix/Linux system. That alone gets it some points for usability in development tasks. This is the nicest macbook you can buy, so the battery life is admirable and the screen is really quite nice too: but I didn't pay for it, so I'm biased. The rest of the OS isn't dreadful by any means, either, even if everything is [I]just[/I] different enough from Windows to drive me mad. But its the proprietary bullshit I can't stand, like sticking with the Metal API. Its another low-level API (hence why things like MoltenVK exist, I imagine), but its a dead-end and I don't know how they don't see that. One of OpenGL's primary advantages is that it's cross-platform, right? Well turns out that the OpenGL 4.1 support on Apple devices only "nominal" and still apparently tends to act oddly (at least its 4.0+, I guess? 4.5 would've given me DSA and made using that as an alternate easier :/ ). Vulkan definitely has the potential to become an API as widespread as OpenGL, with a lot more power and flexibility due to how low-level you can get (like loading extensions and getting device/platform info at runtime). But nope, Apple has to cockblock that. Efforts like this don't work, either. It doesn't secure your own product, it just turns people away from even getting involved with any of your products. Like how I immediately searched for and found a way to keep using Vulkan anyways, via MoltenVK.[/QUOTE] Eh, I'd rather waste a couple hours configuring my environment rather than selling my soul to Apple. If I wanted this badly to have an easy-to-use programming environment I'd jump shit from windows and go full stallman.
I've spent like three days failing to build Xamarin.Android on Fedora so I can build monogame to Android from my laptop. I'll just leave the bottom half of the output here. [code] 76 Warning(s) 883235 Error(s) Time Elapsed 00:02:53.3668490 make: *** [Makefile:32: all] Error 1 [evan@bobsburgers xamarin-android] $ [/code]
[QUOTE=reevezy67;52744793]I've spent like three days failing to build Xamarin.Android on Fedora so I can build monogame to Android from my laptop. I'll just leave the bottom half of the output here. [code] 76 Warning(s) 883235 Error(s) Time Elapsed 00:02:53.3668490 make: *** [Makefile:32: all] Error 1 [evan@bobsburgers xamarin-android] $ [/code][/QUOTE] I'm uhh... sorry? :v: (I remember having a bad time even making MonoGame work just for the regular desktop usage, so.. yeah... the build pipeline is overall extremely shite and very ad-hoc)
[QUOTE=paindoc;52739169]So I somehow [I]completely[/I] missed the fact that Apple is effectively refusing to support or implement Vulkan in favor of their Metal API (which makes sense, because Apple :/). All of my renderer code is pretty Vulkan-specific at this point (fuck), so I either have to learn and then implement Metal in that somehow, start a new OpenGL renderer locked at v4.1 max (nope), or hope that I can something like [URL="https://moltengl.com/moltenvk/"]MoltenVK[/URL] working AND that work will pay for a license. I'm using MoltenVK now and it appears to be a possible solution, which would be nice because I really don't feel I have the time to do otherwise. I've been doing a lot of dev work on Mac OSX lately, since our CEO only uses Macs, and its honestly not that bad - until I encounter things like this, and other third-party library/API support issues.[/QUOTE] I haven't used it yet, but have something that does everything (or plans to, at least): [url]https://bkaradzic.github.io/bgfx/overview.html[/url]
[QUOTE=JohnnyOnFlame;52744322]Eh, I'd rather waste a couple hours configuring my environment rather than selling my soul to Apple. If I wanted this badly to have an easy-to-use programming environment I'd jump shit from windows and go full stallman.[/QUOTE] Oh, absolutely. I still prefer Windows and Ubuntu as my two main platforms. If nothing else, using OSX just made me realize what I liked about Unix-based systems, which got me to finally dig into grub and fix my Ubuntu install/bootloader that I broke a year and change ago (its still on 14.04 lol). Also, doing all this cross-platform dev has turned me from "eh Cmake is alright I guess" to "holy [I]FUCK[/I] CMake is the best thing to ever exist" even given the sometimes nasty syntax. Got house/.obj file demo working on Mac yesterday afternoon: [t]https://i.imgur.com/8vjW6NE.png[/t] Then the spent rest of afternoon diagnosing bugs in vertex layouts and UV coordinates for icospheres. Found a way to generate UVs for an icosphere at runtime, courtesy of Cinder (tyvm), but things were acting oddly and in the end it was me being dumb again oops [t]https://i.imgur.com/ICIXdGU.png[/t] now to get it to work on mac. the texture shows up as black on mac, and I don't know how to do graphics debugging without mac and easy access to a shader compiler. plus, the texture is just a png so it shouldn't be any error based on formats. [QUOTE=WeltEnSTurm;52745942]I haven't used it yet, but have something that does everything (or plans to, at least): [url]https://bkaradzic.github.io/bgfx/overview.html[/url][/QUOTE] If everything else falls apart, I'll definitely give it a look. I've just spent so long on my renderer, and performance/convenience stuff for Vulkan that I'm not eager to switch by any means: and that project doesn't even list Vulkan as WIP :(
[QUOTE=WeltEnSTurm;52745942]I haven't used it yet, but have something that does everything (or plans to, at least): [url]https://bkaradzic.github.io/bgfx/overview.html[/url][/QUOTE] [QUOTE=paindoc;52746324] If everything else falls apart, I'll definitely give it a look. I've just spent so long on my renderer, and performance/convenience stuff for Vulkan that I'm not eager to switch by any means: and that project doesn't even list Vulkan as WIP :([/QUOTE] Ah! bgfx! I have used this from C# last year, it was working but had an issue with OpenGL i think (it was working fine with DirectX) so i have ditched it. Vulkan is very much work in progress, the repository on github is very (very!) frequently updated. [url]https://github.com/bkaradzic/bgfx/blob/master/src/renderer_vk.cpp[/url] [url]https://github.com/bkaradzic/bgfx[/url]
I wrote a system for interpolating between states of components. Here's a video of a spinning plane having its position component updated only every 50 milliseconds but it is interpolated to rotate smoothly: [media]https://www.youtube.com/watch?v=JOS6cPFHBsQ[/media]
Sorry, you need to Log In to post a reply to this thread.