Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1375218 Posts in 65096 Topics- by 57351 Members - Latest Member: SSoft_boi

April 07, 2020, 09:15:41 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)General thread for quick questions
Pages: 1 ... 66 67 [68]
Print
Author Topic: General thread for quick questions  (Read 64891 times)
InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #1340 on: November 21, 2019, 07:41:25 AM »

Thanks for all the advice! Smiley

I'm kind of looking forward to working on something graphical without using a heavy weight engine.
Logged

qMopey
Level 5
*****


View Profile WWW
« Reply #1341 on: November 21, 2019, 01:19:52 PM »

Just echoing the others -- you can initialize only the parts in SDL2 that you like. You don't need a graphics context, or the audio driver to be initialized, or anything really.

The minimum would be the window and the input system.

Flags for creating a window here, just omit the OPENGL flag: https://wiki.libsdl.org/SDL_WindowFlags
Events here, omit all other flags: https://wiki.libsdl.org/SDL_Init#Remarks

And then it's pretty much a GLFW clone. But with better Steam compatibility and more supported platforms, and more features if you decide to want them later. IMO GLFW doesn't really have a competitive advantage over SDL2, and I think the SDL2 docs are better.
Logged
Schrompf
Level 7
**

C++ professional, game dev sparetime


View Profile WWW
« Reply #1342 on: November 21, 2019, 11:14:08 PM »

Thanks for the infos! This adds a new point to my ToDo-List. Porting to SDL2.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #1343 on: November 22, 2019, 05:43:47 PM »

Looks like I'm gonna give SDL2 a try. I totally forgot I really need audio support since part of the tool is auditioning and editing audio files haha.

Not a fan of having to use Cmake for a hobby project but I suppose it's nearly unavoidable with a project that supports so many platforms. Just gotta make it over the initial build pain then I'm good Smiley

EDIT: Nevermind! They were kind enough to provide a pre-generated visual studio project so all I had to do was hit compile and I'm good.
« Last Edit: November 22, 2019, 05:54:44 PM by InfiniteStateMachine » Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1344 on: November 28, 2019, 07:31:04 AM »

Having an SDL2_net/Android networking issue… Doesn't hurt to ask here too. x:

https://twitter.com/avaskoog/status/1200056426103791616

Quote
Any idea why SDL2_net as client fails (w empty err!) to resolve host on Android device when internet permission is set in manifest and it works fine on e.g. iPhone? Same host+port (did try others too) and DID work last year. New router etc but again does work on iOS…

Given the circumstances I feel like it might be more about settings on the device than anything in my code…
Logged

Daid
Level 3
***



View Profile
« Reply #1345 on: November 28, 2019, 07:42:00 AM »

The SDL2_net code uses gethostbyname to do the lookup, so check hstrerror()?
http://man7.org/linux/man-pages/man3/gethostbyname.3.html

Also, gethostbyname is quite dated. "getaddrinfo" is a much better function, as it gives multiple results for both ipv4 and ipv6.
I have a bunch of code that seems to be much more complete then SDL2_net:
https://github.com/daid/SeriousProton2/tree/master/src/io/network
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1346 on: November 28, 2019, 09:12:10 AM »

Thanks! At least I got an error message now: unknown host. Not a lot but it seemed to have helped me exclude possibilities and focus my searching a bit more and I think I figured it out…

This link describes IP version issues regarding DNS resolution on later versions of Android.

Decided to just resolve the IP on the server and pass that instead of the host name to the client when starting it up (it's for a debug setup on a local network, so the server can just pass it with the command line arguments when starting up the client).

Did the trick anyhow! Tears of Joy
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1347 on: November 29, 2019, 08:45:11 AM »

Got another one…

Trying to get arguments into the Emscripten-compiled web build of my program (argc/argv). Everything I can find online points to adding an array member to the JavaScript Module object called arguments and pushing the values to it and it should work. But… I can't get it to work.

I'm using the shell.html from Emscripten itself, which declares a var Module with some stuff in it. I tried adding the arguments array to that. But my argc remains 0 and my argv remains null. ):
Logged

Daid
Level 3
***



View Profile
« Reply #1348 on: November 29, 2019, 01:35:37 PM »

You sure you set them soon enough? Some module parameters can be set at any time, some must be set before anything else is initialized. (As is common in javascript land, it's badly documented at best)
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1349 on: November 29, 2019, 01:41:45 PM »

I've even tried hardcoding some directly into where Module first gets defined and even those don't get sent in. ):

That is, like so:

Code:
var Module = {

arguments: ['test', 'hello'],

};

I've also tried doing it in prerun(), but no luck there either. The callback itself works fine, as do all the others that I've been using for a long time, what to do on error and so on.
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1350 on: February 07, 2020, 07:36:47 AM »

Am I missing something or does Im3d not have a way to set the size and position of the viewport the way ImGuizmo does, to make it easy to integrate with an editor viewport rather than a fullscreen one?

Also is there any way to check in ImGui if any or the current window/dock is currently being resized (splitter or whatever in drag state), whether the mouse is moving or not?
« Last Edit: February 07, 2020, 09:55:19 AM by Prinsessa » Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1351 on: March 07, 2020, 06:17:37 PM »

SO about hairtech and tracing wrapping space ...

I find this mathematical problem that solve it for a similar problem, but I can't translate it into something I can understand (ie code) Can someone help me? I have been stuck on eon, and I feel like it should be possible lol

https://amininima.wordpress.com/2013/05/27/the-laser-gun/

If I Can get to have that equation properly to trace any primitive, I'm literally almost done!

All I can do is intersect an infinitely small point on the boundary of the space Sad I didn't generalized
Logged

Pages: 1 ... 66 67 [68]
Print
Jump to:  

Theme orange-lt created by panic