Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411488 Posts in 69371 Topics- by 58427 Members - Latest Member: shelton786

April 24, 2024, 01:15:18 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 231 232 [233] 234 235 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 738649 times)
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4640 on: October 24, 2014, 03:11:38 PM »

hahahahah, I can certainly relate
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4641 on: October 24, 2014, 03:31:05 PM »

Yeah, it's ridiculous how often this happens.

I'm running my app through gDEBugger and getting an access violation on my glDrawArrays call.  Which is silly since I've loaded three vertices and I'm drawing three vertices.  It's an extremely simple test program, and I can't understand why it's running but not drawing when run directly and crashing when run through the debugger.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
tjcbs
Level 1
*


View Profile WWW
« Reply #4642 on: October 26, 2014, 04:17:16 PM »

I hate it when people use the phrase "code smell". It is so fucking obnoxious. I always picture an awful, deeply pretentious programmer sticking his long nose in the air and sniffing. It's made worse by the fact that half the time these "smells" are perfectly fine, and its just some jackass pretending his stupid ideology is some kind of absolute.
« Last Edit: October 26, 2014, 05:01:16 PM by tjcbs » Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #4643 on: October 26, 2014, 07:37:11 PM »

I hate it when people use the phrase "code smell". It is so fucking obnoxious. I always picture an awful, deeply pretentious programmer sticking his long nose in the air and sniffing. It's made worse by the fact that half the time these "smells" are perfectly fine, and its just some jackass pretending his stupid ideology is some kind of absolute.

The entire point behind the concept of "code smell" is to investigate each to see if it's more than just a smell. That said, I've met plenty of people who skip the investigating and immediately assume the worst.
Logged
tjcbs
Level 1
*


View Profile WWW
« Reply #4644 on: October 26, 2014, 10:32:06 PM »

The entire point behind the concept of "code smell" is to investigate each to see if it's more than just a smell. That said, I've met plenty of people who skip the investigating and immediately assume the worst.

Hah, you're right, I I guess I missed the point. I took noun-form "smell" to be similar to noun-form "fail", which was irritating to me. But it does seem like people use it that way, as you say.
Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #4645 on: October 27, 2014, 10:09:37 AM »

The run loop code I've been using on Mac OS X for years is suddenly only capable of giving me 30 FPS when running in a window, even when running a game that's not taxing in the slightest, and even with vsync off. There's some major inefficiency or timing issue somewhere in here, but I've already eliminated several possible culprits with no change in behavior. I'm at work now so I can't keep poking at it, but it's going to be bugging me all day...
Logged

oahda
Level 10
*****



View Profile
« Reply #4646 on: October 27, 2014, 10:17:04 AM »

Literally.
Logged

oodavid
Level 8
***


Discombobulate!


View Profile WWW
« Reply #4647 on: October 27, 2014, 10:43:36 AM »

harumph - cross-platform data persistence is a cockhead
Logged


Button up! - Out on Android and iOS

latest release: 13th March 2015
shellbot
Guest
« Reply #4648 on: November 03, 2014, 11:41:48 PM »

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed
Logged
oahda
Level 10
*****



View Profile
« Reply #4649 on: November 04, 2014, 12:41:18 AM »

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed
Make sure you post your own solution on StackOverflow so that others can find it in the future!
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4650 on: November 04, 2014, 11:15:06 AM »

You mean like mp3's?

I think it's on the safe side to assume a sound library doesn't handle compressed files unless the docs say so.


That's a bit of an issue with Haxe. Windows targets need wav's and flash targets need mp3's. You have to do a little preprocessor stuff to get around it.
Logged

shellbot
Guest
« Reply #4651 on: November 04, 2014, 11:36:29 AM »

You mean like mp3's?

I think it's on the safe side to assume a sound library doesn't handle compressed files unless the docs say so.


That's a bit of an issue with Haxe. Windows targets need wav's and flash targets need mp3's. You have to do a little preprocessor stuff to get around it.

Oh I wasn't aware of that. I haven't worked with sound much on any of my projects before. Next time I'll be sure to check the docs first.

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed
Make sure you post your own solution on StackOverflow so that others can find it in the future!

I would but all the threads are from years ago Shrug
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4652 on: November 04, 2014, 01:46:05 PM »

You mean like mp3's?

I think it's on the safe side to assume a sound library doesn't handle compressed files unless the docs say so.


That's a bit of an issue with Haxe. Windows targets need wav's and flash targets need mp3's. You have to do a little preprocessor stuff to get around it.

Oh I wasn't aware of that. I haven't worked with sound much on any of my projects before. Next time I'll be sure to check the docs first.

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed
Make sure you post your own solution on StackOverflow so that others can find it in the future!

I would but all the threads are from years ago Shrug


It's ok to still post your findings.

This comic is relevant

Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #4653 on: November 04, 2014, 02:32:49 PM »

The run loop code I've been using on Mac OS X for years is suddenly only capable of giving me 30 FPS when running in a window, even when running a game that's not taxing in the slightest, and even with vsync off. There's some major inefficiency or timing issue somewhere in here, but I've already eliminated several possible culprits with no change in behavior. I'm at work now so I can't keep poking at it, but it's going to be bugging me all day...

Update: I spent a whole week on this problem before half solving it, and eventually giving up on a complete solution. I wrote this diagnostic test app in case anyone wants to try: http://ludobloom.com/temp/framegraph_stem.zip

Each sample in the graph is the length of time it took to draw the previous frame. V to toggle vsync, alt-enter or cmd-ctrl-F to toggle fullscreen, 0-9 to change the graph scale (0 is auto-adjusting, 1-9 cover ranges of n+1 ideal 60hz frame intervals).

I updated from OS X 10.9 to 10.10, and it improved windowed performance with vsync on quite a bit (40 -> 60 FPS with the window maximized), but an issue that persists is input events causing frame time spikes. The root of this problem runs pretty deep: When I ran the app under Instruments, I caught the event polling API talking to WindowServer while WindowServer was blocked on the GL driver, seemingly waiting for a buffer swap. Once it actually returned the event to my code, after processing it and drawing, I'd of course missed vblank and had to wait for *another* buffer swap. Modifier keypresses and mouse movement under some circumstances seem to trigger it in particular. The problems I observed seemed more severe on my computer than on anyone else's who tested it, so hopefully I'm the odd one out and most people's performance will be OK.
Logged

SuperDisk
Level 2
**



View Profile
« Reply #4654 on: November 04, 2014, 07:38:57 PM »

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed

This isn't true; MP3 support is flaky, but it has full OGG support, and that's better than MP3 in every way (Including filesize).
Logged
shellbot
Guest
« Reply #4655 on: November 05, 2014, 12:51:05 AM »

Did anybody know that pygame only plays uncompressed sound files?! Because apparently only the people who MADE pygame know that pygame only plays uncompressed sound files. Nobody on StackOverflow even mentioned this. It took me 3 hours to learn that I have to convert all my files...

I guess it's my own damn fault for not reading the documentation more carefully Lips Sealed

This isn't true; MP3 support is flaky, but it has full OGG support, and that's better than MP3 in every way (Including filesize).

Sorry I should have been more specific. Pygame only plays OGG and uncompressed WAV files. All my sound files are WAV
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #4656 on: November 05, 2014, 01:24:11 AM »

Convert them to oggs then. ogg vorbis is compressed.

@superdisk - "every way" leaves you open to issues like lacking hardware decode support fwiw Smiley I'm very pro-ogg but superiority is a relative thing.
Logged

shellbot
Guest
« Reply #4657 on: November 05, 2014, 12:39:14 PM »

Convert them to oggs then. ogg vorbis is compressed.

@superdisk - "every way" leaves you open to issues like lacking hardware decode support fwiw Smiley I'm very pro-ogg but superiority is a relative thing.

But I've heard that ogg has a worse quality than wav. At this point I don't need the sound files to be compressed, so I would rather the higher quality that wavs provide. Unless I was misinformed and oggs are the higher quality option. I've never worked that much with sound before so this is all new to me.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #4658 on: November 05, 2014, 01:31:05 PM »

Quote
But I've heard that ogg has a worse quality than wav
Not true.

wav's are lossless so what you say is literally true - mp3 and ogg are worse quality than wavs. However, this is not a practical concern. Quality level is a setting when encoding oggs and mp3s, and both can be set to have indistinguishably good quality while still being many times smaller than wavs.
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4659 on: November 05, 2014, 05:40:40 PM »

Pretty much every compressed format except FLAC has worse quality than WAV, it's inherent to lossy formats =P In practice you won't notice any difference when listening unless 1) you're an audiophile or 2) you overcompressed the file (and how much you can afford to compress depends on the sound). On the flipside, the filesize will thank you.
Logged
Pages: 1 ... 231 232 [233] 234 235 ... 295
Print
Jump to:  

Theme orange-lt created by panic