Search Results

Search found 311 results on 13 pages for 'sdl'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • Particles are not moving correctly [closed]

    - by cr33p
    I want to make a particle explosion, after something gets destroyed, but somehow only one line of mixed colors show up on the screen. Here's the header: http://pastebin.com/JW5bPLj2 Here's the source: http://pastebin.com/KHmFqytD I don't get what's wrong, as it's nearly the same as in "Programming Linux Games" Can somebody help me fix that? PS: "Uint32 delta" is needed to update the pixels based on time. PSS: Maybe I should add that it's programmed in C and includes SDL. EDIT: Found the problem. It was the "drawParticles" function. The problem was, that I passed a double to "offset" (as particles[i].x, etc are all doubles). So I ended up with values like ~MAX_INT because I didn't cast the doubles properly to ints.

    Read the article

  • Collision representation in game overworlds

    - by Akroy
    I'm implementing a 2D overworld where one can walk through an area that is not tile based. I was wondering the best way to implement collisions. In the past when I've done similar things, I've used one image (or set of images) to show an elaborately drawn world and then a second binary image that does nothing but differentiate "wall" and "not wall". Then, I'd use the first for all drawing to the screen, but the second for collision detection. Having another image of the same size to represent collisions seems like lots of overhead. Is there a better way to handle this? (I'm currently using C++ with SDL, although I'm more interested in general concepts)

    Read the article

  • How do you ensure consistent experience across multiple graphics cards (or even driver versions)?

    - by Grigory Javadyan
    So I was writing a simple 2D game with OpenGL and SDL and had this problem when there was awful tearing when running in windowed mode (even though I explicitly asked SDL_SetVideoMode to use double buffering). Didn't worry about it all too much because most of the time the game grabs the entire screen, windowed mode is just for debugging. Anyway, yesterday I updated my nVidia drivers and tearing disappeared, the game runs smooth and looks nice in windowed mode too. I can see how the problem may be in the graphics driver, but this leads to a question. Obviously, professional game developers have to deal with a lot of different hardware/software configurations. What are the techniques they use to make sure the game looks the roughly the same on different graphics cards or even the same model of graphics card, but with different driver versions?

    Read the article

  • Adding multiplayer to an HTML5 game

    - by espais
    I am interested in making a game that I currently have a co-op experience, however I'm curious as to the best method of implementing this in HTML5. I have made games before using straight C sockets, and also with the Net library for SDL. What are some of my best options for doing this in a canvas-based environment? At present, all I can come up with are either AJAX/database solutions (with a high refresh rate), or somehow implementing a PHP server that would funnel the data through sockets. The overall gameplay would be a 2.5D platformer-ish type of game, so both clients would need to be continually updated with player positions, enemy positions, projectiles, environmental data, etc.

    Read the article

  • Is OpenGL 1.x deprecated?

    - by QuasarDonkey
    I'm familiar with OpenGL 1.x. I typically use SDL with OpenGL 1.4 on Linux, and I've never run into problems, even on my modern system. I've read on the OpenGL site about deprecation and compatibility contexts, but I'm still unclear as to whether it's safe to continue to use old versions of OpenGL, as opposed to using old features in newer versions. When functionality is marked deprecated ... future versions of OpenGL may remove it. Does deprecation simply imply that those functions can't be used alongside newer features? More specifically, are there any systems today (other than embedded) where OpenGL 1.x isn't available? The old-skool stuff like, glBegin, glEnd, glDrawPixels, etc. Note: I'm not a professional games developer, so you'll have to excuse my ignorance. I'm working on a mostly 2D game that I would like to keep multi-platform, supporting at least Linux, Mac, and Windows.

    Read the article

  • How to properly code in Unity? [on hold]

    - by Vincent B.
    I'm fairly new to Unity (yet I touched it and made a few proto with it) and I'd like to know how I'm supposed to work with it. I'm student in programming so I'm used to C/C++ with SDL/SFML, writing code and only using Input/Graphics/Network libs. I followed a few Unity guides and it was way more around drag & drop on scenes and a bit of scripting to activate it all, which disturbed me. So I fond a way to only use one GameObject and use a Singleton to launch code and display stuff (for 2d games at least). At the end of the day I make games not using "Instantiate" or such at all. Is it the right way ? Am I supposed to do this ? How much are your scenes populated (in a professional environment) ? When should I stop coding and start using the editor ?

    Read the article

  • Knowledge of a Language vs. Games in Portfolio

    - by RedShft
    How important is the knowledge of a language versus the games that you have developed in your portfolio? To be more specific. Personally, I dislike C++ for several reason(mainly due to it's complexity, and pointers, and I prefer D as my language of choice thus far. Due to this, I've written two games in D instead of C++ that are my personal projects. Am I wasting my time with D? Should I start using C++ again? For reference, I have 6 months of experience in C++. It's the first language I learned. I have messed around with SDL/SFML and a bit of Direct3D with C++ as well. Even though I like D, i'd rather not waste my time learning it, if it in no way will help me get a job in the gaming industry.

    Read the article

  • Separate parts of a game engine [on hold]

    - by user272716
    I'm pretty new in developing videogames. By now I only used SDL with C/C++ to create games. I'm currently learning OpenGL and I realized that to be fluid and easy to maintain the code must be logically separated. Since I want to use OpenGLES on iOS and Android I was wondering how the engine must be imagined in a technical way, some questions came up: Do I have to separate input/update functions from draw functions in different threads? Is there only one proper way to think a game engine/loop? What kind of assets should I use to create a 3D game using openGl ES to get better performance?

    Read the article

  • Application window as polygon texture?

    - by nekome
    Is there a way, or method, to have some application rendered as texture in 3D scene on some polygon, and also have full interactivity with it? I'm talking about Windows platform, and maybe OpenGL but I guess it doesn't matter is it OGL or DX. For example: I run Calculator using WINAPI functions (preferably hidden, not showing on desktop) and I want to render it inside 3D scene on some polygon but still be able to type or click buttons and have it respond. My idea to realize this is to have WINAPI take screenshot (or render it to memory if possible) of that Calculator and pass it to OpenGL as texture for each frame (I'm experimenting with SDL through pygame) and for mouse interactivity to use coordination translation and calculate where on application window it would act, and then use WINAPI functions such as SetCursorPos to set cursor ant others to simulate click or something else. I haven't found any tutorials with topic similar to this one. Am I on a right track? Is there better way to do this if possible at all?

    Read the article

  • Qt 4.6 OpenGL GLSL

    - by Zeke
    I'm trying to find like NeHe's tutorials for Qt that are all in GLSL. Because lets face it, OpenGL in the old days are dead and Shaders are the only way now. And with Qt-4.6 they introduced the QMatrix4x4, QVector3, and the Shader classes. But I cannot find any tutorials for this. All the ones I do find, all use crappy SDL and/or GLUT (Which are just plain useless).

    Read the article

  • Is there a simple way for opening one (or many) opengl window in mac OS X with C++ ?

    - by Petruza
    Yes, I hate Objective-c, plus my project will be portable, so I'd like to code as much of it in C++ as possible, ideally 100%. So I have a regular C++ project made with Xcode, and want to open some OpenGL windows. edit: Damn, Glut takes over the app's control with glutMainLoop(), pretty much as SDL does, I'm trying to break free from that schemes. Will try freeglut, although I can't find OSX binaries, and I always have such bad luck trying to compile someone else's code.

    Read the article

  • Best C# bindings for Qt?

    - by Stefan Monov
    I've written a game in C# with SDL.NET and OpenGL. I want to add a menu to it, for which I need Qt. What bindings do you recommend for Qt in C#? Qyoto? qt4dotnet? other? Requirements: fast should just work and be polished - i.e. no weird problems at every step integration with the buildsystem, uic, resources, etc, should work well

    Read the article

  • cross platform keyboard/mouse input recommendation

    - by Jay
    Does anyone have any suggestions for a good cross platform input library? I'd like to get: * at least keyboard and mouse input * on at least the big three operating systems * Small/fast * C or C++ * permissive licensing gpl2/mit/free/etc. So far I've seen: * OIS (used in Ogre) http://sourceforge.net/projects/wgois/ * SDL (used everywhere it seems, might be a clue) http://www.libsdl.org/index.php * Allegro http://www.talula.demon.co.uk/allegro/readme.html Has any one used any of these, or know of something else that might be good? Thanks

    Read the article

  • Programming graphics and sound on PC - Total newbie questions, and lots of them!

    - by Russel
    Hello, This isn't exactly specifically a programming question (or is it?) but I was wondering: How are graphics and sound processed from code and output by the PC? My guess for graphics: There is some reserved memory space somewhere that holds exactly enough room for a frame of graphics output for your monitor. IE: 800 x 600, 24 bit color mode == 800x600x3 = ~1.4MB memory space Between each refresh, the program writes video data to this space. This action is completed before the monitor refresh. Assume a simple 2D game: the graphics data is stored in machine code as many bytes representing color values. Depending on what the program(s) being run instruct the PC, the processor reads the appropriate data and writes it to the memory space. When it is time for the monitor to refresh, it reads from each memory space byte-for-byte and activates hardware depending on those values for each color element of each pixel. All of this of course happens crazy-fast, and repeats x times a second, x being the monitor's refresh rate. I've simplified my own likely-incorrect explanation by avoiding talk of double buffering, etc Here are my questions: a) How close is the above guess (the three steps)? b) How could one incorporate graphics in pure C++ code? I assume the practical thing that everyone does is use a graphics library (SDL, OpenGL, etc), but, for example, how do these libraries accomplish what they do? Would manual inclusion of graphics in pure C++ code (say, a 2D spite) involve creating a two-dimensional array of bit values (or three dimensional to include multiple RGB values per pixel)? Is this how it would be done waaay back in the day? c) Also, continuing from above, do libraries such as SDL etc that use bitmaps actual just build the bitmap/etc files into machine code of the executable and use them as though they were build in the same matter mentioned in question b above? d) In my hypothetical step 3 above, is there any registers involved? Like, could you write some byte value to some register to output a single color of one byte on the screen? Or is it purely dedicated memory space (=RAM) + hardware interaction? e) Finally, how is all of this done for sound? (I have no idea :) )

    Read the article

  • C++ IO with Hard Drive

    - by Tomas Cokis
    I was wondering if there was any kind of portable (Mac&Windows) method of reading and writing to the hard drive which goes beyond iostream.h, in particular features like getting a list of all the files in a folder, moving files around, ect. I was hoping that there would be something like SDL around, but so far I havn't been able to find much. Any ideas??

    Read the article

  • gluNewQuadric() before opengl's initialization

    - by Schrödinger's cat
    Hello, I'm working on a c++ code that uses SDL/opengl. Is this possible to create a pointer to a quadric with 'gluNewQuadric()' before having initialized opengl with 'SDL_SetVideoMode'? The idea is to create a class with a (pointer to a) quadric class member that has to be instantiate before the 'SDL_SetVideoMode' call. This pointer is initialized in the class' constructor with a 'gluNewQuadric()' call.

    Read the article

  • Qemu in an ssh session or the quest for the nographic option ?

    - by LB
    Hi, I ssh to a machine and I would like to start a qemu session inside this ssh session. I thought that the nographic option would do the trick. -nographic Normally, QEMU uses SDL to display the VGA output. With this option, you can totally disable graphical output so that QEMU is a simple command line application. The emulated serial port is redirected on the console. Therefore, you can still use QEMU to debug a Linux kernel with a serial console. but unfortunately, i don't see any output. The command line that i'm using once i've sshed to my machine is : qemu-system-x86_64 -hda debian.img -nographic any idea ? thanks.

    Read the article

  • Kansas City .NET UG March Meeting &ndash; Tonight!!!!

    - by John Alexander
    Meeting tonight!!! Food! Great giveaways including a full license of Infragistics for a year! See you there!! Meeting for March 23rd, 2010 WHERE: Centriq Training, 8700 State Line Road, Leawood, KS (Click WHEN: 6:00 PM TOPIC: Microsoft's Security Development Lifecycle for Agile development Microsoft recently added secure development guidance for agile methodologies within their SDL. During this presentation, Nick will summarize the new guidance and discuss what makes this guidance successful for Agile development. SPEAKER: Nick Coblentz Nick Coblentz is a senior consultant within AT&T Consulting Services' Application Security Practice. He focuses on helping organizations build mature application security programs and secure development processes. Nick has provided consulting services to fortune 500 companies within the retail, financial services, banking, and health care sectors. SPONSOR: TekSystems TEKsystems® is the leading IT staffing and services company. Our capabilities span a wide range of services: from technical staff augmentation and direct placement services, to full management of IT projects and comprehensive workforce management solutions. With over 25 years of experience, we are experts at connecting technical professionals. Whether you are looking for the best IT talent, an experienced IT outsourcing partner, or a career in the IT industry, TEKsystems delivers.

    Read the article

  • Where or what are the instructions for installing FMOD Ex for Linux to use in g++?

    - by Andrey
    I'm looking for the instructions on how to install FMOD. I want to do extra credit for my computer graphics assignment - sound effects. A teammate wants me to go with something simple, and he suggested that I use FMOD Ex. (If you guys can think of something better, do suggest it, but so far FMOD looks more promising compared to SDL, OpenAL, etc.) Right now I'm having a really hard time finding the instructions for installing the latest version of FMOD (audio content creation tool) on Linux Ubuntu 12.04 LTS (32-bit) so that I can use it in g++ with OpenGL. I checked out this YouTube video: http://www.youtube.com/watch?v=avGxNkiAS9g, but it's for Windows. Then, there is a Ubuntu Forums thread which redirected me to this page: https://wiki.debian.org/FMOD, and it has some dated instructions. I've downloaded FMOD Ex v. 4.44.24, which I believe is the latest version. Now I'm looking at eight files: libfmodex.so; libfmodex64.so; libfmodex64-4.44.24.so; libfmodex-4.44.24.so; libfmodexL.so; libfmodexL64.so; libfmodexL64-4.44.24.so; libfmodexL-4.44.24.so ... not knowing what to do. I've looked everywhere I could think of: StackOverflow, here, YouTube, Google, ... and came up with zilch. Please help. Thanks in advance.

    Read the article

  • Secure Coding Practices in .NET

    - by SoftwareSecurity
    Thanks to everyone who helped pack the room at the Fox Valley Day of .NET.   This presentation was designed to help developers understand why secure coding is important, what areas to focus on and additional resources.  You can find the slides here. Remember to understand what you are really trying to protect within your application.  This needs to be a conversation between the application owner, developer and architect.  Understand what data (or Asset) needs to be protected.  This could be passwords, credit cards, Social Security Numbers.   This also may be business specific information like business confidential data etc.  Performing a Risk and Privacy Assessment & Threat Model on your applications even in a small way can help you organize this process. These are the areas to pay attention to when coding: Authentication & Authorization Logging & Auditing Event Handling Session and State Management Encryption Links requested Slides Books The Security Development Lifecycle: SDL: A Process for Developing Demonstrably More Secure Software Threat Modeling Writing Secure Code The Web Application Hackers Handbook  Secure Programming with Static Analysis   Other Resources: OWASP OWASP Top 10 OWASP WebScarab OWASP WebGoat Internet Storm Center Web Application Security Consortium Events: OWASP AppSec 2011 in Minneapolis

    Read the article

  • Transition from 2D to 3D Game development [closed]

    - by jakebird451
    I have been working in the 2D world for a long time from manual blitting in windows to SDL to Python (pygame, pyopengl) and a bunch in between. Needless to say I have been programming for a while. So a while ago I started to program in OpenGL via C++ on my Mac. I then got a little intricate with my work after a while (3D models with skeleton structure and terrain development). After a long time of tinkering, I stopped due to the heavy work just to yield a low level understanding of how OpenGL works. Still interested in Graphics and Game Development I went on a search for a stable game engine with some features to grow on. Licence Requirement: Anything other than GPL (LGPL will do) OS Requirement: Mac & Windows Shader: GLSL or CG (GLSL preferred due to experience) Models: Any model structure with rigging (bone) support & animation I am looking at http://www.ogre3d.org/ currently and am starting to meddle around with some examples. However I am a little reluctant to spend a lot of time on it only to yield another dead end. So instead of falling down a spiraling black pit, I am posting my question to you guys to lead me in the right direction based on my requirements. How was your experience with the engine you recommend? Is it well documented? Does it have well documented examples? Any library requirements (Boost, libpng, etc)?

    Read the article

  • how to make a continuous machine gun sound-effect

    - by Jan
    I am trying to make an entity fire one or more machine-guns. For each gun I store the time between shots (1.0 / firing rate) and the time since the last shot. Also I've loaded ~10 different gun-shot sound-effects. Now, for each gun I do the following: function update(deltatime): timeSinceLastShot += deltatime if timeSinceLastShot >= timeBetweenShots + verySmallRandomValue(): timeSinceLastShot -= timeBetweenShots if gunIsFiring: displayMuzzleFlash() spawnBullet() selectRandomSound().play() But now I often get a crackling noise (which I assume is when two or more guns are firing at the same time and confuse the sound-device). My question is whether A) This a common problem and there is a well-known solution, maybe to do with the channels or something, or B) I am using a completely wrong approach to the task. I had a look at some sound-assets for other games and they used complete burst with multiple shots. I suppose I could try that, but I would like to have organic little hickups in the gun-fire (that's what the random value is for) to make the game more gritty and dirty. I am using Panda3D, but I had the exact same problem in PyGame and SDL. [edit] Thanks a lot for the answers so far! One more problem with faking it though: Now how do I stop the sound? Let's say I have an effect with 5 bangs... *bang* *bang* *bang* *bang* *bang* And I magically manage to loop it so that there's no gap or overlap if the player fires more than 5 shots. Now, what do I do if the player stops firing halfway through the third bang? How do I know how long to keep playing the sample so that the third bang is completed and I can start playing the rumbling echo of the last shot? Of course I can look up the shot/pause timing of that sound-sample and code accordingly, but it feels extremely hacky.

    Read the article

  • Frame Independent Movement

    - by ShrimpCrackers
    I've read two other threads here on movement: Time based movement Vs Frame rate based movement?, and Fixed time step vs Variable time step but I think I'm lacking a basic understanding of frame independent movement because I don't understand what either of those threads are talking about. I'm following along with lazyfoo's SDL tutorials and came upon the frame independent lesson. http://lazyfoo.net/SDL_tutorials/lesson32/index.php I'm not sure what the movement part of the code is trying to say but I think it's this (please correct me if I'm wrong): In order to have frame independent movement, we need to find out how far an object (ex. sprite) moves within a certain time frame, for example 1 second. If the dot moves at 200 pixels per second, then I need to calculate how much it moves within that second by multiplying 200 pps by 1/1000 of a second. Is that right? The lesson says: "velocity in pixels per second * time since last frame in seconds. So if the program runs at 200 frames per second: 200 pps * 1/200 seconds = 1 pixel" But...I thought we were multiplying 200 pps by 1/1000th of a second. What is this business with frames per second? I'd appreciate if someone could give me a little bit more detailed explanation as to how frame independent movement works. Thank you.

    Read the article

  • OpenGL render to texture causing edge artifacts

    - by mysticalOso
    This is my first post here so any help would be massively appreciated :) I'm using C++ with SDL and OpenGL 3.3 When rendering directly to screen I get the following result And when I render to texture I this happens Anti-aliasing is turned off for both. I'm guessing this has something to do with depth buffer accuracy but I've tried a lot of different methods to improve the result but, no success :( I'm currently using the following code to set up my FBO: GLuint frameBufferID; glGenFramebuffers(1, &frameBufferID); glBindFramebuffer(GL_FRAMEBUFFER, frameBufferID); glGenTextures(1, &coloursTextureID); glBindTexture(GL_TEXTURE_2D, coloursTextureID); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,SCREEN_WIDTH,SCREEN_HEIGHT,0,GL_RGB,GL_UNSIGNED_BYTE,NULL); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); //Depth buffer setup GLuint depthrenderbuffer; glGenRenderbuffers(1, &depthrenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, depthrenderbuffer); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, SCREEN_WIDTH,SCREEN_HEIGHT); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthrenderbuffer); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, coloursTextureID, 0); GLenum DrawBuffers[1] = {GL_COLOR_ATTACHMENT0}; glDrawBuffers(1, DrawBuffers); // if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) return false; Thank you so much for any help :)

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >