Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 07:06:25 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 289 290 [291] 292 293 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 738825 times)
oahda
Level 10
*****



View Profile
« Reply #5800 on: September 15, 2019, 11:34:03 AM »

Is this helpful, Leonard?

https://www.khronos.org/opengl/wiki/Tutorial2:_VAOs,_VBOs,_Vertex_and_Fragment_Shaders_(C_/_SDL)

It's not WebGL specifically but the API is more or less the same AFAIK? Your GLSL #version will need to be different tho (#version 100 es if you're on WebGL 1).
Logged

fluffrabbit
Guest
« Reply #5801 on: September 15, 2019, 12:12:32 PM »

Once you've got the basic tutorial out of the way, bear in mind that a "sampler" is a GLSL function that lets you get the color of a texture at specified coordinates. Your fragment shader has access to coordinates that you can use as input for a sampler. So if you're at screen coordinate (0,0) you want to get the sample at (0,0). If your texture is 3D (volumetric), you want to get the sample at (0,0,Z) where Z is the depth in range 0.0-1.0. Change the value of Z and you visualize a different "slice".
Logged
Daid
Level 3
***



View Profile
« Reply #5802 on: September 15, 2019, 11:06:08 PM »

I'm not going to release my game on Apple machines.
Well, that process seems like a signing process just like android and even windows has these days. Just with less standardized methods and a remote server for extra Apple control.

I'm surprised any developer still develops for Apple devices. Just out the top of my head:
  • You can only develop for apple products with an Mac. No cross compiling for you.
  • Depending on the age of your developer account, you are not allowed to download certain tools. For example, if you account is newer then a OSX release, you cannot download the tools for the previous release. Making backwards compatibility difficult.
  • OSX installations are not all the same. For example, the version of python that is installed by default depends on the base version of the OS that was installed. I noticed years ago that a 10.6 -> 10.7 upgrade had a different python version then 10.7 clean install.
  • Their app store can deny your app all of a sudden, without clear reason.
  • Apple has a tendency to copy features of top selling apps in their next OS update. Spotify is popular, lets push Apple music. Oh, now Spotify is supplying OS functionality all of a sudden, and that's an appstore violation.
Logged

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



View Profile
« Reply #5803 on: September 16, 2019, 09:50:41 AM »

Thanks for the support everyone! I got it to work. Well, almost, haha! There's a bug in the fragment shader but I kinda like it! :D

https://blindedcyclops.neocities.org/beautiful%20fail.mp4
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #5804 on: September 17, 2019, 10:17:52 AM »

Well, that process seems like a signing process just like android and even windows has these days. Just with less standardized methods and a remote server for extra Apple control.

It's a lot worse than that. On Windows, UAC might bug me once the first time I launch an application it doesn't recognize, but it's pretty unobtrusive about it and gets out of my way afterward. A fresh macOS installation with default settings will actively prevent its user from running any application that hasn't gone through this process, which now includes requiring the developer to pay a yearly $100 fee for access to signing and notarization tools. If you don't have $100 to spare, or if you're, say, a teenager without access to a credit card who made some kind of freeware and put it online, every single person who wants to run your application will have to go through extra steps to do so, in a manner which continues to escalate each major OS revision. Presumably, this will also mean that if the developer stops paying the $100 fee (they die, they forget, they move on with their life, etc.), everything they've previously signed with that certificate gets retroactively broken.

This is horrifically bad for the ecosystem and software preservation, on top of Apple's already extreme habits of changing their architecture every few years and breaking existing applications in other ways. If you want to recompile your old applications to keep them running on new systems, depending on how you did things in the first place, get ready for several hours to multiple weeks of work rewriting everything that uses the APIs that Apple has decided to abandon since then, often in favor of something much more complex. This isn't even alleviated by stringently following their recommended best practices. The idiomatic way of doing something one year will often become deprecated a couple of years later, refuse to even compile a year after that, and refuse to even run when compiled another year or two afterward.

  • OSX installations are not all the same. For example, the version of python that is installed by default depends on the base version of the OS that was installed. I noticed years ago that a 10.6 -> 10.7 upgrade had a different python version then 10.7 clean install.

This exact thing happened to me recently - I installed a minor OS update, and the IRC client I've been using for many years suddenly can't launch anymore because of a Python version mismatch.
Logged

oahda
Level 10
*****



View Profile
« Reply #5805 on: September 17, 2019, 10:38:17 AM »

I don't disagree that Apple is bad, but I'm confused right now because I never have to do anything to run people's jam games and stuff than right click and select open to get around the "this is a program from the internet / an unidentified dev" warning and I don't remember ever manually enabling anything special… Currently on High Sierra. Is it new in Mojave or something? Or is my memory just bad and I've changed some setting? Huh? Still seems like right click thing should be the default according to this at least. What'd I miss?
Logged

Daid
Level 3
***



View Profile
« Reply #5806 on: September 17, 2019, 10:57:25 AM »

Or is my memory just bad and I've changed some setting? Huh?
Pretty sure you changed a setting, https://it.nmu.edu/docs/allowing-third-party-applications-install-macbook

I think older versions directed you at that dialog when you tried to open something that wasn't signed. I guess that is no longer the case. But you most likely have this setting set to the "allow all" for a long time. I noticed that most people had this setting on "all" years ago when I bothered with OSX releases.
Logged

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



View Profile
« Reply #5807 on: September 17, 2019, 11:27:02 AM »

I actually don't even have that option, haha. It's currently set to "App Store and identified developers" for me and right click works for unsigned/unidentified apps. Interesting…
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5808 on: September 17, 2019, 02:28:44 PM »

I rarely use python so forgive my ignorance if this is a stupid question :

Is it not a thing for a python app to include the runtime they were built against? Is that maybe not a practical thing to do?
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5809 on: September 17, 2019, 02:43:34 PM »

I rarely use python so forgive my ignorance if this is a stupid question :

Is it not a thing for a python app to include the runtime they were built against? Is that maybe not a practical thing to do?

I would do this and consider it absolutely necessary. Different Python versions break things all the time. Better yet, just don't use Python at all if you can avoid it.
Logged
fluffrabbit
Guest
« Reply #5810 on: September 18, 2019, 01:13:07 PM »

SDL 2.0.10 is now making assumptions about numpad arrow keys which broke my game long enough for the people I sent it to to probably think I'm an idiot. Great job, guys. Keep adding more bloat and experimental features to pull in the babies who are using your library as something other than a context initializer. -.-
Logged
Daid
Level 3
***



View Profile
« Reply #5811 on: September 18, 2019, 09:26:14 PM »

SDL 2.0.10 is now making assumptions about numpad arrow keys which broke my game long enough for the people I sent it to to probably think I'm an idiot. Great job, guys. Keep adding more bloat and experimental features to pull in the babies who are using your library as something other than a context initializer. -.-
Wait? What? Got more details? One of the reasons i am using SDL is that it handles the keyboard pretty well.
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #5812 on: September 18, 2019, 09:52:19 PM »

numpad 4 is left, numpad 8 is up, numpad 6 is right, numpad 2 is down. These are how things are mapped now in SDL, so the number pad is an alternate input source for the arrow keys. I'm pretty sure this is a new thing in 2.0.10, though maybe I've just had num lock toggled or something, IDK. It might have also broken my input code in other ways, IDK. In any case, I am no longer checking the number pad just to be safe.
Logged
Daid
Level 3
***



View Profile
« Reply #5813 on: September 18, 2019, 11:03:31 PM »

But but but... there is "SDLK_KP_0" to "SDLK_KP_9" for those keys? In my experience with 2.0.9 numlock/ctrl/shift/alt do not change the keysym at all.
Also, windows/linux/osx?

I'm not seeing any mention of keyboard changes in the change log:
https://discourse.libsdl.org/t/sdl-2-0-10-released/26429


But I am surprised about this change:
Quote
Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)
As that's an API breaking change in a minor version update. I checked the code, there is no backwards compatibility there...



I'm also not seeing any commits this year on the keyboard related code...
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #5814 on: September 19, 2019, 02:14:27 AM »

I experienced this with Emscripten. Could be a regression, but I suspect the bastards snuck something in intentionally.
Logged
Daid
Level 3
***



View Profile
« Reply #5815 on: September 19, 2019, 03:00:15 AM »

I experienced this with Emscripten. Could be a regression, but I suspect the bastards snuck something in intentionally.
Not seeing changes in the Emscripten handling. Maybe it was a browser update that causes your issue? Or an emscripten compiler update?

The keyCode seems to come directly from emscripten "keyCode" attribute, which is documented as "system and implementation dependent" https://emscripten.org/docs/api_reference/html5.h.html#c.em_key_callback_func
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
fluffrabbit
Guest
« Reply #5816 on: September 19, 2019, 03:28:09 AM »

Nothing with my browser or Emscripten changed. Beyond that, I speculate, with no guarantees, that something in SDL changed, and you are welcome to try before and after the behavior of number pad keys vs arrows between 2.0.9 and 2.0.10.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #5817 on: September 19, 2019, 04:12:16 AM »

Quote
system and implementation dependent

What system are you on? Could also be that you compiler toolchain updated.

(thinking of this because I just ran an update on my Linux laptop and it updated libc and gcc)
Logged
fluffrabbit
Guest
« Reply #5818 on: September 19, 2019, 05:29:48 AM »

I'm on Ubuntu, but I'm running Emscripten in a Docker container, so that did not update. IT'S NOT ME IT'S YOU
Logged
qMopey
Level 6
*


View Profile WWW
« Reply #5819 on: September 19, 2019, 02:00:21 PM »

Just to check something you probably already know about, but did you intentionally keycodes or scancodes, while understanding the difference?
Logged
Pages: 1 ... 289 290 [291] 292 293 ... 295
Print
Jump to:  

Theme orange-lt created by panic