Tag Info

New answers tagged

3

In most game engines, physics objects live in their own world, and are connected to game objects through some special logic, responsible, for instance, for copying transformations and notifying about events like collisions. Your case sounds like it requires multiple physics worlds. Most physics engines will allow you to do that, as they are designed in a ...


0

jMonkeyEngine is licensed under the 4-clause BSD license, not under the GPL. The BSD license explicitely allows closed-source modifications, as long as you just include the BSD license text somewhere where the end-user can read it. That means what you want to do is no problem at all. However, when the engine were licensed under GPL, your new client would be ...


0

I would personally discourage you from any kind of direct map-player communication there is no need for it. It is game logic responsibility to handle such interaction. Often, there is some kind of GameObject manager or component system. As for multiple players/maps, server should be resonsible for instantiating maps and moving players between them.


1

I posted recently a response to a similar question http://stackoverflow.com/questions/24231389/struct-or-class-for-matrix-4x4-object Basically valuetypes are the way to go for storing matrices, more benefits than downsides. You may also organize a matrix to be more GPU friendly by transposing the fields directly into the matrix struct (SharpDX is not doing ...


2

Everything is an optimization of the 4x4 matrix when it comes to 3D math. A 3x4 is about saving memory because the last column/row for non-projection matrices is [ 0 0 0 1 ]. Pure rotational 3x3 matrices are extremely convenient because you can invert them by just transposing them. For animation and camera systems, quaternions are ideal for lots of reason, ...


2

The solution can be pretty simple - just add a field or flag and dont release until n bullets of your burst have been fired. in weapon: int burst = 0; when hadling event: void onFireButtonPress() { //previously simple fire(); burst = burst > 0 ? BULLETS_PER_BURST : burst; //or some other behavoiur like burst += 3 etc. } in game loop: ...


0

I spent a day refactoring and trying the approach listed as Potentially Viable above, and it worked! Basically, it functions like this: I made a Class named Stance, which defines an angle for all of the joints. The class also has a Vector2 coordinate, corresponding to a position on the joystick. A class named StanceMap keeps track of all of the stances ...


0

(Most) Android devices' input are from the touch screen. If that is your case, and you are trying to fetch touch events, you have two options: 1 - Poll every frame if the LEFT key is pressed. Basicly, instead of your Gdx.input.isKeyPressed(Input.Keys.LEFT) what you want to check is: Gdx.input.isButtonPressed(Input.Buttons.LEFT) From javadoc: ...


0

I'm now using openGL ES. I found it to be the most simple solution to my problem, since I don't need anything too advanced.


0

SDL introduces an additional dependency While many platforms support it, it is not a part of the regular distribution of all of those platforms, so users must download and install it themselves. One such platform is Windows, and assuming that your target market is divided in proportions similar to the Steam Hardware Survey, that means that ~95% of your ...


1

I'm building a cross-platform game engine at the moment. I'm using SDL, which is an excellent (and suitably low level) cross-platform library for building graphics applications, to ease the pain. Beyond this, though, is a lot of "custom code" for each platform. This you just have to get through. I've found it to be a very small fraction of my development ...


1

Contrary to the other two answers (which are rightfully C++-specific), there is another way. Some architectures that come to mind: Port your engine: Modify or write code so that it works across multiple platforms. This is addressed in the answers above. Write something above a cross-platform library: This is the example of libGDX, which runs on Java. Java ...


25

Port your engine to each platform. There's nothing special about it. If you have some code that is Windows-only, then either add some #ifdef logic in the file or add a second file (so you'd have FooWindows.cpp and FooLinux.cpp or whatever) that implements that feature on the other OS(es) you care about. The one-click publish stuff that an engine like Unity ...


13

There's no magic bullet here. If you want your game to run on multiple platforms, you have to write code for multiple platforms (or leverage third-party libraries that already do this for you). The things you are asking for don't align: you say (emphasis mine) what I am looking for is resources to integrate something that will allow me run on ...


0

The good news is that there are many things that you can do. Bad news - there's no magic switch to set to true to make your game run faster. Make sure that whatever you are doing in a loop is optimized. For example if you check in each loop cycle for some difficult condition for each sprite. Dithering won't help you. Please first understand what it does :) ...


1

As you mention that your current game is simple I assume you are learning, or at least expanding upon other non-game related knowledge. Game engines are useful tools in industry, the games you make will work more efficiently and turn around time will be faster. My opinion is that it is far better to create your own engine if not working on a commercial ...


2

YES. If we put cross-platform aside, I think you should use a game engine just for the basic features that many game engines provide: Object/Layer management + Level loading A Renderer for either 2D or 3D Texture management (texture groups, texture sizing, texture-atlasing) Physics Animation engine (support opacity, rotation, position, etc.. with different ...


0

You seem to misunderstand something that is, admittedly, a little unclear in the author's wording. He's not talking about junk in the memory itself that needs to be cleaned up, he's talking about junk in the memory manager that needs to be cleaned up (i.e., the OS' implementation of new/malloc. It's worth noting that new basically just calls malloc and then ...


9

One thing that pre-allocating a large chunk of memory could do, if your computer was low on RAM, might be to force the OS to free some extra space by swapping parts of other programs' memory space to the disk. Since such swapping is generally a very slow operation that pretty much freezes your program while it's happening, there could be some advantage to ...


22

I don't know how old that writeup is, but I'd say it's pretty old. In modern Windows (XP and newer, but specially on 64-bit versions), I would say doing something like that will have little to negative impact on the startup of your game. First of all, remember that the address space is virtualized for each process. As far as your process is concerned, you ...


2

In your loop you probably have vsync on, or other stuff like "wait for input" that limits your cpu usage because the program have to wait for other tasks. When you "freeze" your application it becomes just an infinite loop. If you lunch the following program int main() { while(true); return 0; } of course it won't terminate, and its cpu usage will be ...



Top 50 recent answers are included