« first day (3627 days earlier)      last day (1378 days later) » 

1:43 AM
Is that a general programming question? If so, please vote to close as such.
0
Q: Binding Lua Function to Perform tasks using std::async

JJeromeI am trying to load a bunch of mesh resources in the format of .obj files. Some of the files are very high in poly count so when loading using the below method It takes more than 10 seconds. I would really like to cut this time down. My question is how can I bind this to call loadMesh with std::a...

 
 
9 hours later…
10:20 AM
@Titaniumammas69 You uploaded your game to a site but you did not test the Linux and MacOS builds before doing so, is that it?
 
11:16 AM
@Vaillancourt yes...
It said linux windows and mac so it only made sense it would support linux
 
@Titaniumammas69 I haven't played with unity there but I suspect you need a linux machine yo produce the linux build. You need a linux machine to test it, at least; you don't want to release a build that you haven't tested :)
 
@Vaillancourt thinking about that... could I run a virtual desktop with linux as the platform and export it as linux?
or convert the .exe file to an .elf file?
the conversion may not be supported by the assets with the export tho
 
You vant convert an exe to a linux exe, but your vm approach would probably work.
 
nwp
I think converting is rather complicated and not readily available. A VM is easy and works though.
 
user92578
I'm fairly sure Unity can spit out Linux binaries on Windows
 
11:28 AM
@Tyyppi_77 It cant on my computer
I am downloading a virtual machine rn
 
user92578
8
Q: Why I can't do a build for Linux?

stighyI'm using Unity 5.3.x (free version) on a Windows machine. I would like to build my simple desktop game either for Windows and Linux, but Linux (and Mac) build is disabled. Am i missing something ? Thanks

 
nwp
Good UI would not disable the selections and instead tell the user that support for that platform is not installed, ask if they want to install it and start the installer if the user confirms.
 
user92578
Yup, just replace the "Make build" button with an "Install platform support" button
 
this looks good
I have to re-install unity?
 
user92578
No, theres probably something somewhere that just lets you add components to the installation
 
11:34 AM
hmmmm
 
nwp
Running the installer and adding a checkmark should do the right thing.
 
ok
@nwp which installer do I run?how I got unity was I used the unity hub then downloaded the actual unity but reinstalling the unity hub doesnt have the options
 
omg thanks so much
 
user92578
"unity install linux build support" -> 3rd link
 
11:41 AM
ye
@Tyyppi_77 you can post that answer on the question gamedev.stackexchange.com/questions/184230/… so i can give you more reputation and make it the answer
 
@Tyyppi_77 yes, I think so too, but it still would be more prudent to test it on the target platform before uploading it!
 
yes
its still downloading the build setting
but i will test it soon
 
user92578
I'm not actually sure what you were initially asking, but I can post this as an aswer if this solves what you asked
 
nwp
Building outside of the VM might still be worth it. Assuming building takes more resources than running.
 
I was trying to export a build for linux
@Tyyppi_77 I was trying to export a build for linux
I keep forgetting to reply
 
user92578
11:44 AM
The question to me reads "I exported a Linux build, but a customer said that the game doesn't work on Linux"
 
user92578
Replies are usually unnecessary when there aren't multiple conversations going on at the same time :)
 
yes
oh ye i earned the vote up privelage
only 35 more rep till i can comment
 
user92578
I liked gaining rep in the beginning, the next goal always seemed nice and accessible
 
user92578
Now I need 4.3k till the next one :D
 
rip u
gl
 
12:14 PM
@Tyyppi_77 I realized that applying to a mod election helped a lot in gaining privileges :p
 
 
1 hour later…
1:32 PM
@Tyyppi_77 Yeah. Even though StackExchange is already my favourite RPG to grind, they could still use some game design love in the progression system...
 
user92578
Luckily I can copypaste Unity docs and get a nice +45
 
Yeah, sometimes I wonder if I should change my job title to "professional Googler"
3
 
 
2 hours later…
user92578
3:55 PM
@nwp How do you handle resources with your message bus? I implemented a wrapper over std::queue<std::function<void()>>, and things work fine until I need to move an allocated std::unique_ptr<World> into the function that is invoked on the UI thread, so that the allocated World can get assigned into the correct member, as the wrapping lambda now becomes a move-only type which can't be stored in a std::function?
 
user92578
I solved the issue by releasing the unique_ptr into the lambda capture, and then unique_ptring it again at the start of the lambda but this feels extremely dirty
 
user92578
The high level idea here being that a thread does make_unique<World> (the expensive bit), and then it is safely assigned into the owning classes std::unique_ptr<World> m_World once ready by pushing a lambda that does the assignment into the message bus
 
user92578
5:47 PM
yeah man ugh i am in unique_ptr hell
 
:o
My uninformed guess is that you're using unique_ptr for something it's not meant for.
 
user92578
I have too many nested levels of stateful lambdas, most move-capturing which makes me feel like this "simplification" of avoid std::future is a very bad idea
 
user92578
Input recordings are huge so I want to avoid copies as much as I can
 
6:03 PM
Why are you trying to avoid std::future? I mean, I probably would, I'm just wondering what your specific reason is.
 
user92578
Well I was looking for a pattern of avoiding the duplication of the future and then the actual storage for the data once the future has been filled, and nwp suggested yesterday a message queue pattern, where I queue code the be executed in sync on the main thread which fills the role of the future
 
ah ok
I think I get that.
 
user92578
In theory this seemed really nice, just assigning to a class member inside a lambda, and throwing that lambda onto the queue
 
user92578
But this is turning out to be a nightmare in terms of keeping the data alive until the assignment
 
sounds ugly
 
user92578
6:15 PM
Hmm fixed compilation errors, doesn't seem to crash, but this for sure feels ugly
 
:D
 
user92578
SO mod in chat monkaS
 

« first day (3627 days earlier)      last day (1378 days later) »