Nik02

Members
  • Content count

    4369
  • Joined

  • Last visited

Community Reputation

4353 Excellent

2 Followers

About Nik02

  • Rank
    Contributor

Personal Information

  • Interests
    Art
    Audio
    Programming
  1. One can already enable game-agnostic FXAA filter from both Nvidia and AMD graphics driver configuration pages, for budget cards and top tier alike. This is a hack, as (in my opinion) is the cable you mention. I strongly agree with Hodgman - the post-processing smoothing does fix a quality issue, but introduces more than one quality issue in doing that. Adding to that, most gamers - especially pro - would conceivably prefer sharper image as opposed to artificial smoothing, in order to see as much detail as possible.
  2. Apache Cordova lets you wrap your html applications to a native wrapper. It works with many platforms, including all the major desktop and mobile ones. That said, it is worth thinking if you need to do that or would it be better to run within a browser. With the latter approach, the users don't need to install anything extra in order to run your app. "Simple 2D puzzle games" do not tend to require anything that browsers won't support.
  3. You can run javascript on almost any web browser, regardless of the OS platform. The features you can access depend on the browser make and version, but there is a relatively solid baseline in HTML5.
  4. Radiosity C++ Directx 11 implementation

    The algorithm described in the linked paper requires that all geometry (and local light emitters) are static in order for the light transfer approximation to be pre-computable. If the geometry changes, then so does each transfer function of the probes that "see" the changed geometry either directly or indirectly. The environment light map (infinitely far skybox, essentially) does not need to be static, as the spherical harmonic functions are evaluated against its contribution at runtime. The algorithm allows for dynamic meshes (as in moving characters and objects) be lit with the existing radiosity data by taking n nearest probes of the mesh and evaluating the lighting of the object from them, but the dynamic objects cannot easily contribute to the radiosity solution so shadows and light bleeding of said dynamic objects would not work without further processing.
  5. 512^3 is 128MB with 8-bit texels, so it reasonably fits into GPU memory on modern hardware. 2048^3 is 8GB which does not fit into on-board memory of common gaming GPUs. It does fit into professional (as in Quadro) cards, but even in professional applications it is rare that such large individual buffers would be used. Note that the memory access is relatively much slower than shader arithmetic, if compared to 5-10 years ago. This is because memory bus width cannot be easily scaled up, but the number of shader cores has increased quite a bit. Whereas in the old days something would run better from a 3d lookup table, the same logic could now run much faster by just running the math on the shader. Depends on the program, of course.
  6. How do i access the sound buffer for win32 ?

    There is a redistributable available for XP. However, XP in general is an unsafe platform nowadays because MS does not support it with security updates anymore.
  7. How do i access the sound buffer for win32 ?

    This small XAudio2 example should work as is on Windows 10. For earlier versions, change the dll name as needed. This is not production-ready code because it does not perform any error checking whatsoever. In particular, one should check for success on every API call before proceeding, and in case of heap allocation, check that the memory was actually available. Also, typically audio APIs are used in applications with event loops (as in windows desktop apps), so that playing a single sound buffer is not the last thing the program does before exiting. // XAudioDemo.cpp : Defines the entry point for the console application. // // NO WARRANTY! The code provided is just for example purposes. // The code below skips almost all error checking so it should not be used in production applications as is. // In real code we should check for failure and success for all API calls and memory allocations. // -Niko #include "stdafx.h" /* In addition to the default console app headers, we include the following in stdafx.h: #include <Windows.h> #include "XAudio2.h" #include <cmath> */ typedef HRESULT WINAPI xaudio2_create(IXAudio2**, UINT32, XAUDIO2_PROCESSOR); int main() { CoInitializeEx(0, 0); HMODULE XAudioLib = LoadLibrary(L"xaudio2_9.dll"); // for windows 10, use XAudio 2.9 xaudio2_create* xaudiocreate; xaudiocreate = (xaudio2_create*)GetProcAddress(XAudioLib, "XAudio2Create"); IXAudio2 *pxaudio = NULL; xaudiocreate(&pxaudio, 0, XAUDIO2_DEFAULT_PROCESSOR); IXAudio2MasteringVoice *pMasteringVoice = NULL; pxaudio->CreateMasteringVoice(&pMasteringVoice, XAUDIO2_DEFAULT_CHANNELS, 22050); IXAudio2SourceVoice *pSourceVoice = NULL; WAVEFORMATEX sourceFormat; sourceFormat.cbSize = 0; sourceFormat.nAvgBytesPerSec = 22050 * 2; sourceFormat.nBlockAlign = 2; // 2 bytes per sample sourceFormat.nChannels = 1; // mono sourceFormat.nSamplesPerSec = 22050; sourceFormat.wBitsPerSample = 16; sourceFormat.wFormatTag = WAVE_FORMAT_PCM; pxaudio->CreateSourceVoice(&pSourceVoice, &sourceFormat); XAUDIO2_BUFFER buffer = { 0 }; buffer.Flags = XAUDIO2_END_OF_STREAM; INT16* sampleData = new INT16[22050 * 2]; // 2 seconds of 22050Hz mono data // sound synthesis for (int i = 0; i < 22050 * 2; ++i) { double sv = std::sin((double)i / (double)22050 * 5000.0); // sine wave sampleData[i] = sv * 32767.0; // amplify from -1...1 to sample range } buffer.AudioBytes = 22050 * 2 * 2; buffer.pAudioData = (BYTE*)sampleData; pSourceVoice->SubmitSourceBuffer(&buffer); pxaudio->StartEngine(); pSourceVoice->Start(0, XAUDIO2_COMMIT_NOW); // Since we are in a console app, we need to sleep here so as to not exit immediately. // In desktop apps, we could handle the XAudio voice callbacks instead. Sleep(2000); pxaudio->StopEngine(); delete[] sampleData; return 0; }
  8. How do i access the sound buffer for win32 ?

    XAudio is effectively the successor to DirectSound, and it is a separate library in the same sense as XAudio is. BOTH of them are pre-installed in modern Windows versions. Moreover, XAudio is easier to use than DS, and has lower latency as well
  9. How do i access the sound buffer for win32 ?

    XAudio is a system component that, I believe, is installed as part of Windows. Any applications that play sound effectively need to go through the system-supplied interfaces, be it XAudio or something equivalent. Applications generally don't call drivers directly; there is always at least one abstraction layer between them. DirectSound, SDL, Core Audio and DirectShow are examples of alternatives for XAudio, but not one of them provides you direct access to the primary sound buffer. And for a good reason.
  10. How do i access the sound buffer for win32 ?

    You don't have direct access to the kernel mixer from user-mode applications. Instead, use a low-level API such as XAudio. This allows you to submit your own buffers to be mixed to the audio output.
  11. Image Processing Server

    Video compression would create latency and quality loss.
  12. Image Processing Server

    Http-like (or actual http) protocol would be a good choice here, as you could send the metadata in the headers and the image data in the request body.
  13. Problem with PagedMemorySize64

    It is possible to read the contents of RAM chips from a live machine too, if you have physical access to the memory bus lanes (and this is not as difficult as it may seem). While disabling the page file is a small hindrance to an attacker, it is not a very robust method on its own. If an attacker has physical access to the machine, be it powered on or not, he/she/it can bypass any protection implemented on that machine.
  14. Does the game logic evaluate the slot or the position when determining object location?
  15. Both the address and the data values are simply arrays of bits on the buses, that can be read by anything connected to said buses. When the cpu wants to write some value x to address y, it sets the data bus bits to represent data x, and the address bus bits to represent the address y. When the rom selector circuit sees the value of 0xff50 on the address bus, it knows that the value of the data bus has the meaning of the desired ROM source and sets the cs1 and cs2 lines accordingly to actually enable the correct ROM.