Jump to content
  • Advertisement

SuperVGA

Member
  • Content Count

    739
  • Joined

  • Last visited

Community Reputation

1135 Excellent

About SuperVGA

  • Rank
    Advanced Member

Personal Information

  • Role
    Concept Artist
    Creative Director
    Programmer
    Technical Director
  • Interests
    Art
    Audio
    Business
    Design
    Production
    Programming
    QA
  1. SuperVGA

    Funky GLSL Linker Error

    Sorry for the trouble everyone. It was in deed my loader which messed up. More specifically, it was my fs utility function to read files into strings. I did blindly follow some advice, and everyone who might come across this: do not trust tellg() to deliver the size of your files! https://stackoverflow.com/questions/22984956/tellg-function-give-wrong-size-of-file/22986486#22986486 My buffer was too big, and the dirty part of it ended up containing this [], which curiously enough was always found near the last line of the shader source.
  2. Dear TexasJack, If you're new to programming and have a passion for image processing, I'd advise you to start with python. Install it, put python.exe on the path and go through a few easy examples first. Get comfortable with the python language (I recommend this, but if you're impatient - I get it) Image manipulation using a good library is often very easy (at least when you're not starting out with advanced image manipulation and real-time graphics) but it still gets somewhat tougher if you've never gotten comfortable with the language. Then get the pillow library (it's easy with pip, which is the package manager for python) Look at all the pillow tutorials. I've found pillow very useful for mass image processing down to pixel manipulation. I'm sure it can do most of what you're looking to do. And so what if it's not ultra-fast: It's a solid, easy start. Ping me if you need a hint or two. I'm not going to pretend I didn't dive right into the deep end myself, but I think this is might quickly get a little difficult.
  3. Hi Everyone, It's been a while - I've been keeping myself busy with some less gratifying aspects to prevent me from playing too much with the unfinished product, then not knowing where to go next. I suppose we all learn as we go... So a few years back, I was so sure I nailed (tesselation) shaders. Obviously, I had just gotten lucky. I did things different back then - somehow I managed to get a 410 core tesselation shader working. I'm already suspicious of my Shader Loader class, because I can't for the life of me find anything wrong with my shaders. I'll proceed to refactor my Shader Loader now, but perhaps I'll upload that if you agree that my shaders are OK, and that I'm not going crazy... Vert #version 410 core in vec4 position; in vec4 color; uniform mat4 model; uniform mat4 view; uniform mat4 projection; out vec4 position_tc_in; out vec4 color_tc_in; void main() { position_tc_in = projection * view * model * position; color_tc_in = color; } TesC #version 410 core in vec4 position_tc_in[]; out vec4 position_te_in[]; in vec4 color_tc_in[]; out vec4 color_te_in[]; layout (vertices = 4) out; void main() { position_te_in[gl_InvocationID] = position_tc_in[gl_InvocationID]; color_te_in[gl_InvocationID] = color_tc_in[gl_InvocationID]; if(gl_InvocationID == 0) { gl_TessLevelOuter[0] = 4.0; gl_TessLevelOuter[1] = 4.0; gl_TessLevelOuter[2] = 4.0; gl_TessLevelOuter[3] = 4.0; gl_TessLevelInner[0] = 8.0; gl_TessLevelInner[1] = 8.0; } } TesE #version 410 core in vec4 position_te_in[]; in vec4 color_te_in[]; out vec4 color_f_in; layout (quads) in; void main() { float u = gl_TessCoord.x; float v = gl_TessCoord.y; vec4 a = mix(position_te_in[1], position_te_in[0], u); vec4 b = mix(position_te_in[2], position_te_in[3], u); gl_Position = mix(a, b, v); vec4 ca = mix(color_te_in[1], color_te_in[0], u); vec4 cb = mix(color_te_in[2], color_te_in[3], u); color_f_in = mix(ca, cb, v); } Frag #version 410 core in vec4 position_te_in[]; in vec4 color_te_in[]; out vec4 color_f_in; layout (quads) in; void main() { float u = gl_TessCoord.x; float v = gl_TessCoord.y; vec4 a = mix(position_te_in[1], position_te_in[0], u); vec4 b = mix(position_te_in[2], position_te_in[3], u); gl_Position = mix(a, b, v); vec4 ca = mix(color_te_in[1], color_te_in[0], u); vec4 cb = mix(color_te_in[2], color_te_in[3], u); color_f_in = mix(ca, cb, v); } The error assets/shaders/terrain failed to link: Tessellation control info ------------------------- 0(23) : error C0000: syntax error, unexpected '[', expecting "::" at token "[" (0) : error C2003: incompatible options for link This doesn't lead me to think the shader loading code is wrong, since it actually references a line in my tessellation shader. It's just that I don't think it's making a lot of sense. This is why I think my loader might be wrong, I just think it's really strange that everything here works if I remove the color part. I've spent a lot of time thinking it was the wrong way to pass a vertex attribute through the tessellation stages, but it doesn't really seem incorrect. Many thanks in advance! Best - Svga
  4. It's tough to make a game engine. Since you're already hell-bent on this, my advice is: Think of one basic game that you'd like to use on the engine, aim for that. Implement the game, then generalize all the components, tear away the game-specific stuff. Use your general components to implement a more complex version of the game, incorporate scripts etc outside the engine itself. Don't focus on the rendering part until last (I personally get distracted and play around with physics and lighting for months, when I should be doing other, more fundamental things)
  5. SuperVGA

    OOP is dead, long live OOP

    Thanks, aside from the organizational advantages I never considered the build-time benefits of this before.
  6. Ah, right. Yeah, I don't think it's something that requires a whole lot of thought either, so it's fair enough. Mostly I was just puzzled as to why the paper didn't reference it.
  7. SuperVGA

    Daily Bonus Logic

    I think it was Need for Speed: World which had me coming back. (And I hated it - really felt addicted and I felt a bit dumb for doing it, even if the rest of the game was good) One would need to do a daily task. I think it mostly involved driving around in an area of the city, to collect crystals floating over the street. Once 25 (?) had been collected, that was it for the day. A little one-time bonus, a "days-in-a-row" sort of bonus was also given. But I was going for this, Audi Quattro I think it was, special car, that required me to do this for 150 days IIRC. On day 80-something, I went to on a long weekend trip and, yeah - bummer. 😕
  8. It's interesting that neither this thread nor the linked paper mentions it: I'm convinced this is just a 3D bresenham implementation. (credit where due) Back in early 2010, I played around with implementing bresenham in a fragment shader working on a volume texture, and it actually did pretty good. It's sort of a nice way to avoid using polygons, if you're into that sort of thing, but it was a little too much branching for my GPU at the time...
  9. SuperVGA

    OOP is dead, long live OOP

    Isn't it still good C++ practice though to keep free functions in a namespace or even within a class, as static functions? I have gotten into the habit of starting to implement every member function as static, and if I discover that using the interface is sufficient, I reevaluate its placement - otherwise I turn it into an ordinary instance member function.
  10. SuperVGA

    God Help Me, I'm Making A Tactical RPG

    Since you've already had some luck with Game Maker, I'd say return to that, see how much you can do. I promise you it's possible to do an isometric map in GM as well - I think your issue in that regard is that you wouldn't know how to work with isometric coordinate systems and tiles - but read an article on it. Check these. Since you're coming from the design angle, then I think the most valuable and important bit you can create now is a design document for your first working prototype. Be concrete about what your game is supposed to do. Describe everything and use it as a bible when working on your project. It's cool to dive in to larger engines and programming languages, but if you can start with *anything* you're comfortable with, I'd say do that. There's some learning associated with making a game either way. And It will be a rocky road too. (Nice portfolio btw - I suppose you're making all the sprites, tiles and visual novel art for your project?)
  11. Do you really need a global, unique id  here ? What's wrong with a 32bit or 64bit application unique id ? It would be a lot faster and would make it even more useful in combination with a hashmap. Looks a little bit like over-engineering to me   Thanks for your input. Yeah, I have been over-engineering. It's probably because I've become so accustomed to these 128bit guids at work that I feel like I should be using those too. But you're absolutely right - less will definitely suffice. I'll moderate this, and overhaul this communicator thing with hashmaps and shorter uids. I only want them to be unique application-wide, after all. 
  12. I currently have  std::map<const guid, CommWrapper >* comm_table;   where guid  struct guid  {   unsigned char d[16];      // Less-comparer for std::map with GUID keys   bool operator<(const guid& rhs) const   {    for(unsigned c = 0; 16 != c; ++c)    {     if(d[c] == rhs.d[c]) {   continue;     }     return d[c] < rhs.d[c];    }    return false;   }   };   But it seems to be way slower than the approach i took before, where i just based the (gu)id on the index the pointer had in a std::vector. for instance truck would be in comm_table[5], and thus its id would be 5.   But I kinda like the idea of using some big, fancy guids. It's just really slow for autonomous inter-instance communication, and I'm wondering if I'm doing it right. Perhaps there's no reason to go this way at all.   Or am i just using a wrong collection?
  13. Wow, the article describes one technique. I wouldn't call it modern, either.   You could explain GPU raycasting, polygon aided raycasting, different approaches to approximate or truncate isosurfaces, so why is MC getting all the love?   And I'd mention metaballs in connection with explaining scalar field polygonization, but perhaps that's just me. Also, here the scalar field is described as "our voxels" - I'd say it's a bit more than that.
  14. SuperVGA

    Geometry Clipmap Question

    I'm back! Thanks Funkymunky, that did in fact help. I ended up understanding it, but before I sat down to rewrite some things, I discovered that I would eventually have to deal with a patented approach, a Geoclipmaps apparently is.   So I went back to sort of a compromise. I do classic LOD chunks now, but baked into a single mesh, where every verex has its fp LOD value set as one of its attributes. The cool thing about this is that i can use euclidean distances rather than manhattan or chessboard distances, and that I get a seamless result, as I lerp the LOD values downward towards the next chunk (which requires it's sample LOD to match its mesh density or be coarser.)   I now have [attachment=19009:standardlod.png]   ... And I'm now at the point where I'm actually considering applying a modulo equal to the highest density -quads, rather than using modulo of a chunk size. (here, the chunk size is constant, only the density changes) This causes obvious but smooth vertex scaling in the distance, which I actually like. Viewing with the wireframe on also makes it more obvious.   I think I've managed to do a fair settlement, but you're welcome to input on the approach, of course! :)
  15. SuperVGA

    Geometry Clipmap Question

    Ah, the only thing I meant by slide was the movement relative to the eye, before the modulo bit resets the positions of the vertices. I see how that was a weird term to use.   I've read so much and re-coded so much of this that I think I need to take a break. All this talk about grids is weird, when they are not really complete. I somehow fail to comprehend why I should use an odd number of cells in the "grids". Also, is it supposed to be the innermost grid that's 2^n -1, or the surrounding ones?   Anyways, thanks for trying to help out. I thought I got it, but it appears that I didn't really do it how it's supposed to be done. And now I'm sorta stubborn to learn the "right" way. :)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!