Tag Info

New answers tagged

1

To make it easier for you to switch between world coordinates and grid coordinates, you should make two functions, projectToWorld and projectToGrid. pseudo code: /** * returns the topleft position of a given grid coordinate. */ function projectToWorld(gridX, gridY) { return new Vector2(TILE_WIDTH * gridY, TILE_HEIGHT * gridY); } /** * ...


2

For the A-star algorithm you must provide a data structure that, for vey legal current position of the agent, provides the set of possible moves from that location along with the cost of making that location change. The most common means of providing such a data structure, especially for a rectangular grid, is a 2D array of lists. However for more complex ...


0

Yes, you take each percentage and map it to one or more numbers in that range. E.g. if there's 50% chance of getting a killer rabbit, and 20% chance of getting John Lennon glasses, and 30% of getting chainsaw fuel, then you would have 1...50 be the range for the rabbit, 51...70 for the glasses, and 71...100 for the fuel. Now you generate a random number ...


0

It's a bit hard to imagine how a pen-and-paper-and-dice version of a game should actually convey the impression of real time at all. And admittedly, I doubt that this paper version will provide valuable feedback in regard to the implementation of a real-time game. However, if you think that it may be helpful (maybe just to get a rough idea about the events ...


0

I'd say the best thing to do would be to save game data when somethings changed as sometimes the game may end up force closing which would result in losing all your data


2

Gameplay Design Technically, it depends on the style of gameplay you are designing. In some game genres, it is almost explicitly expected to have certain "save types". For instance, in online casual flash adventure/RPG games, you will often save every tiny change into a cookie so if the player accidentally (or intentionally) closes the browser, the game ...


0

If your game is addictive as I hope, and after 1 hour plaing, a black-out or a pc crash , make me loose all progress.. i regret you do not added an in game autosave. Basicaly you missed option 1.5 save sometime (time related, level changing)


0

Im not 100% sure, because your Dropbox link is dead, but I think your error is in the last line of your code. The lineRenderer connect Points in space and you need to convert your direction to a point.By adding a starting vector to your direction. lineRenderer.SetPosition(3, reflectDir+hit2.point);


0

Without having any inside knowledge it would be difficult to say exactly why they used a particular sound effect. I took a look around online and wasn't able to find any reference discussing it (or even complaints about it for that matter). Based on the other sound effects though, it doesn't seem out of place. They all seem rather arcade-like and ...


1

Yes, you can. Physique, Skill and Will are just English words. They cannot be copyrighted. Game mechanics in general cannot be copyrighted, which is why you can find umpteen bazillion games that rip off D&D terms; not just generic words like Strength and Constitution but even very D&D-specific terms like THAC0 (and the entire original D&D armor ...


0

SDL doesn't provide typical App GUI affordances. (It does have SDL_ShowSimpleMessageBox() and SDL_ShowMessageBox() which are probably only useful for reporting a startup error or a crash, or system advisories.) You could either mix-in some platform-specific bits as @wondra suggests (quick and done!), or use an abstraction layer which caters more ...


2

If you don't use OpenGl library that does not implement open/save file dialog, you can avoid a lot of work(rendering text, folder browsing etc.) by using platform-specific code as your editor will likely run on single system anyway. Just ask you OS do it - quick, "cheap" and easy. Similar question was answered here for linux.


5

Yes, it's lazy design. But you have to understand that, apart from laziness, time and budget constraints may play a factor in how in-depth a game's puzzle-solving is. Each solution needs to be developed, coded, and tested, and the more you add, the more you have to deal with. Witness how buggy today's games get and you'll have an idea. There's also the ...


4

The rule of three sounds like good advice, but often times some of the funnest or best things go against practical advice and yet are still somehow fun or good. For instance, many argue that you need to hand hold a player into a game with an intro sequence that orients the player to their abilities. Legend of Zelda for nes dropped you into a world without ...


2

A simple solution would be to assign the doors IDs, where the matching pairs would share an ID, and have them send the player to the other door with the same ID. Or, if for whatever reason you find the need to make such IDs unique, you could assign door pairs matching IDs where one is negative and one is positive but the same absolute value, and when ...


1

I had the reciprocal of what I should have been using. The math.h class's sin and cos function want the arguments in radians and m_ShipAngle is in Degrees. I was doing movementX = m_ShipVel * (cos(m_ShipAngle * 180 / PI)); movementY = m_ShipVel * (sin(m_ShipAngle * 180 / PI)); When I should have been doing: movementX = m_ShipVel * ...


1

Most games are interesting if you can play them with friends. Start simple, go complex. You can make the simplest possible game, and test if your friends like it. I bet they will give you more suggestions. KISS principle: keep is simple, stupid (check TeeWorlds for an example). It is much harder to make simple (to play) games, rather than complex and ...


1

The point is - what are you really want form your state manager. In my case i created SceneManager that has method addScene(name, state, options) { this.game.state.add(name, state); this.scenes.add(name, options); } And it can decided based on options what kind of scene should be loaded. So in initial phase a do fill it with states like this: ...


2

Something as simple as this would give you the rough time the player will have to react if you were to spawn an enemy right now. minReactionTime = 0.5; //Give the player half a second to react closingSpeed = enemySpeed + playerSpeed; if ( (enemySpawn - playerPosition) / closingSpeed >= minReactionTime ) { spawnEnemy(); }


0

In essence, you need to figure out two things. How to properly preform computation with large numbers. How you want and expect attack damage to behave against weaker and strong opponents. 1 You can either user double or a big number library. Doing computations with large numbers (like in clicking / idle games often relies on such big number libraries). ...


1

You could do this by teleporting the player around - in the case of a staircase, after reaching a certain point just reposition the player several steps back. Of course, the environment would have to be crafted in a way so that the player doesn't notice it (that is, when he looks around in both locations (place where the teleport is and the place he gets ...



Top 50 recent answers are included