« first day (2607 days earlier)      last day (2710 days later) » 

user92578
09:57
I'm having way too much trouble figuring out this sprite flipping thingy
user92578
I'm able to flip the sprite but it also messes with the frame
user92578
10:13
Finally! Idiot me was combining translation and scaling into a single matrix where the solution was to keep those separate
10:33
Yo!
user92578
Hey! You found the right chat!
user92578
How are you doing?
I am good. I am thinking about telling you something about my game.
user92578
Please do, it's always interesting to hear about other people's projects!
It is a 2D action-adventure platformer made using C++ and SDL 2. It is not as 'pixely' as yours but not too good either.
What is really great about it is it's STORY.
user92578
10:52
Cool! How are you liking SDL2 for your project?
Actually, SDL 2 is not a proper game engine. It is a DEVELOPMENT LIBRARY. So, I would prefer Unreal 4 more.
Do you like SDL 2?
user92578
Yeah I really like it, it's nice and easy to use but offers a lot of things that can be done with it. I really enjoy programming so I rather setup my own game framework instead of using an engine.
user92578
The rendering in SDL2 is a little limited though, and that's why I'm currently in the process of porting my renderer to use OpenGL instead.
Okay. So, I really need help about icons. How do you use the SDL_SetWindowIcon function?
user92578
SDL_Surface* windowIcon = IMG_Load("PathToIcon.png");
SDL_SetWindowIcon(m_Window, windowIcon);
SDL_FreeSurface(windowIcon);
11:01
Thank you.
How do you like Finland?
user92578
I really like it here, free education is amazing.
I love the natural beauty of Finland. It's amazing.
 
2 hours later…
user92578
12:35
Aww yeah text rendering is back!
12:57
Anyone versed with LWJGL and its many wrappers..?
Sweet, I just pushed a Q on loading images with stbi and getting them into java memory - if you can help you'd spare me an afternoon of try-and-error
14:01
@dot_Sp0T Why do you use a library for C(++) if you use LWJGL?
@Bálint I'm using the LWJGL3 bindings to the library. Because LWJGL doesn't do image loading by itself. And AWT image loading is convoluted.
You know about slick utils right
@quartata I know about Slick2D, assuming you mean that. But iirc slick is LWJGL2 & mostly deprecated.
PNG decoder?
Still, LWJGL is for java, stbi is for C(++), so they aren't really compatible
@dot_Sp0T sorry didn't realize you were using 3
What problems were you having with ImageIO?
14:11
@Bálint LWJGL3 contains STBI wrappers that return a bytebuffer holding an unsigned char * (uchar pointer) to the memory structure allocated by stbi that in turn can be used with LWJGL3 opengl bindings.
@quartata Trying to get the actual bytedata out of the memory allocated by stbi and into memory managed by the JVM
I usually enjoy digging deep and doing low-level stuff - but I do not enjoy writing JNI code..^^
I meant the AWT ImageIO, but you won't be able to do that. You have to tie its lifetime to a Java object:
AWT imageIO requires AWT to run at least in headless mode if I am not mistaken. It seems so much overkill compared to using a simple lib like stbi
javax.imageio isn't really a part of AWT
It uses the BufferedImage classes from AWT is all
anyways I did a google and it says that ByteBuffers usually are GC'd normally if you clear them
class ImageBuffer { ByteBuffer blah ..... @Override public void finalize() { <cleanup buffer> } } is the kind of thing I'm envisioning
when the Java object dies the buffer dies with it
Yeah, ByteBuffers get properly GCd even if you use the allocateDirect() function to create one. The issue is that what is contained in the ByteBuffer returned from the wrapped stbi function is not the image-data but native pointer to it. What I am trying to get is access to the actual data..
I could in that case use javax.ImageIO but I still feel like there should be some way to do the other thing as well :/
14:26
You mean it's like a singleton array with the address?
Well that's...
it's more like a byte[] containing a memory address
which is fine by itself, you don't really need to be able to access the image itself for most use-cases
But it feels like there must be some easy way I am not seeing
gamedev.stackexchange.com/questions/148812/… bumping my own question any ideas guys ?
IIRC you can use reflection to make a buffer's address field public and then set it to point wherever
that's a hack for sure
quick Google tells me there's sun.misc.Unsafe but no guarantees if it's available in all implementations
it's a hack but might be a valid solution. Could point the address to the address I have, then pipe the data through java into a new buffer that might still be in external memory and then I could free the stbi allocated memory with the stbi function that might do additional stuff I don't care about. Guess I'll look into that then
Unsafe.getByte(address);, you'd have to do pointer arthimetic though
14:33
@UriPopov I have no idea how unity does its thing - but did you have to use some unity functionality to add IAP etc to the project in the first place? In that case Unity might be setting a flag or similar that is checked when building.
@quartata pointer arithmetics is fine - there's worse tings happening in the world every day
Well yes I did use the unity IAP but I removed it from the code. The thing is unity automagically builds the android manifest by merging your manifest with it's own and adding stuff
The better question is does Oracle's JVM have it
OpenJDK does
@quartata iirc OpenJDK is the OraJDK sources minus all the Sun stuff that is still proprietary
I guess I'll repost the question on StackOverflow and kill it on here
Unless a mod could move it for me?
Mods can migrate questions, just use a flag for moderator attention
That'll be the second-ever time I used a flag to get mod attention
15:04
@UriPopov You may be able to remove it manually
@Bálint how ?
like I said in my question the only option seems to be to build the apk trough android studio
Iirc you can open an APK with winrar or 7zip, and if the manifest isn't encoded somehow, then you're able to change it
ah tried that and the manifest reads out like a binary file
it claims to be a xml doc but it was unreadable in both vs and notepad++
Let me check
Yeah, it's encoded somehow
yep :(
but this put me on a new search
yep found the same tool
Look at the second answer
It has more upvotes
that seems to be for only viewing the manifest
15:31
the god damned services tab X_X
it still had IAP enabled
@UriPopov glarnak be praised
glarnak ?
the god of the WorldBuilding stack. I forgot that I'm on the gamedev chat
what should be the god of the gamedev one then ?
Holy Carmack
15:58
Josh is
Josh ?
MARVEL at my amazing pbr textures
@dot_Sp0T oh right that Josh
w00t
I <3 Peanut-Butter-Raisin textures.
16:27
Great. I just broke the GUI clipping code during the code refactoring.
@StephaneHockenhull you can always defactor
yeah ctrl-z it m8
16:54
so a make clean didn't fix it. Gotta go through the diff of 8 files now ..
@UriPopov If you want to choose the one, who "invented" video games, then Holy Higinbotham. If you want to choose the one who arguably had the biggest impact on game developement, then Holy Carmack. If you want to choose it from this SE, then Holy Petrie
/me starts the Molyneux sect of overhyped games.
just realized I never finished B&E 1
@StephaneHockenhull Molynurry
@UriPopov you mean the God-Bowling Simulator, Black & White?
17:03
yes
i have no idea why i wrote e
it's been a long day
@StephaneHockenhull
In the first 15 or so minutes he explains how he got into the game industry
Sorry, only the first 7-8
17:19
did you want to say BG&E?
IMHO every Molyneux games have a great basic concept with huge potential but (other than populous) the execution gets so repetitive within 20mins. Very little depth.

Populous lasts a bit longer with newer elements getting introduced gradually.
They completely skip the part of puzzle dev-ing where you adjust the progress gradation and just call it a day.
It's the complete opposite of a grind-fest MMORPG, except the result is after the first 10 tutorial levels you're left with 190 levels that have absolutely nothing new.
So the grind-fest is all at the tail end
So many of Molyneux games I want to remake and do the progression-grade properly, maybe add a few emergent-meta-gameplay elements.

Which is 50% of the work of deving such game.

But I fear everyone would be "The dude **just** copied the game"...
17:45
That's the gist
yet most modern games are rehashes of old ideas
The mods on here aren't that active, are they?
They are when there's a need.
Not talking about any chat moderation
mods
what mods. It's been 10 years since I've seen a mod
18:15
I'm gonna have to revert my changes and start that refactoring all over.
18:49
I just found the issue. I hate past-me so much right now.
@StephaneHockenhull tell us everything
My copy-to-GPU function had a destination offset but no source offset.

And I forgot about it and used the destination offset as a source offset.
@dot_Sp0T That caused nothing to be copied to the GPU VBOs any time the offset wasn't 0 and so only the first "sprite" in every batch was getting drawn properly.
19:10
interesting, I currently gotta fight with LWJGL assuming everybody wants to use its memoryutil stuff :(
Spoken plainly: I forgot that I cannot use non-direct buffers with that library. And I forgot this because it is an underdocumented issue
non-direct buffers?
Java.nio has ByteBuffers (and subclasses that wrap access into primitive type sizes) that can either be allocated on the java heap or non java memory ; the library requires the latter due to it often just wrapping cpp or c libraries for basic functionalities. If you use the library memory management instead of standard java constructors you do not have to think about that. But if you want to use standard java you need to remember to allocate every single Buffer any library method requests direc
tly using ByteBuffer.allocateDirect(bufferSize) - which you can easily forget, as it is not documented on any of the methods requesting a buffer as parameter
Very little in LWJGL actually can, but usually it rewraps the pointer in a direct buffer for you IIRC
Not entirely sure how that works now that I think about it, maybe it moves the memory
It would've easily been possible to add pre-conditions on these methods to check if the given buffer is a direct buffer. but that has not been done, presumably to save on unnecessary executions
Well I might've inadvertently also fixed the bug that caused me to write the code I spent the last 2h fixing
19:51
GUI clipping fixed. Now I need to add clipping to the game render GUI object
ah riiiiiiiiiiiiight. CreatePresentTextureRenderObject creates a quad and my clipping only supports triangles..
 
1 hour later…
21:20
Say, what use is there for anything but 2D textures? (e.g. opengl's 2d texture array or 3d texture)
3D textures lets you slice through an object or build 3D look up tables.
2D texture arrays are kind of like 3D textures except they don't blend between each other and have independent mip-maps.
so more science-y stuff than game-y?
There are some effects you can do with them, like with 2D texture array you can swap textures on instances.
e.g. damage models
thanks for the quick explanation
With 3D textures you can use for 3D effects. Like displacing/distorting meshes as you move around a room depending on some magic forces or what-not...
Animating wind effects all on the GPU...
So things get distorted when they move into a high wind area. RGB can be a wind direction & strength vector.
It's for some rare advanced stuff so a lot of engines don't support it or if they do, not very well.
A lot of cases it can be done or faked some other way.
21:41
I sort of assumed that it would be used for such things, but then again something names a 3D Texture made me unsure, as its not really anything to do with texturing in the usual meaning :/
Essentially, the polygon slices through that 3D texture and you see that slice.
Would be interesting to see use-cases
and there's one
You can make perfect textures like this ^^^
how is this perfect? I mean in what way
No seams because it's a 3D texture.
It's a 3D bumpmap. No matter what the model is there's no UV seams like with 2D textures.
21:46
Hmm, might be interesting for volumetric constructs then
22:45
One last q tonight for any GL afficionado: glTextImage2D states the following > "Use the GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_RECTANGLE, or GL_PROXY_TEXTURE_CUBE_MAP target to try out a resolution and format. The implementation will update and recompute its best match for the requested storage resolution and format. To then query this state, call glGetTexLevelParameter. If the texture cannot be accommodated, texture state is set to 0.,
what is meant by texture state? I.e. how can I query it to check if it is 0?
 
1 hour later…
23:59
@dot_Sp0T all of them.
GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH, GL_TEXTURE_INTERNAL_FORMAT, etc will all be zero

« first day (2607 days earlier)      last day (2710 days later) »