Tag Info

Hot answers tagged

8

Well, I'm honestly not an expert on this but... I think it depends on how complex and varied you think the attacks will become. Since it's an RTS I'm guessing you'll have maybe 10-50 or so different units or structures with their own attack types. Option 1: If there is a relatively low number of units that will have attacks that are somewhat similar I ...


6

Typically, a frame is drawn every time through the game loop. Thus, the FPS tells you how fast the game is looping. That said, more sophisticated rendering architectures often decouple the rendering from the main game loop. In that case, the two are only vaguely related.


4

Imagine dots are doors and lines are corridors. This is how you can have three doors connected: There is no reason why you can't link a door to more than one other door. You can have corridors merge at some point. But oldskool roguelikes didn't even do this; they simply connected random pairs of rooms with corridors, and if they happen to cross into a ...


4

I don't know a whole lot about Unity and I haven't done game development in a while, so let me give you general programming answer to this question. I have based my answer on the knowledge I have about entity-component systems in general , where an entity is a number that is associated with N many components, a component only contains data, and a system ...


3

Well, for the first part a lot of modern games are coded in C++, which supports namespaces. Namespaces allow you to group a collection of related code within part of a whole. So you could have a collection of namespaces such as 'Render', 'Input', 'AIProcessor', etc (note: I am making these up) Building these subprojects into the main project allows all of ...


2

height map can be the solution? A big b/w image to manipulate the map heights easly wilth an image editor (gimp?). A (selfmade) tool that transform a B/W image (i've done one in c#) into a matrix of floats and save/load it to file concerning your needs. If you need a memory buffer to keep a small part of your big file map , you can consider an aproach ...


2

They would include that damage (or the data needed to get to the damage value like the RNG state) in the replay information. Each attack is only a numerical value of the damage value, the id of the attacker and the id of the victim. That is 3 values with a limitation on number of units those IDs could be a single byte each. Crucial information is often RNG ...


2

When a unit/structure/weapon attacks, I would probably create an Attack (subclassed with all your fun details) that takes the attacker and the defender (or defenders). The Attack can then interact with the target/defender (slow, poison, damage, change state), draw itself (beam, ray, bullet), and dispose of itself when it's done. I can foresee some issues ...


2

Here is another way to connect rooms with three doors: Make sure the amount of doors in your level is even. Put all your rooms in the not-door'd set Pick two rooms from the not-door'd set Connect them through one of their doors If those rooms still have a door that has no corridor, put them in a partially-door'd set While the not-door'd set is not empty, ...


2

See the answer linked in the comments on your question for a detailed answer. Here is an undetailed answer: Say a character is moving to the right along the x axis. You move it at 1 pixel per frame. In 60 frames, it will be 60 pixels to the right of where it started. If you are running at 60 FPS, it will arrive at its destination in 1 second. If you are ...


1

Apart from technical issues, that's something you get to choose for yourself. There are lots of games/programs that use each of those approaches, so you have to ask yourself what gives a better UX for your users. In my opinion: Choose system language: This is my preferred choice. I dare say the vast majority of users use and expect this. Those who want a ...


1

This is very similar to how one might handle Achievements, or Challenges, or any other situation needing you to keep track of a series of events and counters. Simply coding the rules into a scripting language does work. You would need to be sure that all events related to conditions you care about are exposed to the language. You might also need to allow ...


1

We used hardcoded conditions with some variables in early days. That was working good enough, but quite cumbersome. There were standard objects (houses, army, citizens, time) and deeds (kill, preserve) connected with win/defeat goals. So for example we could have: kill houses of player 5 to win kill army of player 5 to win preserve citizens of player 4 to ...


1

Because stories are subjective and tied to emotion. (The rest of this answer contains daaaangerous TV Tropes links.) Players can become really attached to arguably awkward story or dialogue. They might feel robbed if the details were retroactively changed, without any hope of re-experiencing them that way, regerdless of whether the changes were generally ...


1

Capsuling game modules in shared libraries has the benefit of reduced compile times during development. If the API between modules is carefully designed, it will not change often. This allows you to recompile only the module you are working on. Shared libraries also allow to be shared by multiple Applications, thus saving disk space (and for a certain ...


1

Use tile editor to create the map. Normally those allow you to export the map in some format. Then create map loader for that map, that reads the exported file and create object from it, to your game. If you have to use ascii, split those to sections so that "first town" would be saved to txt file "firstTown.txt" and that would contain the number-to-tile ...


1

You can use an image. Each pixel will be a tile and each 32bit color will encode several values like alpha=0 means impassible. Then you can use any image editor that allows you to save in a lossless format and choose the exact color values.


1

DirectX is a windows API with a corresponding DLL somewhere in your C:\windows directory, similarly with opengl32.dll. Check with dependency walker in you don't believe me. The rest is probably handled through scripts which don't have to be DLLs and just reside in the rest of the assets.


1

A design pattern I've enjoyed using has two types of things: task management and task execution. Task management asks the question "What should I be doing right now?" And task execution asks, "How do I complete the current task?" Task Managers The job of the task manager is to constantly look at the AI's internal state (read-only) to determine whether new ...


1

The best way I can think of to do this is to have an empty object with a TaskController script. Assuming the NPCs have their own scripts, and you can call a function in their script to have them handle a task, your logic would flow like: Player clicks on light switch Light switch script calls CreateTask(TaskName, Index) on your TaskController empty's ...



Only top voted, non community-wiki answers of a minimum length are eligible