Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411582 Posts in 69386 Topics- by 58445 Members - Latest Member: Mansreign

May 06, 2024, 02:29:50 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 233 234 [235] 236 237 ... 279
Print
Author Topic: The happy programmer room  (Read 679335 times)
Photon
Level 4
****


View Profile
« Reply #4680 on: April 12, 2017, 08:36:30 AM »

Pffffffffffffffffffft.

Sometimes I write code in a very specific spot but then I realize later I need to delay its execution briefly. However, sometimes there are several different snippets that all have transition periods or "delays" for the same reason. Instead of executing the transition and then trying to remember which place I need to hoop jump back to, I realized that I could just wrap the snippets in local nameless functions and store them off for the transition code to use post-execution:

Code:
this.transition_func = function() {
    // Do post-transition stuff
}

Just wrap the code pretty much right where it is, and doing it this way keeps the class interface from getting clogged up with one-off functions.

Sometimes its the little things that make me giddy. Giggle
Logged
JWki
Level 4
****


View Profile
« Reply #4681 on: April 13, 2017, 12:01:43 AM »

Quote


So I don't think I've made a complex enough project to encounter the performance loss but in the case of Unreal are you saying if the game needs to draw a frame the entire editor needs to be redrawn?

Around 2011ish I was working on some facial recognition software using Qt and I remember having that exact problem where the video feed (opencv surface) would cause the entire program to refresh when it re-drew itself. I THINK I solved it somehow but I cant remember how (maybe I popped out the window or something).

Nah they cache ui sections so they don't redraw every frame, but as game and editor run in the same process, if the game runs slow, the editor becomes less responsive.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4682 on: April 13, 2017, 04:09:29 AM »

Ah I see. I imagine in some ways that simplifies things. If the UI was responsive and had a greater update rate I'd imagine there's a lot of IPC blocking you would have to do so that something like creating an object happens at a valid time.
Logged

oahda
Level 10
*****



View Profile
« Reply #4683 on: April 13, 2017, 05:16:04 AM »

Wouldn't a game taking up a lot of system resources slow the editor down as a result of slowing down the entire computer anyway? And wouldn't the game be running in a separate thread anyhow?
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4684 on: April 13, 2017, 02:57:12 PM »

Wouldn't a game taking up a lot of system resources slow the editor down as a result of slowing down the entire computer anyway? And wouldn't the game be running in a separate thread anyhow?

It's so rare to see a game really use more than a few cores so I wouldn't expect a game to really take down an entire system.

Good point on the game running in a separate thread though. Not sure about that.
Logged

JWki
Level 4
****


View Profile
« Reply #4685 on: April 13, 2017, 07:47:46 PM »

Wouldn't a game taking up a lot of system resources slow the editor down as a result of slowing down the entire computer anyway? And wouldn't the game be running in a separate thread anyhow?

It's so rare to see a game really use more than a few cores so I wouldn't expect a game to really take down an entire system.

Good point on the game running in a separate thread though. Not sure about that.

Not even comparable. Also with both in the same process, eventually they have to commit render commands on the same thread unless they don't share a rendering device, and the more you split them in code the more sense it makes to split the actual code.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4686 on: April 14, 2017, 07:08:50 AM »

Ah yeah, I forgot about the single threaded nature of the renderer.

So all this stuff about vulkan and DX12+ where you can build up multiple render contexts on different threads. Does that help these kinds of situation at all or do they ultimately have to converge and be submitted from the same thread? That is to say the main advantage is just that you can build them up on separate threads? Or is my understand just way off?

I've only ever worked with OpenGL so my only experience is dealing with the whole global state machine way of thinking.
Logged

JWki
Level 4
****


View Profile
« Reply #4687 on: April 14, 2017, 08:11:55 AM »

Yeah you have to submit command buffers on a single thread so you have a merging stage.
Logged
oahda
Level 10
*****



View Profile
« Reply #4688 on: April 14, 2017, 10:15:24 AM »

Got OpenGL in there as well. c:

Logged

JWki
Level 4
****


View Profile
« Reply #4689 on: April 14, 2017, 11:52:58 AM »

You're sure having fun with QT.
Logged
oahda
Level 10
*****



View Profile
« Reply #4690 on: April 14, 2017, 01:50:42 PM »

I am! Found a node editor now too. :d

https://github.com/paceholder/nodeeditor

Logged

JWki
Level 4
****


View Profile
« Reply #4691 on: April 15, 2017, 09:50:20 AM »

Just for fun you can try to embed your existing engine/game executable in a QT widget in your playaround project. It's pretty easy to do with QT.
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #4692 on: April 15, 2017, 10:09:52 AM »

I gave myself a headache trying to get a python imaging library to work because I wanted to do a quick analysis of a palette coverage and then I realized, oh wait - I can use my gamedev library I've been working on for this

it feels stupidly satisfying to use this library to do stuff, I've been working on it for just about a year now and it's amazing

https://gist.github.com/pineapplemachine/d8fe2e28becededb27cdf76e02dcf526

it turns palette images like this one



into coverage images like this one



the above image is just a slice from the whole but you can see how light and dark areas indicate how close a color in the above slice is to the nearest color in the palette
Logged
oahda
Level 10
*****



View Profile
« Reply #4693 on: April 15, 2017, 10:18:37 AM »

I think I understand what it does, but I'm not sure why. Is it meant to be passed into shaders?
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #4694 on: April 15, 2017, 01:50:55 PM »



Not gamedev related, but I decided to put my wip graphic editor on github.

Gamedev related:

TinyCThreads seems nice!
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #4695 on: April 15, 2017, 02:02:04 PM »

I think I understand what it does, but I'm not sure why. Is it meant to be passed into shaders?

I'm working on something clever (i.e. contrived) that does involve shaders, but mainly the point was to get an understanding of what color regions a palette I was working out was weakest in. in short I want to use a single texture sampler to encode multiple colors by storing a color in each channel.

I've been tweaking it and testing it out on some images, all these use the same 256 color palette




« Last Edit: April 15, 2017, 02:13:47 PM by Pineapple » Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #4696 on: April 16, 2017, 01:00:39 AM »

I think I understand what it does, but I'm not sure why. Is it meant to be passed into shaders?

I'm working on something clever (i.e. contrived) that does involve shaders, but mainly the point was to get an understanding of what color regions a palette I was working out was weakest in. in short I want to use a single texture sampler to encode multiple colors by storing a color in each channel.

I've been tweaking it and testing it out on some images, all these use the same 256 color palette

This is nice :D what color model are you using for color approximation? RGB/LAB/CYMK?


So... I always have a big fight with OpenGL versions. Not just that some functions are available in some and not available in others, but also because I'm always worried about which version would be more accessible. I put an end on this doubt.

I found this page of Intel HD Graphics Cards (same as mine, integrated), and the 3rd generation support until OpenGL 4.0, which is good enough for me. I will be targeting the OpenGL 3.3 :D

Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4697 on: April 16, 2017, 03:25:31 AM »

So... I always have a big fight with OpenGL versions. Not just that some functions are available in some and not available in others, but also because I'm always worried about which version would be more accessible. I put an end on this doubt.

A good reference nowadays when determining a good minimum platform to target:

http://store.steampowered.com/hwsurvey/
Logged
Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #4698 on: April 16, 2017, 03:44:19 AM »

This is nice :D what color model are you using for color approximation? RGB/LAB/CYMK?

RGB, using the color distance function sqrt(0.3 * Δred² + 0.6 * Δgreen² + 0.1 * Δblue²)
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #4699 on: April 16, 2017, 04:59:39 PM »

A good reference nowadays when determining a good minimum platform to target:

http://store.steampowered.com/hwsurvey/

Yup, but I have a feeling that most of steam users have computers with specs above the average (just a feeling). I would like to target average computers too (like mine).

RGB, using the color distance function sqrt(0.3 * Δred² + 0.6 * Δgreen² + 0.1 * Δblue²)

Nice. I don't recognize the algorithm, but seems to take differently each component, which is good, since these have different intensity.


Well... I got my own implementation of matrix operations working:



I'm multiplying each vertice before sending to the shader. I need just to send the projection matrix to the shader, now.
Logged

Pages: 1 ... 233 234 [235] 236 237 ... 279
Print
Jump to:  

Theme orange-lt created by panic