• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Kshitij Jhalak
      Objective :
      I want to draw a buffer of pixel (DWORD buf[WIDTH*HEIGHT]) to the whole client window. I am somewhat familiar with Winapi but not with GDI, reading the MSDN and other sources on the internet, I have came up with the following program.  
       
      Problem :
      The code is not working. I have initialised all elements of my buffer ( buf[] )  to 0. So I should get a black screen on my window, but I getting a regular white window. Can somebody point me what's wrong am I doing ?
       
      Code :
      #include<Windows.h>
      #include "stdafx.h"
      LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
      const int HEIGHT = 512;
      const int WIDTH = 512;
      DWORD buf[WIDTH * HEIGHT];
      BITMAPINFO bmi = { 0 };
      HDC hWinDC = NULL;
      HDC hbitDC = NULL;
      HBITMAP hBitmap = NULL;
      int WINAPI wWinMain(HINSTANCE hInstace, HINSTANCE hPrevInstace, LPWSTR lpCmdLine, int nCmdShow) {
          memset(buf, 0, sizeof(buf)/sizeof(DWORD));
          MSG msg = { 0 };
          WNDCLASS wnd = { 0 };
          wnd.lpfnWndProc = WndProc;
          wnd.hInstance = hInstace;
          wnd.lpszClassName = L"Window";
          if (!RegisterClass(&wnd)) {
              return 0;
          }
          HWND hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, wnd.lpszClassName, L"Window",
              WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, WIDTH, HEIGHT, NULL, NULL, hInstace, NULL);
          if (!hwnd) {
              return 0;
          }
          ShowWindow(hwnd, nCmdShow);
          UpdateWindow(hwnd);
          while (GetMessage(&msg, NULL, 0, 0)) {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
          }
          return msg.wParam;
      }
      LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){
          HDC hWdc = NULL;
          switch (msg){
              case WM_CREATE:
                  bmi.bmiHeader.biSize = sizeof(BITMAPCOREHEADER);
                  bmi.bmiHeader.biWidth = WIDTH;
                  bmi.bmiHeader.biHeight = HEIGHT;
                  bmi.bmiHeader.biPlanes = 1;
                  bmi.bmiHeader.biBitCount = 32;
                  bmi.bmiHeader.biCompression = BI_RGB;
                  break;
              case WM_PAINT:
                  PAINTSTRUCT ps;
                  hWdc = BeginPaint(hwnd, &ps);
                  hWinDC = GetDC(hwnd);
                  hbitDC = CreateCompatibleDC(hWinDC);
                  hBitmap = CreateDIBSection(hWinDC, &bmi, DIB_RGB_COLORS, (void**)&buf, NULL, NULL);
                  SelectObject(hbitDC, hBitmap);
                  BitBlt(hWdc, 0, 0, WIDTH, HEIGHT, hbitDC, 0, 0, SRCCOPY);
                  EndPaint(hwnd, &ps);
                  break;
              case WM_KEYUP:
                  if (wParam == 0x41) {
                      SendMessage(hwnd, WM_PAINT, NULL, NULL);
                  }
                  break;
              case WM_DESTROY:
                  DeleteDC(hbitDC);
                  ReleaseDC(hwnd, hWinDC);
                  PostQuitMessage(0);
                  break;
          }
          return DefWindowProc(hwnd, msg, wParam, lParam);
      }
       
       
    • By ThunderTwonk
      Hello everyone, I am working on a game idea and since I am still in the process of learning C# and the features available in unity I was hoping some of you might be able to offer me a little insight on things in general for getting started.
      I guess the basic components of what I'm wanting to create would be a Multi-levels management/city builder/rpg.
      The goal is to provide a framework for players to interact with, build in and affect the world both from a 3rd person action RPG as well as a zoomed out 4x style view (This would be something unlocked through gameplay)
       
      As for my questions go I was wondering if anyone had resources that could help me learn.  I've been on youtube as well as enrolled in an online course for basic unity and C# and will continue those but if anyone has any words of advice, a place that has good information and tutorials etc.
       
      Thanks for your time.
    • By INFRA
      SCAN. DRILL. SURVIVE.   ISOLATED Release in May 1st 2018   https://store.steampowered.com/app/805950/Isolated/   A game by Jérémie Bertrand Music & Sound Design by Pierrick Querolle *** Our solar system has been invaded by strangers. For the purpose of a possible negotiation, a team of astronauts is sent to the moon. Alas, they are shot before even arriving on the scene. Only one astronaut survives the crash and his only goal will be to go home...   GAMEPLAY   Shoot enemy ships to avoid being invaded. Be precise in your movements, because it's better to lose a bit of life at the top than to lose it all at the bottom. Take out your drill to destroy the stones in your path. Validate your identity to cross the different laboratories. Reach the flag before losing your three lives.   And all that... at the same time! Will you be able to go home? If the answer is yes, how long will it take?
    • By oranssi
      This is an adult psychedelic fighting game with spirits of the natural elements. 
      Choose your character to represent an anthropomorphic version of the different elements. 
      Earth, fire, air, water and more. There are 28 Archelemental spirits to unlock. 
      Take on challenges to earn more goodies such as sexy content, story modes and even make your own Archelemental to play and to share it with others.
      Download here :
      https://oranssi.itch.io/archelementals-of-eiss

      Trailer :
      https://www.youtube.com/watch?v=SmBNu_dPN_Y

    • By oranssi
      This is an adult psychedelic fighting game with spirits of the natural elements. 
      Choose your character to represent an anthropomorphic version of the different elements. 
      Earth, fire, air, water and more. There are 28 Archelemental spirits to unlock. 
      Take on challenges to earn more goodies such as sexy content, story modes and even make your own Archelemental to play and to share it with others.
      Download here :
      https://oranssi.itch.io/archelementals-of-eiss

      Trailer :
      https://www.youtube.com/watch?v=SmBNu_dPN_Y

  • Advertisement
  • Advertisement

Greetings! New member looking to have a question answered.

Recommended Posts

Hello there!

I'm a budding freelance artist and indie game developer.

Recently I've started planning a game I would like to make, and upon finding this website figured it may be beneficial to join(seeing as this is a website for game developers to come together).

I thought perhaps joining a community could help grow my knowledge in game development as well as provide a source for constructive criticism and motivation.

Now, for the moment, I have one major question;

You see, for the game I'm planning(one that I will be selling) I would like cutscenes. By cutscenes, I mean imported videos as opposed to just rendering them inside of the game engine(which...I don't know if a visual novel counts as a game engine?). Problem is, I've done a lot of research and apparently video containers/codecs like MP4(and AAC audio) require you to pay a royalty fee in order to use them in commercial work. I've checked out OGG file formats which I find horribly low-res, as well as OGV and MVK don't seem too well known for what I want. I was considering using compressed AVI formats, or even WMV and WMA files for video and audio except I think you need a license from Microsoft to do that too? I posted a question on both Microsoft's support forums and game dev forums asking about this, but am no closer to an answer as of right now. If anyone could drop me a tip or some information regarding this issue, please let me know.

In terms of my current progress in creating this game, I've been going through writing out plots, creating character and environment concepts, layout and gameplay aspects.

Any sort of advice on what my next few moves in game development should be is much appreciated, seeing as I am a newbie.

Edited by thebakadev

Share this post


Link to post
Share on other sites
Advertisement

Welcome. :)

The industry standard for pre-rendered cut scenes has long been Bink Video, but it is expensive. If you want a patent free solution that costs nothing use OGG Theora.

 

23 minutes ago, thebakadev said:

I've checked out OGG file formats which I find horribly low-res, as well as OGV and MVK don't seem too well known for what I want.

I don't know where you get that from, OGG Theora supports arbitrary resolutions up to 1048560 × 1048560. (And quality is a function of bit rate.)

And Theora has been used for cut scenes in games before.

 

32 minutes ago, thebakadev said:

Any sort of advice on what my next few moves in game development would be very much appreciated, seeing as I am a newbie.

I think you should get a playable prototype of your game before worrying about details like cut scenes. That way you can see if the game play is any good. If it isn't the rest don't matter much. 

And depending on how much of a "newbie" you are, a game that requires plots and cut scenes might be a too big of a projects. Start with something simpler.

Share this post


Link to post
Share on other sites

Thank you!
 

3 hours ago, kolrabi said:

The industry standard for pre-rendered cut scenes has long been Bink Video, but it is expensive. If you want a patent free solution that costs nothing use OGG Theora.

Perhaps I wasn't doing something right, but I tried converting an AVI video file and an MP4 video file into OGG format, but for some reason it came out really low quality with an odd pixel-y/blur effect and artifacts. (Or I meant low bit rate from the beginning and not resolution...forgive me, I'm really new to all of this haha). Maybe it's because I used vlc media player?? It's all that I have to try at the moment, and my main video editing software, Hitfilm 4 express, only exports files as MP4 files and AVI files.

 

3 hours ago, kolrabi said:

I think you should get a playable prototype of your game before worrying about details like cut scenes. That way you can see if the game play is any good. If it isn't the rest don't matter much. 

And depending on how much of a "newbie" you are, a game that requires plots and cut scenes might be a too big of a projects. Start with something simpler.

I want to get a playable prototype going, although I feel like I have somewhat of a mental block that I have to break with preparations first(namely basic plot and getting this whole cutscene ordeal over with). I'm also not a complete newbie. I say I am mostly due to the fact that while I have a pretty decent knowledge of branches, variables, interface programming and generally getting myself around in a game creating software, this is almost entirely graphic scripting. I want to learn a scripting language, but am first deciding what software I'll be using for this game. I want it to be a mix between a point and click game and a visual novel, but with a decent amount of freedom to learn about the in-game world and interact with various characters. I'll likely be using Tyrano Builder, which runs Javascript. No idea how easy javascript is to learn.

Share this post


Link to post
Share on other sites

There is a whole lot of opensource codecs, both video and audio, a quick google search will find them for you.

As for the best on that is a matter of opinion, I like x264, it's easy to build into your game so that your movie works even if the player doesn't have it installed.

3 hours ago, thebakadev said:

Any sort of advice on what my next few moves in game development should be is much appreciated, seeing as I am a newbie.

Making the movies used in cut scenes are normally done by a studio as large as the one making the game; it isn't just some simple thing any game can add.

For a indie game you should aim small, maybe one person describing the events of a world. Something that you don't need to hire hundreds of voice actors and a director.

Then there is rendering. Even if your movie renders 1 second per image it's 24 frames for one second of movie. That is 24 second = 1 second. That is 1440 frames for every minute and is half an hour fer a very fast render.

Now if we took the more realistic rendering time of 30 seconds per image, that is 15 hours per minute of movie you make.

 

In game movies have a lot less drawbacks and don't break immersion, so keep them in mind for a fallback.

Share this post


Link to post
Share on other sites
43 minutes ago, Scouting Ninja said:

There is a whole lot of opensource codecs, both video and audio, a quick google search will find them for you.

As for the best on that is a matter of opinion, I like x264, it's easy to build into your game so that your movie works even if the player doesn't have it installed.

Making the movies used in cut scenes are normally done by a studio as large as the one making the game; it isn't just some simple thing any game can add.

For a indie game you should aim small, maybe one person describing the events of a world. Something that you don't need to hire hundreds of voice actors and a director.

Then there is rendering. Even if your movie renders 1 second per image it's 24 frames for one second of movie. That is 24 second = 1 second. That is 1440 frames for every minute and is half an hour fer a very fast render.

Now if we took the more realistic rendering time of 30 seconds per image, that is 15 hours per minute of movie you make.

 

In game movies have a lot less drawbacks and don't break immersion, so keep them in mind for a fallback.

Huh....I'll try x264. Hopefully that will bear good results.

As for the cut scenes; Don't worry, I'm not aiming for super high quality full-length 3d animations or something like that. The cut scenes are only there to display actions and/or short events that would be difficult to portray using the default visual novel view or static images. I have a decently quick render time for my animations, and I was planning on doing either a sketchy/whimsical kind of animation, or something akin to cutouts used in puppet shows. In regards to a director and voice....I guess I kind of am the director, not to mention while I definitely can't afford to pay voice actors...at the same time, I somewhat like the idea of having the characters' voices absent so that the player can imagine what they might sound like. Especially since I want this game to be driven on the player's perspective on the world and it's inhabitants; from molding the protagonists' personality, to forming connections with the characters, to taking it upon yourself to choose how much you want to learn about them and their world(part of this probably comes from my love of an old animal crossing game I used to play. My gosh I loved that game.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement