game-engine

What is the difference between a CPU and a GPU oriented code?

谁都会走 提交于 2019-12-23 22:10:03
问题 Let us suppose a game developer develops an application. So, while writing the application will the developer write some code segment which should goto CPU and some which should goto GPU or is decided by scheduler at run time? 回答1: CPUs and GPUs are different, optimised to do different things. GPUs are less clever, but massively more parallel and carry out a huge amount of specialised processing, as opposed to the traditional CPUs more general processing. GPUs have to be tasked by the CPU. No

Longish delay between two consecutive KeyDown events

自古美人都是妖i 提交于 2019-12-23 20:32:55
问题 I'm kind of writing a little game engine -- purely to understand how these work from the inside. I currently don't want to mess with OpenGL or DirectX, so I stick to drawing on a control with GDI+ and all that WinForms stuff. Obviously, I need to handle input. More specifically, keyboard events. This, however, poses a problem: protected override void OnKeyDown(KeyEventArgs e) { Trace.WriteLine(string.Format("KD {0:hh:MM:ss.fff} {1}", DateTime.Now, e.KeyCode)); } This code (even with the

Using SIMD in a Game Engine Math Library by using function pointers ~ A good idea?

荒凉一梦 提交于 2019-12-23 19:15:18
问题 I have been reading Game Engine Books since I was 14 (At that time I didn't understand a thing:P) Now quite some years later I wanted to start programming the Mathmatical Basis for my Game Engine. I've been thinking long about how to design this 'library'. (Which I mean as "Organized set of files") Every few years new SIMD instructionsets come out, and I wouldn't want them to go to waste. (Tell me if I am wrong about this.) I wanted to at least have the following properties: Making it able to

In C++, should different game entities have different classes? Or should it be in one class which contains all behaviours?

心已入冬 提交于 2019-12-23 13:08:12
问题 I am working on a game environment which will feature a number of different entities. Each of this will have a few common functions (Draw, Update, etc) but sometimes the game must treat them differently based on their enemy type. So far, I have encoded the "type" of enemy in their instances' class. So, we have a situation like: class MotionObject { ... }; class Entity : public MotionObject { ... }; class Coin : public Entity { ... }; class TextSign : public Entity { ... }; class ShapeEnemy :

Open Source 2D Game Engine that supports Hexagon Maps for .NET

无人久伴 提交于 2019-12-23 10:21:45
问题 I cannot find a 2D game engine to create hexagon maps for .net. The best I can find is Xconq (http://sourceforge.net/projects/xconq/) and pygame. Does anybody where I can find any? preferrably one like xconq. Thank you for your time and effort. I really apprecate it. Edit: I would like to have feature of a strategic nature. Like adding custom AIs, path finding, etc. Xcong is an engine for turn-based strategy games. 回答1: Does this help? Hexagonal grid for games and other projects - Part 1 at

RPG - storing player data for semi-complex tree structure

点点圈 提交于 2019-12-23 08:33:12
问题 I'm making a web RPG in js, using melon JS and SQL DB with PHP. This question is about how to store completed and current tasks per non-player character (NPC). NPC dialog and task data: all dialog is stored in a js object in the following structure: var dialog = { quests : { quest1 : { NPCName ("Joe"): { TaskName ("1 - Introductions") : { "english" : [ "Hello, here is some dialog", "More dialog..." (stored in array so I can cycle through it) ],//more items per task }, //more tasks per NPC },

What is the general architecture of an endless runner game?

天涯浪子 提交于 2019-12-23 03:11:05
问题 I am confused as to how endless runner games actually work, conceptually, as far as having a never-ending canvas. Sprite Kit is under NDA, so I am going to use Cocos2D as my framework. There are some tutorials on the web that are specific to other languages, and tools, but I just need to figure out basically: If I create a scene with a specific size, how do I create the illusion of a never-ending background? Do I just animated backgrounds behind the scene, or do I somehow dynamically add

SDLNet Networking Not Working

て烟熏妆下的殇ゞ 提交于 2019-12-23 01:44:34
问题 I am working on a game written in C using SDL. Given that it already uses SDL, SDL_image, and SDL_ttf, I decided to add SDL_mixer and SDL_net to my engine. Getting SDL_mixer set up and working was very easy, but I am having a lot of trouble with SDL_net. To test I created a very simple application with the following rules: Run without arguments act as a TCP server on port 9999 Run with an argument try to connect to the server at the given IP address on port 9999 Here are some of the key lines

Xcode 8.3 makes exceptionally large (.ipa) file for Unity IOS Build?

和自甴很熟 提交于 2019-12-21 23:18:54
问题 We have successfully launched our Unity Game in Android, where it is finally making final .apk file of size 28mb. When we exported our product's build to Xcode 8.3 and started making archive for uploading to iTunes Store, it surprisingly responded with a final (.ipa) file of very huge size, that is 160mb. We tried alternatively after removing the unwanted assets and the made another .ipa file which had a minute effect and reduced the size to 159.4mb. We are also developers of IOS and WatchKit

What is the difference between “Game”, “Screen” and “ApplicationAdapter” in libgdx?

こ雲淡風輕ζ 提交于 2019-12-21 04:20:33
问题 In tutorials sometimes people use "extends Game", sometimes "implements Screen" and i have auto-generated "extends ApplicationAdapter". What is the difference between them? 回答1: ApplicationAdapter allows you to create a listener, but not being forced to implement every method. If you're familiar with Swing, check out KeyAdapter , it's the same idea. An ApplicationListener allows you to handle application events. This allows you to execute code during certain events within the application life