Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. babaliaris

    A good 3D math library in C for OpenGL?

    You are right on that, but still, a dynamic extension is needed for my game which can be implemented with dlls.
  3. Fulcrum.013

    A good 3D math library in C for OpenGL?

    I mean that all your compiled code will not exids 100mb. Anything else is a textures meshes and so on data that stored into separate data files, not into executables
  4. Today
  5. babaliaris

    A good 3D math library in C for OpenGL?

    I'm not sure what you mean, but the 49.9gb will already exist on the user's installation, so I will only send the 100mb dll to the user when he updates the game.
  6. My new project codenamed Red Ribbon will be a 2D platformer with inspirations from Cuphead and Super Mario. I'm looking for some 2D cartoonish artists and animators and level designers to make this project possible. This game's about a cute robot called Qi that has to go through several worlds invaded by evil bosses. These bosses were generated by an obscure portal in the space and Qi must reach that portal to fight the final boss that lives in it. Qi will have several shooting weapons (that will progressively find) to destroy the enemies that he'll find along his way. Also he will be collecting some special big coins (5 for each level) to unlock a secret world at the end of the game. If he doesn't stop all of this the Earth will fall in an endless era of desperation and pain. You can email me at gsoftwares03@gmail.com or you can message me on Discord (Gianmarco#8170).
  7. Fulcrum.013

    A good 3D math library in C for OpenGL?

    So it have at least 49.9gb in datapack and less than 100 mb in executables/dlls.
  8. babaliaris

    A good 3D math library in C for OpenGL?

    The reason I want dll's is for updating mechanisms and moding techniques. If I want to be able to send updates for my game, linking everything to an executable will require on a single change in the code to resend the whole executable to the clients. If the game is 50gb, even the slight change in the code would lead to send that 50gb all over again. With dll's I can just send that particular dll only where the change in the code happened. Also, if I want to support modes, I must give the users a way of extending the game without actually the need to download the whole project. They are going to just include an API which i will provide them, compile their code into a Dll and then just copy-paste that dll into the game directory and the game will automatically load the dll and use the code to dynamically extend the capabilities of the game.
  9. Alex Gomez Cortes

    Problem with Cubemaps

    Hello and thanks for your answer!! I've been looking forward to it but I think it is more than that. I think I have something wrong with the rotations of the camera. Thanks!
  10. GoliathForge

    Change Animation in OpenGL

    The first parameter defines the interval the call will be made. You've specified in no time. (so it may only fire once, not sure on that) Moving on... Here is an example of one way, you could do it. // global access float rotation = 0.f; float step = -2; // inside an update or timer function { rotation -= elapsedTime * 40.f; if (rotation < -90) { rotation = 0.f; step += 1.f; } } // inside your draw callback { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(step, 0, 0); glRotatef(rotation, 0, 0, 1); glTranslatef(0, 0, -5); // so I can see it glBegin(GL_QUADS); glColor3f(1.f, 1.f, 1.f); glVertex3f(-1, 0, 0); glVertex3f(0, 0, 0); // pivot point is already on the side(right bottom) glVertex3f(0, 1, 0); glVertex3f(-1, 1, 0); glEnd(); } I've cheated here perhaps with the arrangement of the vertices. A normal rotation will appear correct the first 90°. What I've chosen to do is only use that range of 0° to 90° and when I reach my rotation, I reset to zero and advance the translation variable I'm tracking. In computer graphics, the goal is to create the illusion with the least amount of background work. Have you considered a modern openGL environment?
  11. hmmm... One idea would be to lerp between face normal in interpolated normal with face normal dot product, so at shallow angles expose low poly mesh but prevent artifacts. I guess this works fine for N dot L, because at silhouettes the real mesh becomes visible anyways. Curious how this would look for integrated lighting over the hemisphere...
  12. Having light rays below the hemisphere is one thing... But this situation can also cause the viewing ray to be below the horizon (so N dot V is negative). Some BRDFs give crazy results in that case, so you have to clamp it to zero... and if you clamp it to zero, you can end up with a weird edge area with flat/cut-off looking shading. (FWIW, both light rays and view rays should be of equal importance because of Helmholtz reciprocity -- swapping L and V in a BRDF should give identical results -- but in practice I've noticed some differences) I'm interested in workarounds too 😅 Simple solution is to just try not to use such low-poly meshes such that the vertex normal vs triangle normal can be extremely different... Also, if you've baked normal maps from a very high poly mesh onto a low poly one, then the normal map will somewhat correct for this issue on the low poly mesh (but at the same time, may also cause the problem...) If you do this for viewing rays, you end up with ugly black regions that show up around mesh silhouettes... And if you do it for light rays but not view rays, you've violated Helmholtz reciprocity (fine for a hacky renderer, not for a film quality offline one).
  13. So I am attempting to implement a basic start to a utility based AI in Unity and I have something that seems to be working and wanted to get any impressions people might have about how I have it setup, all the relevant code can be found here that implements a basic AI for moving and being idle: https://gist.github.com/ryanzec/26fa3558d539f782a2101c241081622c
  14. Start by checking for errors wherever you have SDL calls, especially where you're loading and creating the texture. Check the return value, then call SDL_GetError() if needed. Use the documentation to determine how to properly check for errors; the easiest way is to just type in the function call name in the search box, top left. For example: Your very first call is SDL_LoadBMP. The documentation for this call says that this returns null if there was an error. Thus, check the return value to see if it's null before going continuing on.
  15. fredrick91

    Game engine for a 10 years old

    I'm with "Chillehh", Game Maker 4 through to 7 was my go-to toys when I was 10-14, (mid-2000s). It has some great built-in tools for animation, teaches you about object orientation, (a a simple level), and it just works! I didn't have internet, so I just looked at the samples. The beginner level is mostly putting boxes in order, a great way to learn an visualize the code in your head. Then later on you can learn/teach GLM, the scripting language which mostly does away with all the boxes. You have if-statements, loops and other common things to scripting. Take a look at it, it's(at least was) great! Coding with boxes(visually) Good tutorial: More advanced coding:
  16. VoxycDev

    Dynamic lighting in Fateless

    Dynamic lighting now works in Fateless. There are still no normals and no shadows, but hopefully this will be the necessary breakthrough to make it look from "whack" to "not that bad." Directional spotlights are the next goal. The overall mesh of the buildings and terrain should reflect the skybox, so in this case ambient light should probably be more orange. Get it on Google Play
  17. fredrick91

    A good 3D math library in C for OpenGL?

    I would recommend GLM, since it is made to have similar styntax to GLSL, so you can write your math in the same way; both server-side and client-side. Especially if you enable swizzling, "vec3 v = other.xyz;". It is not a DLL, so no linking required. I'm with "a light breeze" on not dropping C++. It will probably serve you better to work in C++ than C, if you want to make games and work with graphics. There is no need to learn C first and then move on to C++, since the languages grow increasingly distant by each new release. Not sure about C-compatibility though. CGLM seems to be GLM, so I would go with that. https://www.khronos.org/news/permalink/new-optimized-opengl-graphics-math-glm-for-c-feedback-requested https://github.com/recp/cglm Good luck!
  18. VoxycDev


    Album for Fateless
  19. Green_Baron

    A good 3D math library in C for OpenGL?

    I am confused by the term dll as math libraries i think of (vectors, matrixes, quaternions, boudning shapes, rays, collisions, intersections, etc. pp) usually come as header-only files. How about data types and precision that are much easier to implement in C++ (templates) than in C ? Almost all math libs i know, if they are not for pure demonstration purposes, offer that functionality.
  20. a light breeze

    A good 3D math library in C for OpenGL?

    If you're having trouble with DLLs in C++, wouldn't it be a better idea to drop the DLLs than to drop C++? Seriously, DLLs are a huge pain in the ass for basically no benefit. The only time DLLs make sense is when different parts of the project need to be distributed under different licenses. That's a legal reason for using DLLs. There is no technical reason for using DLLs, ever.
  21. Webellion

    Five Nations

    Five Nations is a real-time sci-fi strategy game for PC platforms, Switch, and mobile. Encompassing tactical combat in space in real-time mixed with micromanagement of economy, construction, and production, it will play both in single player and multiplayer modes. The RTS mechanics being custom-made to deliver action-packed gameplay. Gameplay You are a commander of one of the five greatest galactic empires in the far future Develop your space facilities, mining stations, factories, power plants, and research centers. Produce a gigantic armada of spacecraft to confront and destroy your rivals by applying shrewd strategies to outmaneuver their fleets. All this in real-time, by micromanaging your spaceships and structures through conventional RTS mechanics tailored to modern action-packed gameplay. Story In the near future, countries of the Earth are clustered in an international organization to create co-operation between states and prevent future wars. Aligning mankind under a common flag helped the economic and technological progress that paved the way for space conquest. During the colonization of the solar system, a group of pioneers discovered a wormhole that led to an unknown corner of the galaxy. Although the first attempt to enter the wormhole was deemed a complete success, the second expedition never returned... Join our Discord server and get Super Early Access https://discord.gg/uSSzUKs Social Media Facebook fan page: https://www.facebook.com/fivenationsthegame Instagram: https://instagram.com/fivenationsthegame GameJolt: https://gamejolt.com/games/fivenations/389358 Itch.io: https://webellionlimited.itch.io/five-nations Twitter: https://twitter.com/webellion Five_Nations_-_First_Trailer.mp4
  22. Great examples thanks! I see what you mean more clearly now. Yes, the attack and envelope of the sample generated in most of the VST's I use can be manipulated, I'll mess around with that on my next composition to emphasize the rhythmic feel.
  23. Hello I have bought the book SDL game development from amazon to learn SDL2 game programming on Ubuntu. I have my first game engine up and running but when I add code to draw a BMP in the top left of the screen I just get a black screen when I run it. Can anybody help me solve this I would really appreciate it. Also I am not sure if I have the texture creation code on lines 8-15 in the right place, I tried moving it around but it didn't make a difference. main.cpp <code> #include <SDL2/SDL.h> #include "Game.h" #include "Game.cpp" int main(int argc, char * args[]) { Game * g_game = new Game; g_game->init("Chapter 1", 100,100,640,480,false); while(g_game->running()) { g_game->handleEvents(); g_game->update(); g_game->renderer(); } g_game->clean(); return 0; } <code/> Game.cpp <code> #include "Game.h" #include <iostream> bool Game::init(const char* title, int xpos, int ypos, int width, int height, bool fullscreen) { SDL_Surface * pTempSurface = SDL_LoadBMP("assets/rider.bmp"); m_pTexture = SDL_CreateTextureFromSurface(m_pRenderer,pTempSurface); SDL_FreeSurface(pTempSurface); SDL_QueryTexture(m_pTexture, NULL,NULL,&m_sourceRectangle.w,&m_sourceRectangle.h); m_destinationRectangle.x = m_sourceRectangle.x =0; m_destinationRectangle.y = m_sourceRectangle.y =0; m_destinationRectangle.w = m_sourceRectangle.w; m_destinationRectangle.h = m_sourceRectangle.h; int flags = 0; if (fullscreen) { flags = SDL_WINDOW_FULLSCREEN; } // attempt to initialize SDL if(SDL_Init(SDL_INIT_EVERYTHING) == 0) { std::cout<<"SDL Init Success\n"; // init the window m_pWindow = SDL_CreateWindow(title, xpos, ypos, width, height, flags); if(m_pWindow != 0) //window init success { std::cout<<"Window Creation Success\n"; m_pRenderer = SDL_CreateRenderer(m_pWindow, -1, 0); if(m_pRenderer !=0) // render init success { std::cout<<"Renderer Creation Success\n"; SDL_SetRenderDrawColor(m_pRenderer, 0,0,0,0); } else { std::cout<<"Renderer Init Fail\n"; return false; // renderer init fail } } else { std::cout<<"Window Init Fail\n"; return false; //window init fail } } else { std::cout<<"SDL Init Fail\n"; return false; // SDL init fail } std::cout<<"Init success\n"; m_bRunning = true; // everything inited successfully // start the main loop return true; } void Game::renderer() { SDL_RenderClear(m_pRenderer); // clears the renderer // to the draw colour SDL_RenderCopy(m_pRenderer, m_pTexture, &m_sourceRectangle,&m_destinationRectangle); SDL_RenderPresent(m_pRenderer); // draw to the screen } void Game::update() { } void Game::clean() { std::cout<<"Cleaning game\n"; SDL_DestroyWindow(m_pWindow); SDL_DestroyRenderer(m_pRenderer); SDL_Quit(); } void Game::handleEvents() { SDL_Event event; if(SDL_PollEvent(&event)) { switch (event.type) { case SDL_QUIT: m_bRunning = false; break; } } } <code/> game.h <code> #ifndef __Game__ #define __Game__ class Game { public: Game() {} ~Game() {} bool init(const char* title, int xpos, int ypos, int width, int height, bool fullscreen); void renderer(); void update(); void handleEvents(); void clean(); // a function to access the private running variable bool running() {return m_bRunning;} private: SDL_Window * m_pWindow; SDL_Renderer * m_pRenderer; SDL_Texture * m_pTexture; //the new SDL Texture variable SDL_Rect m_sourceRectangle; // the first rectangle SDL_Rect m_destinationRectangle;// another rectangle bool m_bRunning; }; #endif /* defined(__Game_h__) */ <code/>
  24. tamlam

    Change Animation in OpenGL

    Hi @GoliathForge, I can move to the world coord. then rotation then translation. However, it only has the final result (the new rotated cube) not the animation. I try to use the below function glutTimerFunc(0, Timer, 0); but it only happens for one rotation action. global float angle=0.0f; In the void Display(), rolling the cube with glRotatef(angle, 0, 0, 1); at the end of function with angle += 10. I do not know when I can call the function for translation. for the 1st action, I translated the lower right corner to (0,0,0) then rotates from 0 -90 degree for animation. then the 2nd action is wrong with the coordinate. In OpenGl when I used glutDisplayFunc(Display); it always calls back the Display() function that I could not modify the next action.
  25. @Green_Baron That's some great work, I'll see if I can pull your project. I'm still not entirely convinced it's about culling in general just because of how tiny the scene size is, the gfx should be able to easily render 100k tris even with no culling at all at more than 80fps, but I will try to get it working and see if it helps. Thanks, I've enjoyed looking over all of your projects if nothing else. 😋
  26. Nova Villanueva

    The Mills

    Concept Art for Indie Survival Game The Mills
  1. Load more activity
  • 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!