Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. 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!
  3. 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?
  4. Today
  5. 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...
  6. 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).
  7. 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
  8. 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.
  9. 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:
  10. 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
  11. 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!
  12. VoxycDev

    Fateless

    Album for Fateless
  13. 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.
  14. 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.
  15. Hello fellow Game Developers, this is 2GuyGames. We are a fresh startup company situated in Germany and we reach out to you for our market analysis. We want to know how you use tools in your game development. We do this to get a feeling for what the market (that means you, the developers) has and what it needs, so we can develop tools in the future that help make game development even better. We created a quick survey (1-2 minutes) for you to take. If you could fill it out and give it to your friends and collegues, that would be a huge help :) link: https://www.surveymonkey.de/r/L58K6TC
  16. 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
  17. 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.
  18. 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/>
  19. 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.
  20. @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. 😋
  21. Nova Villanueva

    The Mills

    Concept Art for Indie Survival Game The Mills
  22. Nova Villanueva

    The Mills | Survival Game

    What is The Mills? The Mills is a despair survival game set in a bleak, post-apocalyptic world. As The Engineer, the lone human among robots, you scavenge for resources. Each of the robots is unique – some are kind, some frightening, and some aggressive. As you try to stay alive, you must constantly make choices: will you focus on your survival alone, or help the robots who come across your path? Development Live Stream: Twitch
  23. Randy Gaul

    A good 3D math library in C for OpenGL?

    I like these two. https://github.com/HandmadeMath/Handmade-Math https://github.com/felselva/mathc
  24. Survival Game | The Mills | Hello! Today I integrated the cinematic animation for the intro of the game. I had made for the teaser trailer to embed the animation within the actual game's scene. This was a horrible idea - every time I had to playtest the game, of course we had to watch the intro animation. Anyway, I moved over the intro of the animation to another scene that we can get through the Main Menu. I am used Unity's Cinemachine for the cameras but using Maya for animation so there was a disconnect. Tomorrow or later today I'll try using the timeline of Cinemachine better. Fixed: The Navmesh (what lets players and robots know where they can walk) was acting up. I increase the Voxel in the advance settings back to .07. I dropped it too low before as I was trying to get a better response, but I went too over board with it. To Do - Things on my mind Add the Grenade for the player to be able to craft to the programming. The item can already be made to explode robots (to loot them). Use Zbrush to sculpt the main characters hair. Right now nobody know that its suppose to be a girl. Use Timeline for Cinemachine Check out if the entire scene will work better with ambient light. The robots right now are either too unlit or the 'specular' goes crazy when lit. Game Dev Log | Today's Screenshot
  25. GoliathForge

    :)

    I thought I heard the low poly wolf howl
  26. Awoken

    :)

    Hello, Over the past six weeks I’ve been soul searching. This is a hard blog for me to publish, I’m going to be opening up about my past and writing about some of my deep insecurities and shortcomings, along with how being apart of GameDev has helped me find some personal progress. I’m going to be reaching far back into my past to provide some context. I have tried my best to reduce the personal drama. My mother wanted to give me the best education she could here in Canada and so she chose to enroll me in French immersion. I struggled and failed Kindergarten. My earliest friends moved on. By grade three I was struggling with both French and English. I was given two options, I could either repeat grade three or change to the English only program. Either way I had to part ways with more friends. I had learned to become unsure of myself. Measuring true personal growth had become dusted over like neglected instrument gauges in need of a cleanse. I found solace in my imagination and it became my trusted companion. In my early teens I started to recognised some of my abilities, discovering things I had not noticed before. I started to receive encouraging complements from others and like any teenager I let it get to my head and neglected the gauges. I decided to start programming a game to help answer some of the questions that have nagged at me for so long. When will I find some meaningful confidence and How can I start to clean these dusty gauges? On March 7th I finally answered the first question. I had found the personal confidence, It was good enough for me. By end of March I began to see the answer to the second question. Regretfully the answer is not found sitting in front of a computer. I’m not leaving, but for a while I need to focus on some personal growth. Opening up about my ideas in 2014 was a big step for me. I am truly thankful for all the kind words, support and encouragement over these past 5 years. It’s been a blessing. I wanted to share these words with you because my friends should be in the know
  27. Awoken

    unirule

    Unirule is a game inspired by elements of the Civilisation series, Sim-City series, and an old game called Tyrants. Unirule is intended to be a real-time multiplayer game. The current version is being written in JavaScript utilising the THREE.js API for the client and Node.js for the server. The game's framework is projected to be completed by April 26th 2019, after which full attention will be devoted to game design and development. The game's engine will run a 24 / 7 live simulation of a living breathing world simulating thousands of individual people. Each person, or Simulin, will be AI driven. The people will collect resources, craft tools, explore their world and think up new ideas and inventions. They will band together, conduct trade, engage in conflict and expand their respective territories. You as a participant in this world will be given an opportunity to play as some of these people. The goal of Unirule is to achieve global hegemony. You'll accomplish this goal by gaining influence over the majority of the people through economic, military and cultural influences. When you're logged into the game you'll be able to dictate the actions and choices of the people you directly influence. When you are away the simulation will continue and the people you influence will carry on with what ever tasks you've assigned to them. You will start your game as one simulated person and you'll have the option to choose between one of three classes. Each class has unique abilities, actions, and structures that they can build; each of which will allow you to increase your overall power and influence. You can either start as a Farmer, Hunter or Story teller. As your game progresses many other classes will become available such as the Lender, Warlord and Emissary to name a few. In addition, you'll also be able to control up to three people with differing or similar classes at the same time. Perhaps initially you'll want two Farmers and one Hunter to boost food production and provide basic defences. Maybe you'll start out by pillaging local tribes with a wandering band of Hunters. Or maybe you'll want to start a primitive faith and be worshipped. All of these play styles will be possible. Lastly, and perhaps most importantly, you'll be able to ally with or challenge other human players within the same world. Sometime during 2019 I hope to have a server up and running so others can give the project, in it's alpha state, a whirl to see what they think. This project is in its proof of concept stage. The end goal for the proof of concept is to expand on the gameplay potential of the three base classes. I'd like to develop the three base classes to the point where they open additional classes, and to test player connection and simulation stability. Thanks for reading and feel free to leave a comment.
  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!