New answers tagged

0

Game development is fun - but involves a serious level of commitment and time. Be prepared for much frustration and Googling, interspersed with the rare moment of joy and satisfaction. However, if you're serious about it, don't have any prior coding experience, and just want to get stuck in, then download + install Unity and start digging through one of the ...


0

Firstly, you need to really thing about how you wish to approach your goal. If want to learn indepth how games are created and primary how they are implemented in low level, you should : 1) Learn some decent programming language. You should probably stick with a popular one because it is a lot easier to find tutorials on common languages targeting both ...


0

Similar to @Goblin's answer here, I am using a random endless wave generator for my game, which is an HTML5 side-scrolling space shooter. The code below is plain Javascript. I am not posting the entire code here. Some functions are left out for your implementation. I just wanted to depict the logic. var shipTypes = ['warbird','crosswing','raider','drone','...


2

You are totally on target. One approach would be to return an integer which is the index of which one you hit, and a "special value" if nothing was hit. So: int Stage::checkForStageCollisions(sf::RectangleShape player) { ... return i; ... return -1; } Elsewhere you could say, if(checkResult >= 0) [something was hit]. Or do ...


0

The way I would handle this sort of scenario is to use some form of event messaging system. Each entity in your game world(and possibly the game world itself) should have the ability to send and receive messages. A simple way to set this up would be to have a MessageTypeEnum that signals which type of message is being sent and then some way of sending the ...


2

Why not use colliders and tags. When an enemy trigger/collider detects a player trigger/collider tagged say "Player kick" (child game object of the player) then that enemy executes his reaction with OnTriggerEnter(2D)/OnCollisionEnter(2D). Player just needs to enable and then disable its kick game object when kick is pressed. The most important thing is ...



Top 50 recent answers are included