Tag Info

Hot answers tagged

19

The standard starting place (in my experience) for C++ game dev is SDL. You've got to get your hands a little dirtier with this than you do XNA. If you want to try something a little higher level then I would suggest SFML. It handles some of the more menial tasks for you but you've still got to keep your eye on your memory usage, etc.


16

Don't worry about the future quite yet. Worry about your current game, now. Otherwise you are not going to get anywhere because you are fretting on the details. You should concentrate on building the game first and then later, if the game was successful enough, you can extract it out into something reusable for your next game. This will keep you from ...


14

According to your first requirement, you are looking for a framework rather than a library. jMonkeyEngine is a framework for 3D games (i.e. it provides the main loop as you ask for, similar to XNA) but it wouldn't be a good choice for 2D. However, a game loop isn't a hard thing to write, and existing Java libraries handle your 2nd and 3rd requirements, so ...


13

It's sort of like picking a car or a computer. Or pretty much anything that has assorted features, some of which you care about very much, others you don't mind and some you might even not want included. Make a list of the features you're interested in. i.e. 2D/3D support, lighting, physics, uses a language you know well, etc. Rank them based on ...


10

A good framework - or actually a toolset - is Unity3D. It's somewhat less flexible than "engines" that are focused only on rendering, but then it can save you enormous amounts of time by taking care of a lot of common tasks. You don't have to worry about render, physics, sound, resource importing, terrain engine (if you need one), it has passable GUI system. ...


10

You can also do it "yourself" using the SSE (Streaming SIMD Extensions) instructions and the intrinsics ( *mmintrin.h files ) of your compiler/proc. Tutorials Here is an example of how to use SSE instructions with assembly: http://neilkemp.us/src/sse_tutorial/sse_tutorial.html And here is a tutorial on how to use SSE instructions with intrinsics: ...


9

Build a framework. I have experience with building both. I prefer to use libraries over frameworks. Frameworks feel very restrictive and "bossy". So when I built my first game I wanted to build an engine that was composed of many libraries that could be easily reused in other projects. It was a disaster. It spent half my time writing glue code between ...


9

The design pattern you are looking for is the adapter pattern (wikipedia). The adapter pattern (often referred to as the wrapper pattern or simply a wrapper) is a design pattern that translates one interface for a class into a compatible interface... One way to implement the adapter pattern is to create a generic interface (abstract) for the ...


9

I fear the subject is quite tricky, few multi platform solutions seem to have launched, and even fewer seem to have survived on their own. I was looking into the subject a few months ago. I had a constraint as I needed the engine to run on iOS and Android. Didn't find anything that suited me really at the time. But a few pointers from what I remember: each ...


8

Lua-scripted video games Lua-scriptable game engines I think Lua is the best shot. This article is about integrating Lua and C++. It says: LuaBind is great product but for me it looked too complicated. For one the code is not easy to follow where the classes and objects are. Also seeing that I wanted to integrate Lua into a wxWidgets application, using ...


8

Short answer is, I don't think that kind of thing exists. Long answer is, you're on the right track thinking in terms of abstracting out the game rules from the game display. For some ideas, you should even be able to create a text based game, where instead of doing fancy graphics renders, the game simply uses text to describe what is going on. That kind ...


8

Using a cellular automata for simulation of a relaxion-diffusion equation might be right up your lines - the equations aren't really all that complex and the results are pretty striking. Have a look at http://www.cc.gatech.edu/~turk/reaction_diffusion/reaction_diffusion.html for some of the first papers on applying the results to computer graphics; ...


8

Sure you can, it's just not trivial to get it sounding "nice". I don't know how to do it in Linux, but if you can play a PCM buffer, all you have to do is fill it with whatever you want. So supposing your buffer is set to play in monaural, signed 16-bit samples, at 44100 samples per second, creating a pure (sinusoidal) A4 sound (440 Hz) is as simple as ...


7

Back in January, 2011, I looked at five GUI toolkits for pygame, and tried to get all of them working with Python 3. The five were: Albow, GooeyPy, PGU, pqGUI, and sgc. I didn't succeed with GooeyPy, but I did get the other four to work with Python 3. (I wanted to also try poutine, by Shandy Brown, but I couldn't find it, and I entirely overlooked Ocemp.) ...


7

Personally, I would pick Allegro 5, for the following reasons: It has a CMake-based build system. This makes it much easier than most build systems for working on multiple platforms. This seems like a minor thing, but it's pretty important overall. It makes building the library much simpler. SFML is still in significant flux. 2.0 is a pretty substantial ...


7

An approach I saw once was to generate a random mathematical function mapping x, y to a color. It was represented as a parse tree, built top-down, where each node was randomly chosen to be +, -, *, /, a trigonometric function, a constant color, or a variable (x or y); then any required subtree(s) were recursively generated. Then you evaluate the function ...


7

Obviously not a lawyer, so this isn't legal advice, but my personal interpretation is: The code is licensed under Apache License, Version 2.0. If you read the Redistribution section: You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form... So, yes, ...


6

I strongly recommend not to put a layer of abstraction between your application and the math-lib, neither high level factories nor inheritance for different platforms, nor delegation nor similar patterns. You want your vector math code as optimized as possible. Unfortunetely layers of abstraction that make your design more user-friendly, have massive ...


6

Are you talking about this editor? If so, it states right away: General purpose tile map editor with XML-based map format So you could just use a good, general purpose XML library such as: http://rapidxml.sourceforge.net/ After that it's just a matter of following the TMX specification. In other words, you will simply need to ask the XML library to ...


6

I'm fairly sure Lua can do everything you need relatively simply. I use Lua and C++ in my game. I looked at various wrappers like LuaBind, or using a generator like Swig, but I decided I didn't want any of that stuff and I wrote my own wrapper which I ended up making open source in case other people found it useful. Using my little library you can do stuff ...


6

Don't try to write anything from scratch. Refer to existing code and take it from there. https://github.com/kirillv/cpp-inverse-kinematics-library http://www.kynd.info/library/mathandphysics/inverseKinematics_01/ http://cg.cis.upenn.edu/hms/software/ikan/ikan.html And if you want reading material: http://www.3dkingdoms.com/ik.htm ...


6

It's not something you should really want to do. Consider what Steam has to do with DirectX. Getting into the mess of shared dynamic libraries isn't likely to be worth the trouble. I haven't seen any scenarios where Steam games will share DLLs between each other. As Grimshaw said in his comment, it adds a lot of complexity for nothing other than saving a ...


5

Have a look at Open Asset Import Library, see if it has the features you are looking for. There is also Animaded for skeletal animation but it's not been updated in a while


5

I would recommend Lua. Python is very popular, too. Many featured game engines (Blender, for example) use it. C++::Boost has a library to work with Python. I've read about Squirell, but didn't use it. You can read this Game Engine overview. There is a Scripting column. You can see that Lua and Python are most popular scripting languages.


5

"Game oriented virtual machines" have been around just about as long as there has been games. Zork, and other Infocom games, ran on Z-Machine. Whenever the company got the Z-Machine ported onto a new platform (say, c-64), they could easily release their whole portfolio on said platform. Later on, companies like Sierra or LucasArts came up with their own ...


5

It depends on the use-case. For recording games, I've seen that a general 'game record' mode where the game records the user input on a timeline so as to be able to recreate the game at any point to be really useful, and you can generate the video afterwards, or pass around these recorded games and others can watch using the game engine rather than a video ...


5

I would suggest using SDL. It's been around a long time so the documentation and support are pretty good, and it's one of the easiest ways I know of to get a drawing surface on the screen. It will give you practice writing classes in C++ (since you'll probably want to wrap a lot the the SDL C function calls) and also give you some experience using pointers ...


5

I did pretty much exactly what you describe. Here's a run-down of how my system works: I maintain a list of all asset files, along with some meta data. This takes the form of a table of contents (TOC) file at the root of a directory tree that will become the archive. Any file in the TOC is included in the archive, along with any metadata about the file. ...


5

Comment gone answer, as per Nathan Reed's suggestion :) Karl Sims did some work about 20 years ago producing (among other things) wonderful abstract images, see here for details. Scroll about halfway down to see some beautiful samples. Basically a syntax tree is created, mapping X and Y coordinates to colors, and then genetic programming was applied using ...



Only top voted, non community-wiki answers of a minimum length are eligible