game-engine

Game Development in Python, ruby or LUA? [closed]

馋奶兔 提交于 2019-12-13 07:52:47
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I have experience in game development in some game engines in Action Script 3 and C++. However, I would like to improve the

How to calculate the position and direction of the target cursor in xna?

我怕爱的太早我们不能终老 提交于 2019-12-13 07:40:08
问题 I developped a small games like "minecraft". and I'm stuck for a few days on the calculation of the direction of the cursor. Let me explain. I would like to target a cube with my cursor in the middle of the screen and make it disappear with a click. But I do not see any how to recover this information .. Can someone point me to a "sample / tutorial" or explanation please? Thank you very much. My screenShoot picture game : 回答1: I take no credit for most of this--it's what I used in my 3D XNA

Why can't update access an objects img properties?

≡放荡痞女 提交于 2019-12-13 07:20:23
问题 I'm trying to create a simple JS game engine on my own. Here's the code for one of the states. var menuState = { //state variables menuBttn: {x: _canvas.width/2, y:_canvas.height/2, img: imageArray[2], over: false, click: function(){changeState(2);}}, preload: function () { }, update: function(){ surface.clearRect(0, 0, _canvas.width, _canvas.height); for (var i = 0; i < menuAssets; i++){ surface.drawImage(menuState.menuBttn.img , menuState.menuBttn.x, menuState.menuBttn.y); console.log

Pygame, simple physics engine, how to hold points between planes?

筅森魡賤 提交于 2019-12-13 05:24:36
问题 I'm trying to write this tutorial in Pygame(Python) and having problems about holding points between planes. My code is: fiz2.py Vector class: vector.py If you move mouse on the Pygame screen, the planes will rotate. And when the planes are rotating, points are passing through planes and going outside. I tried to fix points' positions on every iteration but they still passed the planes. I have no idea about where should I fix their positions. NOTE: I know my code is a little bit messy, this

.wac to .wav conversion

旧巷老猫 提交于 2019-12-13 05:09:48
问题 I've been asked to sample some data in a .wac file type. I'm not familiar with this standard and there is very little on the internet with regards to this format. I got given the .wav file but I don't think it was converted correctly, in that there was a none existent of the RIFF header so no .wav reader was able to read it. Could anyone therefore shed some light into how I could possibly convert the .wac file into a .wav file? Doing some research, I cannot seem to find a converter tool on

Move a Box with another on colission respecting the next neighboring mesh in Three.js

有些话、适合烂在心里 提交于 2019-12-13 02:02:52
问题 Found a lot of physic engines out there but nothing that fit my needs directly. I try to to find a simple way to push and pull boxes including collision detection which respects the next neighboring mesh hit while moving. Some use cases to understand: All boxes except box 1 are moveable. Push or Pull box 4 to west: Should move box 3 to west on collision. Should make box 3 and 4 not able to move west when box 3 hits box 2. Push 2, 3 or 4 to north: Should stop when it hits box 2, because box 1

How to be sure that a target goal in a match 3 game level will not be impossible?

纵饮孤独 提交于 2019-12-12 21:26:17
问题 This is clearly not a coding problem but the logical one. I am starting to learn how to make a match 3 game. but there is a question rising in my mind. when i will set goal to complete the level, how will i know the goal is achievable ? suppose in a level where i have to collect 5 Red, 12 blue, 9 green objects by matching the same(like farm heros). how would i decide how much moves i need to set to make this goal achievable. i mean it should be challenging but not be impossible. since the

SDL2 Multiple renderers?

て烟熏妆下的殇ゞ 提交于 2019-12-12 16:38:41
问题 I'm new to game development, SDL and C++. I have been learning with the code here: http://gamedevgeek.com/tutorials/managing-game-states-in-c/ The relevant bit: Multiple states are not only important in demos, but also in games in general. Every game starts off in an introduction state, then moves to a menu of some kind, a finally play begins. When you’re finally defeated, the game moves to a game-over state, usually followed by a return to the menu. In most games it is possible to be in more

Entity Component System and multiple components sharing common base type

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 15:34:50
问题 I'm trying to implement a simple ECS for my game engine. I know that my implementation is not strictly ECS, but I'm refactoring my code to be more component-based. So far I have the following classes: Entity : it is a container of components, and since I want my entity to have multiple components of the same type, it stores them in a std::map<ComponentID,std::vector<std::unique_ptr<Component>>> . Each component has a unique ID (an unsigned int), that I get from a simple template trick I

HTML5 Canvas game loop delta time calculations

蹲街弑〆低调 提交于 2019-12-12 15:32:08
问题 I'm new to game development. Currently I'm doing a game for js13kgames contest, so the game should be small and that's why I don't use any of modern popular frameworks. While developing my infinite game loop I found several articles and pieces of advice to implement it. Right now it looks like this: self.gameLoop = function () { self.dt = 0; var now; var lastTime = timestamp(); var fpsmeter = new FPSMeter({decimals: 0, graph: true, theme: 'dark', left: '5px'}); function frame () { fpsmeter