text:
Spawning large numbers of navmeshagents causes them to jump position
Cross posted on StackOverflow
I'm making a tower defense style game in 3D using Unity. I'm experiencing a frustrating issue with spawning large numbers of characters in an area of navmesh where if I spawn too many near the same location many of them will 'teleport' immediately after instantiation to near the navmesh destination.
Here's a doodle of one of the levels:

The black spot is the player base the NPCs have to get to. The green scenery has no navmesh and uses mesh colliders. Scenery is mostly steep hills forming a valley the NPCs should path through. It is composed of multiple meshes marked Unwalkable in navigation. The large blue spot is the first spawn location I tried, I later tried a larger area indicated in the right side of the image (see 'things I've tried' below).
When instantiating at the original spawn location if I spawn more than about 20 NPCs at once many of them will jump to the the area indicated by the red spots.
The NPCs have a radius of about 1.5m, as do their colliders and navmeshagents avoidance property.
Things I've tried:

Spawning to a random position inside a circle with a radius of 50m.
Adding a large new hidden area of navmesh as in the image above,
defining an array of vector positions spread well apart and spawning
at each position in turn so no two navmeshagents spawn near each
other.
Adding a delay to navmeshAgent.SetDestination(playerBase)
after instantiation hoping this would prevent the immediate jump to
near the destination.
Reducing navmeshagents avoidance radius. This sometimes
reduces the problem a little but still, even with a radius of 0.1 any
more than around 50 NPCs triggers the problem.
Turning avoidance off althogether (setting to none in navmeshagent), again, can spawn more but problem still happens
Turning off auto traverse links and auto repath in navmeshagent
Increasing the time between instantiations, a large gap of several seconds works but makes the game too easy
Not setting a destination - oddly they still teleport to near the player base,  so I guess destination is not a factor

How can I spawn large numbers of navmeshagents in a short timeframe, avoiding this 'teleporting' behaviour?

Have you tried spawning them with disabled navmesh agents, and enabling the agent on each unit only when you want it to appear?
Also, it seem peculiar that they teleport to a specific area. Is there something specific there, which doesn't appear in the rest of the scene?
In order to fully understand the issue, I recommend trying to recreate the minimal conditions needed in order to repeat this behavior - that way you could better understand the source of the issue, or send a bug report to Unity with the minimal project.


text:
What are some alternative options for saving level data for a game like Hurtworld?
For a multiplayer building/crafting game like Hurtworld (where the player can build structures on the map), what are some alternative options or example data structures for saving the world data on the server?
Level data including:

Grid of squares that foundations can be built on, with a flag to indicate whether the square is empty or already has a foundation
Walls etc which have been built on the foundations, and multiple floors above
Windows/doors which can be built on window frames/door frames
Furniture/machines which can be placed on foundations/floors
Other dynamic world data such as trees, animals, chests with items, etc

I feel like it's too much data to store in a database. Am I wrong?
If it can be stored in a database, how can I get my head around the data structure I would need to set up? Is there some simplified example?
Can each square in the world grid be represented by 1 row in the database? And should there be a new row for each structure built on a square, with that row referencing the square/structure that it was built on?

Keep in mind that there are databases that index the Internet itself. So it's unclear what "too much data to store in a database" would mean. What calculations or benchmarks have you done that suggest a database would not be able to serve your needs?

When trying to choose databases, or any method of saving information, the way the data should be saved should be dependant on its usage patterns, not on how the world is modeled.
Out of all of the information that describes your world, what information needs to be persistent and what doesn't? What information will be queried more often, what less? What information should be returned ASAP, and what could take a while without harming user experience? Are there some bits of data that are dependant on each other, and should be saved together, or is all of your data completely independent?
For example, if you have a round planet, the player will not be able to see all of its parts. Make sure that you model your data in a way that allows the player to query only the visible parts of the planet at each moment.
If you have a LOD system that will show the building and only later minute details such as windows, make sure that getting the building data isn't blocked by getting windows data. If the player will not get closer, that data is irrelevant.
These questions and similar ones should determine your data structures and the way they are persistently saved. From the phrasing of the question it seems like you want to model your data the way you would model your world, and in general that tends to be less efficient. I advise you to learn about data-oriented design, and try to properly understand the constraints you should put on your data, in order to understand how your data should be structured and saved. Once you'll have that, you'll have the constraints that your data places on your DBs.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How can I fix my velocity damping to work with any delta/frame time?
I am decreasing my velocity by 50% every second using a guide I found online. I am using the code here and it gives the right result but only for very small values for dt:
float dt, velocity, position;

dt = 0.002f;
velocity = 1.0f;
position = 0.0f;

for (float t = 0.0f; t <= 1.0f; t += dt) {
    position += velocity * dt;
    velocity = lerp(velocity, 0.0f, 1.0f - std::pow(0.5f, dt));
}

printf("dt = %f, p = %f, v = %f\n", dt, position, velocity);

dt = 0.09f;
velocity = 1.0f;
position = 0.0f;

for (float t = 0.0f; t <= 1.0f; t += dt) {
    position += velocity * dt;
    velocity = lerp(velocity, 0.0f, 1.0f - std::pow(0.5f, dt));
}

printf("dt = %f, p = %f, v = %f\n", dt, position, velocity);

return 0;

But I am getting roughly the right velocity BUT two different final positions back when I use two different delta times (not due to floating point issues):
dt = 0.002000, p = 0.722848, v = 0.499308
dt = 0.090000, p = 0.784219, v = 0.473029

How can I fix this difference inside of my update loop?
How do I account for the extra acceleration between timesteps?

Although you're correcting your velocity, your position update:
position += velocity * dt;

...is still treating velocity as though it's a constant over the frame duration. So, the smaller your timestep, the more accurate this simplification is, but with longer timesteps, it gives too much weight to the high velocity early in the frame, without accounting for how it diminishes later in the frame.
To get this right, we'll need to integrate velocity over the frame duration with some calculus.
If your velocity is equal to...
$$\begin{align}\vec v_{\Delta T} &= \vec v_0 \cdot r^{\Delta T}
\\&=\vec v_0 \cdot e^{\Delta T \ln r}\end{align}$$
Then your position is the integral of this value over your timestep:
$$\begin{align}
\vec p_{\Delta T} &= \vec p_0 + \int_0^{\Delta T} {\vec v_0 \cdot e^{t\ln r}\ dt}
\\&= \vec p_0 + \vec v_0 \cdot \left(\frac  {e^{t \ln r}} {\ln r}  \right) \Bigg|_0^{\Delta T}
\\&= \vec p_0 + \vec v_0 \cdot \left(\frac  {r^{\Delta T} - 1} {\ln r}  \right)
\end{align}$$
In code:
position += velocity * (std::pow(r, dt) - 1.0f)/std::log(r);
velocity *= std::pow(r, dt);

Is there a way to do this without knowing the initial v_0 - purely using the previous timestep's velocity? I want to constantly apply this damping over the entire game runtime.

Yes, here p_0 and v_0 are "position & velocity at the start of this timestep" as you can see in the code example at the bottom. We do not need to know initial conditions earlier than that — we can just treat the beginning of this timestep as time zero for our present purposes.

Thanks so much for this. It works perfectly. I was looking in to semi-implicit euler and runge-kutta 4 as well. Is it any help using that to improve accuracy or will this equation always give a roughly exact answer?

This equation is exact to within the precision of your numbers. Note that any iterated accumulation like this is going to diverge eventually due to differences in rounding. A more general-purpose integrator could help you integrate this physics effect with other influences on the object though.

Is it not always possible to create an exact solution using an equation such as this?

There are functions without closed-form integrals, yes. Not too many that we'd use in this game physics context. I came across one recently when trying to compute the arc length of a spline for instance.

The solution given by DMGregory is the right solution, however, in game loops concerning physics, it's usually advised to use fixed time steps.
Having fixed time steps helps having consistent results across devices with different speeds/capabilities, see this answer for details.
such game loop should look something like this:
while (!exited)
{
    deltaTime = time - lastTime;
    timeSinceLastFixedUpdate += deltaTime;

    int fixedFramesCount = (int)(timeSinceLastFixedUpdate / fixedDeltaTime);
    if (fixedFramesCount > maxFixedFrames)
    {
        timeToLose = (maxFixedFrames - timeSinceLastFixedUpdate) * fixedDeltaTime;
        timeSinceLastFixedUpdate -= timeToLose;
        deltaTime -= timeToLose;
    }

    while (timeSinceLastFixedUpdate >= fixedDeltaTime)
    {
        FixedUpdate(fixedDeltaTime);
        timeSinceLastFixedUpdate  -= fixedDeltaTime;
    }

    Update(deltaTime);
    Render(deltaTime);

    lastTime = time;
}

Please note that engines like Unity have the two kinds of update (fixed time step and variable time step), that's because it updates the physics engine at fixed time step, and then it can interpolate/extrapolate physics results inside the variable time step Update calls in order to keep everything smooth at high frame-rates, updating particles, animation, etc. also happens in varying time steps.

Fixed Timesteps are a huge win for consistency. I'd still recommend using the correct integration formula for deltaTime though, even inside a fixed timestep. The reason being that if you as the developer later change your fixed timestep (say you developed at 50 Hz, but need to drop to 30 Hz for a mobile version), then you won't have to re-tune all your physics parameters to get back to the same feel on this version of the game.

Thanks for the answer! I am already using a fixed timestep of dt but, for performance reasons, I am changing dt to a higher value when it lags behind instead of calling my update multiple times.

@DMGregory Agreed.

@LillyJonas In this case you're still forsaking consistency. I don't have an all-around solution for you but maybe you can try another compromise, the code I just edited-in solves the problem of lagging behing indefinitely, but on a slow device 1 second of simulation would take more than 1 second in realtime, if that's unacceptable then the only thing that's left is varying timestep, using the integration described in DMGregory's answer of course.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Why do I get these weird errors when using pow() for my game?
/usr/bin/ld: /tmp/ccfm5eKc.o: undefined reference to symbol 'pow@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I get this error when trying to use pow(). Why?

According to this, you need to add -lm to the flags.
This was supposedly fixed in a newer version.


text:
Minecraft Optifine - where is the zoom class?
I'm working on a mod where I want to have a zoom feature like Optifine. To start out, I want to try messing around with the zoom in the actual Optifine mod. There are a lot of .class files, and I don't want to decompile all of them one by one, so if anyone knows which one(s) have the zoom that would be super helpful.

Optifine just lowers the FOV to achieve that effect. Do you really need to decompile the mod to test this?

Oh ok never mind I thought it was more complex than that. Thanks.


text:
Displaying pixels on a canvas at 60 hertz
I'm (new to SO and) attempting to code an "emulator" for an 8-bit CPU I am making with a friend.
I have only ever used Java to make simple GUIs with Swing, and from reading similar questions it seems to me that using repaint() and Graphics2D to display 60fps is not the way to go.
From my attempts at using a custom JComponent to draw, I couldn't agree more. Despite calling screenComponent.repaint() 60 times per second, Java was only updating the screen around 2 times per second, whereas the video memory byte array (stores pixel data) that was also updated 60 times per second (before calling repaint) did change every frame.
So my question is: what can I use to display my one-dimension pixel array (using y * width + x to get pixels at a coordinate) and update it at 60fps?
What I need to be able to do:

draw each individual pixel with a set color
-draw text with a font and size (the computer I am emulating has a toggle able text-only graphics mode)
efficiency is not a huge concern since the main purpose of this is to test assembly programs that will later run on the physical CPU, but it needs to update the screen at 60 Hertz and run CPU clock cycles at least at 1 kilohertz
scale up the canvas as the cpu only displays at 78 by 128 pixels (I did this in swing by using g2d.fillRect to display pixels and multiplying the arguments by a screen size multiplier integer)
not 3D

What system are you targeting to run this on? Windows? Linux? macOS? iOS? Android?

I only need to support windows. (both my desktop and laptop run it and that's the only times I will use the emulator)

Try something like LibGDX, JSDL or JSFML and render pixel-plotted results to a fullscreen texture.
These are mentioned because you ideally want an existing, fast 2D pixel plotter founded on an API like OpenGL, that provides hardware rendering support; because even though you don't need 3D, you do need fast draw access. And you need Java bindings.

Will these libraries will allow me to draw pixels and text or do I have to render in 3d orthographically? Also,  JSDL seems to have discontinued development since a few years... Which one would you recommend me to try first?

Did you click the links I gave you? Because if you did, you'd have already had an answer to that on the very first link.

Yes, but upon downloading the setup app from libgdx's website, I am asked to select an Android SDK install location. I don't want/need to support mobile.

Just do as it asks and then you can get going on your Windows coding. You're developing for Windows; we know that. It just so happens that LibGDX was initially designed for Android and that is still its most popular platform for deployment.

I don't have the Android SDK installed, but unticking the Android option in the "setup app" allows me not to specify an Android SDK location. My main class is in /Documents/Celsior/src/celsior/Celsior.java, and I entered "celsior" into the package name prompt. Clicking "Generate," however, I am informed that I have an invalid package name. I have tried selecting /Documents/Celsior/ as well as /Documents/Celsior/src/ as my project location, with no luck.

I can't help you to become a developer (which includes dealing with the sort of bumps in the road you're experiencing right now, on a daily basis). I have assisted with the question you asked. Good luck.

Thank you and sorry, I'll try to figure out intalling libGDX myself.

I eventually figured it out, using libGDX as @Engineer suggested. The trick was to use a Pixbuffer object and write it to a Texture, then call buffer.draw on the texture every time a frame is rendered.
Setting up libGDX was also a bit tricky as I am not familiar with Gradle and prefer to use NetBean's compiler instead. I had to import the correct jars from a nightly build of libGDX as the setup tool offered insists on using Gradle. It was relatively easy to use afterwards, which is really nice.
For reference, I believe I just imported:
gdx, gdx-natives, gdx-backend-lwjgl, and the font extension so I could load my text font and scale it according to the screen size.
I (think?) I accepted Engineer's answer and upvoted it, although I believe my vote doesn't count due to my low reputation. Whoops.
Here's a screenshot of the window in action:


text:
How can spotlights be implemented with a perspective projection?
I was reading Shadow Mapping with Directional Lights
and noted that spotlights are implemented by rendering with the perspective projection, stating that the spotlight worked just like the camera. However, I don't see how this could be, as the cross section of a spotlight is a circle, but cross section of the perspective projection frustum is really a rectangle, so wont there either be extra information or too little? Or am I missing something. If you have any questions please feel free to ask I will try to respond as quickly as possible. Thanks a lot for your time!

Yes, there can be extra shadow information outside the actual cone of light. Since ultimately you mask this area anyway with an angular falloff formula or light cookie, it doesn't impact that final image observed by the player's camera.
If you want to prevent rendering of scene geometry in these areas of the shadow map, you can first render a circular cut-out of the appropriate radius positioned at the near plane. That way any fragments of scene geometry that fall in the corners of the square will fail the early depth test and get skipped.


text:
How to Destroy an Instance of a Prefab Without Removing the Prefab?
I'm making a simple runner game where obstacles spawn off in the distance and move towards the player. I want to remove them after they're invisible to the player.
I made an Obstacle prefab and a SpawnObstacles.cs script, which I added to an empty game object. In it, I call
Instantiate(obstaclePrefab, xLocation, yLocation, zLocation, Quaternion.identity);
a set number of times per second.
In the Update() method of the obstacle prefab, I have
if (transform.position.z < -20){
    GameObject.Destroy(gameObject);
}
so each obstacle will destroy itself automatically.
When I run the game, I get a:
MissingReferenceException: The object of type 'GameObject'
has been destroyed but you are still trying to access it.
error on the Instantiate call in SpawnObstacles.cs
Before the game starts:

As the game is running:

How can I have a single instance of a prefab destroy itself without destroying the entire prefab? I think I need the obstacles to be inside the Obstacle Prefab. Perhaps I could loop through all obstacles and delete the ones invisible to the player?

I think the problem is that your SpawnObstacles script is referencing a obstacle that exists as an active gameobject in the scene, when in fact it should be referencing that object as a prefab. Do you know what I mean? Before your game runs, before you get a chance to spawn any obstacles, are there already any obstacles in your scene?

@SeanCarey this looks like it could be a good answer, especially if you include a screenshot or two to illustrate the difference between a prefab in the project folder vs an instance in the scene.

Your SpawnObstacles script is referencing a gameObject in the scene, rather than an actual prefab. To create a prefab, drag and drop your Obstacles object to your assets folder. Then make sure that your SpawnObstacles script is referencing that prefab, rather than the gameObject itself.

Thanks, this worked. I also had to add "player = GameObject.Find("Player")" inside the Obstacle Prefab's Start() method since you can't reference game objects (from the inspector) in a prefab.

@GreenPlasma Rather than that, assign the "Player" tag to your Player object, and use FindGameObjectWithTag. Searching through the tags is usually faster than searching through all of the objects, because there aren't as many tags as there are objects. Also, keep in mind that when you use GameObject.Find, your not just searching all of the objects, but also their children, grandchildren, etc...


text:
Game artist computer workstation set-up – is this overkill?
I'm part of a small business (so very limited constraints)  working with a very talented, professional game artist and will need to provide all necessary equipment. The artist has asked for the following setup (which to me seems super expensive):

Latest graphics targeted high-end laptop with matching keyboard
Large drawing tablet
Ergonomic mount for the tablet
Vertical ergonomic mouse

Do they really need all of this? Why?

I changed the scope of the question. "What equipment to use" is not a good fit for our site, as technology changes over time.

The software they use should have minimum/recommended hardware (CPU, GPU, RAM, etc.)  Compare that to the specs on the laptop they requested.  You may be able to cut that back, but bear in mind that if they're doing CPU/GPU-intensive rendering operations, you'll save time with better gear (and time==money).  The gear they physically interact with probably has less wiggle room... my niece is an artist, and she makes thorough use of a fancy Wacom tablet.

If being mobile is not a requirement, I would suggest to stay away from laptops as their performance is limited by an amount of heat they can dissipate. Also, similarly specced desktop will be noticeably cheaper.

Assuming that both you and your artist are somewhat well-paid professionals, I would wager a guess that the paid working time (because that's what it is) that you spend discussing this issue will probably already cost a significant fraction of whatever it is that you are hoping to save. In other words: it's not worth it. However, I second n0rd's comment: mobile workstations are freakishly expensive, and neither very good at being mobile, nor very good at being workstations. If you can get away with a "proper" workstation at all, go that route.

Or look at it this way: the workstation will probably be used for about 2 years, until it is replaced. And, let's say it is 4000$ more expensive than what you are willing to pay. That is about 1 month's salary for a well-paid professional. If the more expensive machine allows the artist to be only 5% faster, he will already have saved more than one month of work during the lifetime of the machine. Plus, if you really spend 6000$ on a machine, it can be re-purposed as a fairly beefy office machine for almost a decade.

I'm with Jörg here. Even the most ridiculous machine amortizes over its lifespan to basically nothing per day. If you'd rather they waste 30 minutes per day doing nothing but waiting impatiently for something to render out because you skimped on the machine, that's your call, but just remember that that losing thirty minutes per day over the course of a year could be in excess of ten thousand dollars lost time.

I'm also surprised at the request for a laptop (with no apparent request for one or more external monitors) because most good developers and artists tend to prefer at least one reasonably large, high-resolution screen. (23" 2.5K is about my minimum truly comfortable size, and my standard working environment is a 27" 4K monitor. Many developers I've worked with prefer two 27" 4K monitors.)

How is a Vertical ergonomic mouse, expensive? A keyboard? Give those guys a chair and a desk. Eliminate the need of 4,5 Kg laptop.

@CurtJ.Sampson: If you go back to the original you can see what gets later described as a "large graphics tablet" is actually a "Wacom Cintiq Pro 24+". For those unfamiliar with Wacom's lineup that means it is a large, high-resolution, monitor that you can draw on directly.

@JackAidley Ah, good find! I hadn't thought to look through the edit history for more information. I had ineed wondered if the tablet requested was a display tablet, which of course is considerably more expensive than a non-display one. And substituting a non-display tablet would significantly change the design experience for the worse. (Though it might be reasonable to back off to a smaller, lower-resolution tablet with an additional separate 4K monitor, for savings of $1000 or so.)

First of all, saving on work equipment is often saving at the wrong end. Giving your employees suboptimal equipment does not just hamper their productivity physically, it also hampers their productivity psychologically because they do not feel valued.
But on the other hand, if you just ask your employees to pick out any equipment they want and don't give them a budget, then it is to be expected that you get a Christmas wish list with everything they ever dreamed of working with.

what are some budget-friendly and reasonable substitutes for these?

Ask them. We do not know what your artist really needs. Maybe they are working with software and techniques which require that much equipment. Maybe not. "Game art" can mean anything from low-fi pixel art (which you can do on a 10 year old office PC) to cinema-quality pre-rendered 3d movies (which might require a million dollar render farm in the basement).
So asking them "Do you really need all that stuff or could you do with less?" Or "We got a buget for your equipment of $xxxx, would it be possible to stay within that range?" can't hurt. But if the answer is "no, I really need all that stuff", then you should trust their judgment. They know best what equipment they need to give you their peak performance. If you don't provide them with the tools they need to give you their best work, then you can't expect to get their best work.

might be useful to link Joel Spolsky's article on topic https://www.joelonsoftware.com/2006/09/07/a-field-guide-to-developers-2/

@aaaaaa While the article has a lot of useful advise about how to keep developers happy and productive, the part of it which is relevant for this question ("Toys") is just a single paragraph of a very long article.

+1 for giving them a budget to work with but not choosing for them.

you get a Christmas wish list with everything they ever dreamed of working with. I can't upvote this otherwise excellent answer because of this sentence.  It is my experience that the vast majority of professionals with more than a couple years of experience will ask for things that will actually affect their productivity.  Nothing on the list that OP provided is even out of the ordinary.  The laptop could possibly be replaced with a desktop for cheaper, but everything else (and even the specs of the laptop) probably are legitimate necessities for optimal performance from this employee.

A laptop is probably not a good idea, unless they need the portability. However, multiple monitors will increase their performance by a measurable amount.

Laptop is a waste of money, everything else is acceptable.
Ergonomic mouse and mount for tablet is a must. If he is going to be drawing for 8 hours a day, he will need it for health reasons.
Large drawing tablet is also acceptable. It's easier to work with a large canvas.
In regards to the laptop? Why? High end laptops are 4 times the cost of a high end desktop. Explain this to him and show a cost comparison.
As others have said, employees need to be able to work at their best, but at the same time they need to understand the realities of the business budget. Ask the artist to draft a cost comparison between the cheapest and most expensive items he wants. Once he returns the comparison, draft a budget and then return both to the the artist and let him choose where he wants to allocate his resources.

"Laptop is a waste of money." Depends. If you expect the guy to be able to bring his computer to meetings, maybe not.

When you're talking high-end processors and graphics cards, it's cheaper to buy a powerful desktop system and a cheap laptop than it is to buy a laptop almost, but not quite, as powerful as that desktop system. Not to mention which, carrying around a lightweight low-power notebook with long battery life is a lot nicer than lugging a heavy "desktop replacement" that needs to be plugged in to power frequently.

If someone requests an unusual mouse, they may have (or be concerned about) repetitive strain injury. It's better to pay for the ergonomic mouse, than to lose the employee because their hands are too sore to work.

@Robyn, ErgonomicMouse is less than 30-40€. If someone wan't one just by 5 of them. It's cheaper than a back toner.

@CurtJ.Sampson Not to mention that having just a powerfull desktop and a somewhat weak notebook is more than enough if all meetings are in the office (or arrange to get a VPN). A simple VNC or an RDP connection is enough. I would put the money saved from the laptop into a quality display.

@CurtJ.Sampson Really depends on the requirements. If you have two machines you have to deal with keeping them in sync, you may have to deal with network issues etc. You may not be able to work as efficiently from home if you save on the laptop etc. But yes, it's at least something to clarify.

@FrankHopkins You're correct that there may be some extra work involved in synchronizing whatever you need to sync across the two machines, though there are good solutions to all of this, including simply using remote desktop access to the desktop PC for certain cases. But another think to keep in mind is that this extra work to synchronize things (e.g., files via Dropbox, or documents via Google Apps) also provides a backup solution as well, which is something you'd want to deal with anyway.

Why do you assume the artist is a he?

@CurtJ.Sampson: It's actually a mac book asked for in the original unedited question. Assuming the artist needs a Mac, that mostly rules out those cheaper desktop options.

@JackAidley A MacBook isn't a powerful laptop. At all. It isn't a laptop with "Latest graphics targeted high-end laptop with matching keyboard". In fact, it has the latest i7 CPU with an Intel HD Graphics 615. A MabBook Pro (15 inch) can have up to an i9 and up to a Radeon Pro Vega 20. The artist requested "Latest graphics". You won't find it in any Mac laptop. It is clearly a Windows/Linux laptop. Even an Nvidia Geforce GTX 980M seems to be better than that, and was introduced in the end of 2014.

When making graphics you, usually, want to be able to layer a lot of assets. The more you can layer the richer the image is likely going to be and the more exciting it usually is.
How much power one needs depends a lot on style, user and art direction. However, I would like to point out that you do not want your artist to be hardware constrained under any circumstances. At the end of the day, your artist easily costs you more money than your hardware. If your artist is sipping coffee all day waiting for his tools to respond, then it's not money well spent. You are literally "saving" money from productivity, which actually even more costly.
Now artists, usually really need screen estate. So having a big screen or 2 is actually a productivity increase. Personally, I wouldn't supply artists with laptops, because big power laptops are not really portable. So any benefit you'd get from a laptop is lost. I would supply them with a good ergonomic desk and monitors though. And a separate laptop if they need to work from outside the office.
A tablet is a highly personal thing. Some need it others don't . Ask what tablet the artist  is using  now for his art. This lets  you gauge  whether or not they actually use a tablet at  all or just thinks he needs one. Only an artist that is currently working on a tablet needs one. Acclimatizing to using  one is a very slow process so unless artist already has a tablet  workflow i would not get one.  This said  you should still have a tablet for those that do and for ones that  need to transition due to workload.
At the end of the day you need to trust your artist. That  also means trusting what they request is a really needed. You can negotiate cheaper or let them spend the budget. Just remember at the end of the day art is expensive.

I doubt that the number of layers you can use is much of a constraint on any modern hardware.

@Immibis Layering is not the same as using layers. Layering can be about adding complexity in various ways such as how fast the brush interaction is. See brushes blend pixels in layers. How fast the brush interaction is in a 20 million polygon displacement map is slightly different than a few layers in photoshop. Layering can be running a a procedural generator to generate fur and trees. Or stamping a million particles.

The additional cost of the mouse is unlikely to be significant compared to the drawbacks of having one with poor ergonomics. That, and the tablet stand, are definitely not worth questioning unless they are crazy expensive (at least $300 each with obviously comparable models available for significantly less money). The tablet is in much the same boat; depending on what sort of "art" we're talking about¹, this is likely the single most critical tool your artist will be using (note: I have some experience here).
Depending on the artist, they may or may not want some form of tablet/screen combination. Even though that could get quite pricey, my inclination would still be to go with whatever they are most comfortable using. (The flip side is if they're just trying to leverage you to get "shiny hardware". You could guard against this by asking if they have prior experience with the hardware they are asking for, or, as others have suggested, just give them a budget and ask if it's possible for them to work with that. BTW, this is basically how my own employer works; we get so much $$ to buy hardware and can more or less spend it however we think is most appropriate.)
(¹ Painting of any sort is best done with a tablet. Someone doing level design might not need a tablet, and a modeler may or may not, depending if they also do texturing or if the "modeling" involves "sculpting"/"3D painting". However, any sort of raster graphics is likely to benefit from a good tablet, and if they're doing something whose analog equivalent would involve hand-held tools, a tablet is almost certainly going to be worth it.)
As noted... the real question should be about the laptop. If they don't need portability, a desktop is going to be a better value. That said, depending on what they're doing, art work is pretty good at hogging resources, so it's not unreasonable to want a respectable system.


text:
Working hours and productivity expectations for game artists and programmers
I have a startup with a limited budget and have recently hired a programmer and an artist. Before they started the project, I set down a project roadmap with a lot of good documentation on what needs to be done and deadlines.
Both were asked to produce a timeline as to how these deadlines would be met. For the artist, I mentioned that if the workload was too much, it might be possible to hire an additional contractor for a month or two while they need help.
I have already started hearing things like, "well, I might need some extra help with this," and "I'm not exactly sure how long it will take me right now, so these timelines are just very rough estimates." And I get it, they're trying not to set themselves up for failure, but as a manager, I also need to know what the heck is going on.
So, there are two questions here:

I frequently see both my hires using non-company Slack, answering phone messages, and doing life admin on my watch. They've turned up late more than once in the first week, when I have a company policy of being in at 9. Maybe this is unorthodox, but we're working on a big project, and the last thing I want is them turning around and accusing me of under-scoping the project. On the other hand, I realize that this might be the norm elsewhere, in larger companies. What can generally be expected from artists/programmers in terms of working style and productivity? What's the difference between flexibility and being lazy?
My artist has already started to refuse other work (work for marketing assets, etc) on the basis that they have a lot of work on their plate already and need to manage expectations. I could deal with this if I didn't see them coming in late, answering messages on Slack, and generally doing things that don't relate to work. On the other hand, I don't know if this is normal/necessary for creatives. Is it?

If it can help:

The studio is situated in Europe.
I have no written policy, but working hours are contractual obligations.
We're using agile project management.
We are 3 people working on the project. Both are "leads" so they make decisions related to their own fields – art and code

Comments should be used to improve the question. Please use the "Your Answer" box below to post an answer. Please avoid repeating what has already been written.

Setting down a project roadmap, including deadlines, in advance, is the exact opposite of Agile project management.

For the artist refusing other work, isn't this just a matter of priorities? Of course extra work will affect deadlines, but isn't it your job to prioritize?

@JörgWMittag More or less on the deadlines; Sprints in Scrum within Agile can be interpreted as having deadlines.

@lucasgcb: But those deadlines are short (typically one or two weeks), re-evaluated every sprint, and set by the team. None of that is the case here, as the OP wrote, he set out the entire roadmap and the deadlines before the project even started. Agile is about continuous feedback and adjusting the process based on that feedback.

If the OP did set up a roadmap with deadlines for each and every point then yeah that's nothing Agile. Is this really the case, OP?

Ever heard the saying "You can have it on time, on budget, on spec. Pick two." ? Well you've apparently chosen time and budget. Guess what's going to happen to your project.

I can tell you from personal experience that giving estimates is hard. Very hard. You just can't know what will happen in the future, how long a certain task will take. And yes, I need coffee breaks too. The brain is like a muscle and overexercising it will yield diminishing returns. From what I could see, it seems you have too high of expectations what your employees can do per day. Forcing them to comply with your expectations will burn them out, as was seen with BioWare and others.

How late were they?  What kind of commute do they have--how variable is the travel time due to traffic?  How did you communicate the policy of coming in at 9?  Did you communicate it as "You're expected to start work at 9am" or "We generally try to start work at 9am"?  Those details make a big difference between having employees who aren't respecting a policy, employees who may just be getting caught in traffic, a boss who needs to lighten up (e.g. if they're less than 5 min late), and a boss who hasn't communicated expectations clearly.

It sounds like you may be holding onto waterfall thinking while trying to lead an Agile team.  See my answer below for my recommendations.

@lucasgcb So, we're at the very start of the process in developing the game, and we have some tight deadlines as well. But, what I've really tried to plan for (fully realising they'll readjust and change) are some of the initial sprints and features we might like to build out during those.

Just curious -- given that it's 2 (or 3 people, not sure what your exact involvement is) people, lead level, working on what appears relatively independent tasks, what's the benefit of having them sitting in the office strictly between 9am and 5pm everyday. We never needed anything so draconian with significantly larger teams in a company orders of magnitudes larger. Trust your people, let them self-organize. This is not a factory job standing at a production line cranking out the same thing over and over.

"we're working on a big project" - no. This is a small proejct because it seems to ahve 2 only developers. Large projects are mutliple SCRUM teams of 5-7 productive people each, plus testers, busines analysists etc.

People are bad at estimating how much time they need for something as well how much time they can actually be productive in a given period. Therefore, a manager should be used to multiplying estimates by a relatively large number to get the real expected amount of time.

It's not unusual for workers to be less than 100% engaged in task work for the entire duration of the work day. Humans have a hard time focusing on one task for longer than 20 minutes without some form of interruption.
Research suggests that, out of an 8-hour day, on average, workers are productive for less than half.
In fact, reducing the total hours worked in a week can increase productivity in some circumstances.
This isn't an argument for "anything goes" or making drastic changes to your office hours without further investigation. But, a little variance in arrival times and some non-work activity occurring during work hours is not necessarily cause for alarm.
Clamping down in a draconian way to try to eliminate non-work activity may well backfire, leading to unhappy and burnt-out workers who are less productive or outright quit.
Instead, let your project milestones be your guide. If your workers are meeting the schedule goals that were established early on, then you'd seem to be on track. Refusing work over and above the agreed-upon schedule is a reasonable thing for a worker to do, and not necessarily a sign of slacking. If you have more work than your scheduled bandwidth allows, try to incorporate this learning into planning for your next sprint/milestone/work unit, so you can prioritize the tasks or bring in additional helpers as needed.
If the project is falling behind schedule, that gives you a good, evidence-based way to raise the issue with your team, and work with them to find solutions to bring it back on track.
Studios I've worked at have for example instituted "focus afternoons" 2 days a week, in which we're requested to not schedule meetings, play videos in the background, or have conversations at desks where they might cause distractions, so everyone has a block of time they can count on to be uninterrupted.
Talk to your team about whether something like that might work for them, and involve them in the decision-making, so they feel like they're collaborators finding solutions together, not children being disciplined (nobody does their best work when they're feeling punished). Just knowing what's at stake and being empowered to help solve it may be enough to inspire your team to adjust their arrival times / focus to pick up the slack, if that's what's missing.

Well put. I would just stress that things like "being empowered", "involve them in the decision-making", "let your project milestones be your guide" are the cornerstones of an agile mindset, which the OP claims to be using, so it should be right up their alley.

I would go so far as to say that as long as the direct reports aren't being insubordinate in the way they do so, the fact that they are setting expectations like this rather than blindly saying "sure I can do that on top of my other tasks!" is a good sign that they are excellent employees who know how to manage time and risk, and whose judgment OP should trust more.  Much more.  They may well save the company from going way over schedule and budget.

This is a nice reason I can give to my boss for why I'm not working at the moment, and instead reading SE

It is worth noting that sometimes the plan ends up being unrealistic. As a result, cutting scope (or delaying it until after release) is frequently a solution that ought to be on the table.

@jpmc26 In some Agile methodologies like DSDM, it's the only solution for projects suffering from delays, since time, cost, and quality are all considered to be fixed.

Good grief, reading this question stressed me out. You don't think your employees should be allowed to send personal messages and attend to their life during work hours? The top answer says it better than I will, but that's completely unrealistic. If you expect your employees to be focusing on their tasks 100% of the time, you're going to lose them.
Most businesses are open from 9 to 5, at least in America. It makes no sense, but it's the world we live in for some reason. That means that human beings who need to make appointments and deal with real life stuff are going to need to take care of it during work hours. If you offered flexible hours instead of insisting they come in at 9 (and presumably stay until all other businesses will be closed) then that would sort of be one thing (even then it's harsh), but demanding they stick to these rigid hours and then getting upset when they need to do people things is delusional.
Add on top of that that people have kids and family and situations at home, and you should be realizing that your expectations are insane. If you want to dedicate your entire life to work and sacrifice the meaningful portions such as relationships and health, that's your prerogative. But that's not a decision you should be making for your employees.
If you need to get more work done, you can hire more people. If that's not possible, you need to cut back on your expectations and goals for the project.

I think that strict working hours is generally not a good idea. For example I belong to these 20% of people who are much more productive at late hours. I worked in startups and big companies as well. I always had that talk with my managers about the late hours. After all I always told them, yes I can come to the office at 8am and be completely shut down until 2pm being almost useless... On the other hand, I always was completing my tasks on time and even before - I worked from 11am to 10pm because it was best for me - resulting in my own better productivity.
Also doing a little bit of own stuff (like answering couple of mails or even watching a YT video) is not a bad thing even contrary being a programmer, the job is intense and tedious. A human brain cant really work a full 9 hours straight; it needs little breaks - these breaks are actually much more productive than just sitting and staring at code - in these breaks I usually get the brightest ideas popping into my mind - that leads to good solutions for the problems. So I suppose everything is relative - of course it shouldn't be abused and the employees shouldn't watch YT all day long.
After all the best measurement of productivity is when you see if the employees are making their tasks in the given time (of course if the times are set correctly). I think the best way is to break the task into short time spans and check them once in a while - like once a week or once every 2 weeks or whatever makes more sense for you.
Taking all I said into consideration, if they are not meeting the deadlines consistently and not motivated enough to work on the project - then you have hired the wrong people and your best choice is to replace them with the people who will.

Feeling more productive at late hours is a cognitive bias for most people. I did trust this feeling until I mesured my productivity. Then I found I was more productive while sleeping, basically waking up to type code as it come for a short time.

I think apart from the above mentioned views, I guess one has to take the region/country where the company is located. The culture has a major impact on these kind of stuffs too.
For example. I have worked in India, US and Currently in Germany. In India, People tend to come late everyday, I observed them to be less productive on first few hours after entering the office. They frequently use mobile phones and enjoy coffee breaks in Cafeteria. Having said that, they tend to form a strong bond among their colleagues.So, when it comes to work, They tend to finish it somehow to meet the deadlines.
Meanwhile in US, you can't restrict them or pressurize them to do a certain tasks. They feel responsible for the job no matter happens. In short, they don't like people bossing them around.
In Germany, things are completely different. They strictly follow "Work Hard and Party Hard" culture. Inside the office, they won't do anything related to their personal life. Even when having a chat with their colleagues, it will be about the work flow. They are extremely sincere. They care more about the quality than velocity. But I haven't seen them working after their required working hours in a week. No matter what happens they leave the office after the requested period.
Hope this point of view helps for you to analyse your Resources

There are some red flags, but probably not the ones you expect
This

I set down a project roadmap with a lot of good documentation on what needs to be done and deadlines.
Both were asked to produce a timeline as to how these deadlines would be met. For the artist, I mentioned that if the workload was too much, it might be possible to hire an additional contractor for a month or two while they need help.
I have already started hearing things like, "well, I might need some extra help with this," and "I'm not exactly sure how long it will take me right now, so these timelines are just very rough estimates." And I get it, they're trying not to set themselves up for failure, but as a manager, I also need to know what the heck is going on.

...sounds more like waterfall and less like Agile than you're probably aiming for.  The point of Agile is to manage risk better by planning less up front, when you know far less about scope, schedule, and budget, and instead focus on continually adding value to the product and planning only as much as you need to at any given time.  This lets you 1) always have a product that you can demo and maybe even sell; 2) always know the pace your team is working at; and 3) what you can reasonably accomplish in a given amount of time.  As a result you can better respond to schedule hiccups and changing customer needs, both of which are important for a startup.
It sounds like your employees are doing Agile and you're unintentionally trying to force them back into waterfall.  I'd recommend spending some more time learning about Agile, particularly with a focus on startups where I understand the risks are high and you want to avoid costly mistakes.
But if I were going to create a software startup I would 100% choose Agile over waterfall, because it would enable me to be more agile instead of blindly going over the waterfall because my employees didn't set expectations with me and instead kept taking on more work while promising to meet a deadline that had been set in stone months ago and that was not achievable.  You don't want that.
Bottom line: other than possibly the lateness issue, your employees are doing exactly what they should.  You need to take a look at your management style; it seems to be the issue.

Having managed several studios for a few of the large game companies, I could write you a large answer about productivity, etc but the problem is rarely there:
First, you can't expect people to sit 8 hours focused, it won't happen.
Flexibility is very important because if people can't deal with calling their bank, etc at the office, you will start to feel it very quickly. Unless there are some important deadlines, and the work is purely related to the time put in (as in no problem solving, no research, etc) you can't measure the work in hours and it's much better for employees to have flexible time, within reason.
In order to get people to be productive, forget time and focus on short measurable goals but also make sure they really understand, and share, the end goal. If they don't care about your project and are just contractors that want to collect their pay, your product will never be good.
People go into games because they're passionate about it, so you already don't have most of the problems you'd have with contractors in general.
But you have to get them interested in your product and involved in building it, not treat them as extensions of your brain that will implement what you tell them.
If there is no team feeling, productivity will be low, no matter the talent.
Another common thing in games is that your schedule is probably wrong; in almost 30 years in this field, only one team I was a part of (making the most popular soccer game) had a schedule that was realistic and made sense. It was an experienced team where people were used to work together. You have to constantly refine the direction with the team to see what can be done with the time / budget you have left, keeping in mind that there are always unknowns, etc popping up.
Almost all the time, productivity issues stem from management mistakes. Make sure the team likes the project, want to see it published, are contributing to it more than just coding and drawing, like it's theirs too, and that the goal makes sense at any moment.

Well maybe I am just wrong but... I didnt like my last company’s product it wasnt just talking to me. However I got payed for that work I’ve done and I’ve done a great work I really proud of it from many aspects (I am a programmer) I have participated in the UI/UIX design and brought many features to it, I have done really great performant stable and multithreaded systems for that app (it was an audio middleware and also an app, I worked for the app) I worked on it alone and even finished 3 months before the scheduled deadline.

My point is: I dont think that employees should be 100% believing in the product. Personally for me it doesnt even matter if I getting payed for something, I will do my best work, because this is how I was educated, this is how it works for me. I was hired I was payed a big money and I was providing my best. And yet, I didnt like the end product, I wouldn’t ever invest in it. So the point of dont care about the project is not a 100% situation, or I just dont understand something.

That means you'd be an awesome employee at many places ;) There are people like that, but my experience with games is that passion for the product is a very important driver because we can't spec out everything since a lot of things depends on how the game feels, plays, etc; by having everyone buying into the product, each actor is making their own personal contribution to make the product parts fit together; having works for most major game companies, I've seen a lot more complaining than anything else from the programmers when they don't like part of the product.

As I said I don’t know for everyone, after rethinking it again, perhaps it is just a personality aspect. I’ve done a lot for the games industry as well, I didnt like every task or every aspect of the particular game or a plugin, but I still did my best. I actually looking at it differently: I am selling my knowledge - my code as part of it to the employer and it is going to be the best I can provide.

But I just felt that it is worth mention... if someone disagree with some mechanic of the game (for example) it doesnt mean he wont do it at his best.

I think that's a bit how I ended up thinking before leaving, just renting my time; quite a few of my friends ended up with the same feeling since we're all nearing 50 years old, but the younger people are definitely driven by passion that you need to keep alive

I am 32 couple of days back. And my quality is not driven by what other ppl will think about me or my job done there. Its just my vision of the world. If you hired me and I dont do my job well then I see it as stealing money from your pocket :-/.

A few things you need to know about creative types:
Programmers love being 100% engaged for hours at a time. This allows them to achieve deep flow. To gain the benefits of this, you need to provide a work environment absolutely free of distractions. Separate offices or remote is ideal. Cubicles are marginal. Open workspaces obliterate productivity. Something as simple as asking someone what time they're going to lunch can destroy half an hour of work.
Whether a developer is in deep flow or not, code quality drops off precipitously after about five hours of hard thinking. And sometimes that thinking may not look like work. I do some of my best programming with my eyes closed on the couch.
Read up on Scrum and other Agile methodologies. Set reasonable tasks and deadlines (which is a skill in itself that you'll need to hone as a team) and then let your developers decide how to meet those goals. Other than your daily standup, you don't need to synchronize your schedules at all. In fact, it's probably better if you don't.

+1 for "Something as simple as asking someone what time they're going to lunch can destroy half an hour of work." It's like juggling - when someone snatches a ball from you, you drop all of them, getting back to the point of interruption takes you way way longer than the interruption itself.

Well thats individually for everyone. Some people can’t be interrupted, some can write code and talk at the same time (I am one of the last and also met 3 other people like me). However I find myself closing my eyes putting a hood on my head and thinking sometimes as well.

@ColdSteel I think the ability to work in a distracting environment is a learned skill. I work in a very distracting office, and after a year I've managed to get my productivity up to maybe 60% of what it was when I worked from home.

@TKK I always remember myself like that, but maybe you are right. For me there is little difference if I work from home or at the office.

Adding to other answers, it's worth noting that on top of the average office worker, most creative work like art and programming certainly does not benefit from monitoring over the shoulder and counting down the minutes.
However, this doesn't mean you cannot track or expect a deadline for goals.
If your workers legitimately do not know when a task will be completed from your plan, their task is actually too big - or you've presented it as too big. Break the tasks down to things your workers can deliver frequently and effectively build up to your MVP. Think SMART goals and involve them in the process. Have a brief stand up meeting everyday to figure what's being tackled today, how work is going, or what's impeding their progress.
To say it again, do not set up overwatch on them with work hours. Gather with each team and discuss reasonable scope and deadlines. Do not micromanage, specially over creatives.

I think you were taking the problem on the reverse way (but hopefully the previous answers changed your mind).
Here is my way to lead creative people, and the way I like to be lead :

I make sure they feel engaged toward the project. It must be their baby, not mine. I'm very strict with the briefing and then give full freedom within the defined frame. I feel very bad when I have to say someone "I know you don't want to do this that way but you have to" each time it happend and the job is done I consider I have a big debt regarding the worker. If there is a technical choice to make, the ones more impacted by it have to make it. Also split the tasks so they can aim at the end of it (agile methods).
get focused very hard during small amount of time, then relax. Check pomodoro method, it force you to train to quit working even if you felt very productive at that time. Feel weird, but once you use it repeatedly you'll see it work. There are tons of similar methods. Make sure your employees experiment them, I'm so glad when I see my colleagues debating about these methods.
Make sure they have top environment: descent computer, keyboard, mouse, monitor, desk, chairs, network, good water, even fruits... It cost nothing compare to salaries.
Make sure they have a place to take a nap. Sometime after a bad night I could take a one hour nap, it saves me the rest of the day instead of fighting fatigue like a zombie in front of computer. Consider your developers are working while sleeping and exercising. They just come to work to type the code they though about while cooking the day before. If they sleep or have sport break during the day, you'll get two days of work for the price of one. The same apply at smaller scale with pomodoro methods. So make sure they have some quick stupid things to do. Ideally I would have a climbing wall in the office. So you can climb 5min get focused 25min... Also I would pay the one hour sport break.
experiment things that seems to be a waste of time. Like peer programing for exemple, I can't remember how many keyboard shortcuts or software feature I learnt this way and how grateful I'm to the ones who taught me them. It also create bonds between people. Also at one company I was working with, employees made presentation to others once a week during lunch time. It was not mandatory for employees to do it but considered as a present to others. The company paid pizzas... Quite cheap for a one hour and half lesson to 20 persons.
care for them, check the signs of fatigue, worries, bad health state. Talk with them, encourage exercising... It's like leading a sport team. Care for them, they'll care for you.
Make sure there is no shame of not being working at a time, so they never fake it. They send messages on slack because it's a less obvious break than doing push-ups...

But how can you be sure they are working if it all look like an holiday place? You'll feel it. Make sure there's some pressure, some deadline and challenge and that they care. It's really easy to make happy people productive.

In addition to the existing answers that cover A. “employees are humans and need to be able to also live their lives”
And
B. “Setting up long term waterfall based work loads and deadlines, but meeting daily about them, doesn’t count as agile”
I’ll add some additional information I think will help you succeed. There is, sadly, just statistically, but also from my takeaway of your situation and view points, nearly a 100% chance you will never ship a game.
The setup you have going, plus how game development works, plus this being your first shot at running it all where you are the last line and the bottom line, means failure is imminent.
The only chance you have to ship a product, of any sort, is to constantly adapt. The grand vision of a game you have right now, whatever it is, will sink you. Plan on shipping a tenth of that vision at best. Hold on to one key feature or essence, and let everything else be flexible or “cut-able”.
If you were an artist or an engineer yourself, then you could drive slightly more of the vision home via your own sweat equity. As it is now, every sprint, look at what you have and then make a decision about where to try to take things in the next 2 weeks. Forget about the grand plan. Figure out what pieces there are for a minimal viable product and try to dedicate sprints to achieving a single piece.
Agile development is especially difficult to manage at the very beginning of a software project. Many producer/designers end up turning it into waterfall development without realizing it...but with a lot more meetings.

To me, it kinda sounds like you hired the wrong people. I only work with people who I know will be just as motivated as I am. Doing personal stuff in between is no biggie (as long as it's not too long of course!), but showing up late seems to me like a lack of discipline / they don't take their job too seriously.
Look, I don't know you, I don't know them, I don't know the company, but it feels like you should go over this with them. It doesn't need to be in a stern manner, but rather ask how they perceive such issues and help them get motivated for the end-goal, your release.
Oh, and as an artist I totally understand their "I don't wanna do marketing stuff" mindset, because it may not be what they learned to do in school. For tasks like those you may rather hire a specialist, especially since you're a starting studio. Without marketing you'll die a swift and unnoticed death.
Hope this helps, succes with figuring it out!

If it were a big company the marketing observation would be sensible, but since it is a startup breaking a few eggs short-term is expected, specially with little budget. That said, I can't tell why this answer has been downvoted.

My guess is that many devs (I'm one too) aren't in agreement with the implication that OP is correct to expect work without breaks.  I agree that the late arrivals could very well be an issue, and the marketing suggestion sounds reasonable, but personally I think OP is describing micromanagement that will eventually drive away good workers or cause them to burn out, and from the other answers I think that's more or less the consensus.  That's probably why this has gotten downvotes (I didn't downvote btw, even though I disagree with this answer).

Perhaps the wording is confusing?  This answer says "I only work with people who I know will be just as motivated as I am", which sounds like "no breaks is A-okay", and "Doing personal stuff in between is no biggie", which sounds like "breaks are A-okay".  It's not clear which position is being taken.  Clarifying might help, especially if you really are just focusing on the late arrivals.

I don’t feel that this answer have to be downvoted, even though I disagree with part of it :-/


text:
How to change the Art of the Catch script in order to spawn random items?
I've downloaded the mod Art of the Catch and I was wondering how I could change the scripts in order to spawn three new category of items:
any ingredient (dragon bones)
any non-enchanted craftable item (iron helmet)
any enchanted craftable item (ring with magic enchantment that is vanilla or added by a mod)
Looking at the source code, I found this:
function SelectFish()
    Form fish_base = fish_detected.GetBaseObject()

    if fish_base == CritterPondFish01
        PlayerRef.AddItem(CritterPondFish01Ingredient, 1, true)
        _AC_CaughtFish01.Show()
    elseif fish_base == CritterPondFish02
        PlayerRef.AddItem(CritterPondFish02Ingredient, 1, true)
        _AC_CaughtFish02.Show()
    elseif fish_base == CritterPondFish03
        PlayerRef.AddItem(CritterPondFish03Ingredient, 1, true)
        _AC_CaughtFish03.Show()
    elseif fish_base == CritterPondFish04
        PlayerRef.AddItem(CritterPondFish04Ingredient, 1, true)
        _AC_CaughtFish04.Show()
    elseif fish_base == CritterPondFish05
        PlayerRef.AddItem(CritterPondFish05Ingredient, 1, true)
        _AC_CaughtFish05.Show()
    elseif fish_base == CritterSalmon01 || fish_base == CritterSalmon02 || _AC_FishWaterfallTypes.HasForm(fish_base)
        PlayerRef.AddItem(FoodSalmon, 1, true)
        _AC_CaughtFishSalmon.Show()
    endif
endFunction

It was inside _ac_beginfishing.psc with other functions. I am pretty sure I just need to modify the function, but I am not sure if we can use a general class of items as a variable, and I am even less sure about adding items with enchantments, because from what I know there's no variable that points to a list of items.
Anyway, how would you change the scripts so that it spawns random items? The way I would do is generate a random number and use it to select an item in a list, but I am not familiar with the scripting language, so I am not exactly sure how I could do that or even if it's possible.

I'm not sure this is part of the modding script. This looks like it just tells the game to show the fish you've caught. I might be wrong. Mabye your looking at the wrong piece of code?
PlayerRef.AddItem(CritterPondFish05Ingredient, 1, true)
That part could lead you somewhere.
"akItemToAdd: The base form add to this reference's inventory. If this is a base object, it will add a newly-created item. If it is a reference, it will move/remove it from own place/container to this container. If a form list, then it will add aiCount of each item in the list."
Just replace CtitterPondFish05Ingredient with the desired object. DO realize that this will only trigger when the function selectFish is fired. If you don't want this, put it in some other function. Hope this helps.


text:
Scene dark when perspective camera is far from scenery
I can't find anything about this subject in the docs or forums to know if this is normal behavior: There seems to be a direct correlation between how close to the scenery my camera gets and how brightly lit the scene is. My camera is able to move up to 200 units from Vector3.zero. Here are two shots of the same piece of scenery - one close up, one far away:

The camera is set to perspective, using deferred rendering.
Things I've tried:

Turning off post processing
Using auto expose in post processing
Changing to orthographic (removes the issue, scene is uniformly bright at any distance)
Changing the FOV
Changing global lighting to use color rather than skybox
Putting some lights at altitude

This may be normal behavior & I just havent noticed before. Can anyone confirm? Is there some way to prevent this happening? I don't want to use an orthographic camera but I do want the scene to be evenly bright at any distance from the camera.

Is the light attached to the camera?

No. There's one directional light at (0, 100, 0) and a bunch of point lights scattered around the scene. Changing the range on the point lights makes no difference to the problem.

Do you have fog enabled in your scene? How have you configured your materials?

@DMGregory - Yeah that was it, somehow the fog color got changed to pure black. Thanks.

If you've solved your problem, please feel free to post your solution as an answer.

@DMGregory - Solution was yours, post & I'll happily accept

You have the context of your scene to use when illustrating the answer, so I think you can describe it in better detail.


text:
Storing voxels for a voxel Engine in C++
I am trying to write a little voxel engine because it's fun, but struggle to find the best way to store the actual voxels. I'm aware I will need chunks of some sort so I don't need to have the entire world in memory, and I'm am aware I need render them with reasonable performance.
I read about octrees and from what I understand it starts with 1 cube, and in that cube can be 8 more cubes, and in all those 8 cubes can be another 8 cubes etc. But I don't think this fits my voxel engine because my voxel cubes/items will all be the exact same size.
So another option is to just create an array of 16*16*16 size and have that be one chunk, and you fill it with items. And parts where there aren't any items will have 0 as value (0 = air). But I'm afraid this is going to waste a lot of memory and won't be very fast.
Then another option is a vector for each chunk, and fill it with cubes. And the cube holds its position in the chunk. This saves memory (no air blocks), but makes looking for a cube at a specific location a lot slower.
So I can't really find a good solution, and I'm hoping someone can help me with that. So what would you use and why?
But another problem is rendering. Just reading each chunk and sending it to the GPU using OpenGL is easy, but very slow. Generating one mesh per chunk would be better, but that means every time I break one block, I have to rebuild the entire chunk which could take a bit of time causing a minor but noticeable hiccup, which I obviously don't want either. So that would be harder. So how would I render the cubes? Just create all the cubes in one vertex buffer per chunk and render that and maybe try to put that in another thread, or is there another way?
Thanks!

You should use instancing for rendering your cubes. You can find a tutorial here https://learnopengl.com/Advanced-OpenGL/Instancing . For storing the cubes: do you have strong memory constraints on the hardware? 16^3 cubes don't seem too much memory.

@Turms Thanks for your comment! I don't have strong memory constraints, it's just a regular PC. But I thought, if every top most chunk is 50% air, and the world is very big, then there must be quite a bit of wasted memory. But it's probably not much like you say. So should I just go for 161616 chunks with a static amount of blocks? And also, you say I should use instancing, is that really needed? My idea was to generate a mesh for each chunk, because that way I can leave out all the invisible triangles.

I don't recommend using instancing for the cubes as Turms describes.This will only reduce your draw calls, but do nothing for overdraw and hidden faces - in fact it ties your hands from solving that problem, since for instancing to work all the cubes have to be the same - you can't delete hidden faces of some cubes or merge coplanar faces into bigger single polygons.

Choosing the best voxel engine can be a challenge.  The big question to ask yourself is "what operations do I need to do on my voxels?"  That guides the operations.  For example, you are concerned about how hard it is to figure out which voxel is where in an oct-tree.  Oct-tree algorithms are great for problems which can generate this information as needed as it walks the tree (often in a recursive manner).  If you have specific problems where this is too expensive, then you may look at other options.

Another big question is how often voxels are updated.  Some algorithms are great if they can pre-process data to store it efficiently, but less efficient if the data is contstantly being updated (as data might in a particle based fluid simulation)

@DMGregory Agreed, but it's a decent stop-gap measure. I've worked on a voxel engine for a while, and it took us months (not full-time, mind) to develop decent geometry merging that worked at higher performance on average.

Storing the blocks as the positions and the values is actually very inefficient. Even without any overhead caused by the struct or object you use, you need to store 4 distinct values per block. It would only make sense to use it over the "storing blocks in fixed arrays" method (the one you described earlier) is when only a quarter of the blocks are solid, and this way you don't even take any other optimization methods into account.
Octrees are actually great for voxel based games, since they specialize at storing data with larger features (e.g. patches of the same block). To illustrate this, I used a quadtree (basically octrees in 2d):
This is my starting set containing 32x32 tiles, which would equal 1024 values:

Storing this as 1024 separate values doesn't seem that inefficient, but once you reach map sizes similar to games, such as Terraria, loading screens would take multiple seconds. And if you increase it to the third dimension, it starts to use up all space in the system.
Quadtrees (or octrees in 3d) can help the situation. To create one, you can either go from tiles and group them together, or go from one huge cell and you divide it until you reach the tiles. I will use the first approach, because it's easier to visualize.
So, in the first iteration you group everything into 2x2 cells, and if a cell only contains tiles of the same type, you drop the tiles and just store the type. After one iteration, our map will look like this:

The red lines mark what we store. Each square is just 1 value. This brought the size down from 1024 values to 439, that's a 57% decrease.
But you know the mantra. Let's go one step further and group these into cells:

This reduced the amount of stored values to 367. That's only 36% of the original size.
You obviously need to do this division until every 4 adjacent cell (8 adjacent block in 3d) inside a chunk is stored inside one cell, essentially converting a chunk to one large cell.
This also has some other benefits, mainly when doing collision, but you might want to create a separate octree for that, which only cares about whether a single block is solid or not. That way, instead of checking against collision for every block inside a chunk, you can just do it against the cells.

Thanks for your reply! It seems octree's are the way to go.(Since my voxel engine will be 3D) I have a frew questions I would like to ask though: Your last picture shows the black parts to have larger squares, since I intend to have a minecraft like engine where you can modify the voxel terrain, I would prefer to keep everything that has a block the same size, because otherwise it would make things very complicated, that's possible right?(I would still simplify the empty/air slots ofcourse.) Second, is there some kind of tutorial on how one would program an octree? Thanks!

@appmaker1358 that's no problem at all. If the player tries to modify a large block, then you break it into smaller blocks at that moment. There's no need to store 16x16x16 values of "rock" when you could say instead "this whole chunk is solid rock" until that is no longer true.

@appmaker1358 As DMGregory said, updating the data stored in an octree is relatively easy. All you have to do is divide the cell the change happened in until every sub cell contains only a single type of block. Here's an interactive example with a quadtree. Generating one is simple as well. You create one large cell, that completely contains the chunk, then you recursively go through every leaf cell (cells that don't have children), check if the part of the terrain it represents contains multiple types of blocks, if yes, subdivide the cell

@appmaker1358 The bigger problem is actually the reverse - making sure the octree doesn't become full of leaves with just one block, which can easily happen in a Minecraft-style game. However, there's many solutions to the problem - it's just about choosing whatever you find appropriate. And it only becomes a real problem when there's a lot of building going on.

Octrees aren't necessarily the best choice. here is an interesting read: https://0fps.net/2012/01/14/an-analysis-of-minecraft-like-engines/

@Polygnome that article speaks about performance, we're dealing with space efficiency here.

@Bálint Well the question was how to store voxels. Being able to efficiently access the stored information is important for any given datastructure. The OP explicitly mentioned performance as one of their concerns: "But I'm afraid this is going to waste a lot of memory and won't be very fast." (emphasis mine). Now, octress are surely an interesting choice, but your answer suggest that they are the only choice without even mentioning the trade-offs.

Octrees exist to solve exactly the problem you describe, allowing dense storage of sparse data without large search times.
The fact that your voxels are the same size just means that your octree has a fixed depth. eg. for a 16x16x16 chunk, you need at most 5 levels of tree:

chunk root (16x16x16)

first tier octant (8x8x8)

second tier octant (4x4x4)

third tier octant (2x2x2)

single voxel (1x1x1)

This means you have at most 5 steps to go to find out whether there's a voxel at a particular position in the chunk:

chunk root: is the whole chunk the same value (eg. all air)? If so, we're done. If not...

first tier: is the octant that contains this position all the same value? If not...

second tier...

third tier...

now we're addressing a single voxel, and can return its value.

Much shorter than scanning even 1% of the way through an array of up to 4096 voxels!
Notice that this lets us compress the data wherever there's a full octant of the same value - whether that value is all air or all rock or anything else. It's only where octants contain mixed values that we need to subdivide further, down to the limit of single-voxel leaf nodes.

For addressing the children of a chunk, typically we'll proceed in Morton order, something like this:

X- Y- Z-
X- Y- Z+
X- Y+ Z-
X- Y+ Z+
X+ Y- Z-
X+ Y- Z+
X+ Y+ Z-
X+ Y+ Z+

So, our Octree node navigation might look something like this:
GetOctreeValue(OctreeNode node, int depth, int3 nodeOrigin, int3 queryPoint) {
    if(node.IsAllOneValue)
        return node.Value;

    int childIndex =  0;
    childIndex += (queryPoint.x > nodeOrigin.x) ? 4 : 0;
    childIndex += (queryPoint.y > nodeOrigin.y) ? 2 : 0;
    childIndex += (queryPoint.z > nodeOrigin.z) ? 1 : 0;

    OctreeNode child = node.GetChild(childIndex);

    return GetOctreeValue(
                child,
                depth + 1,
                nodeOrigin + childOffset[depth, childIndex],
                queryPoint
    );
}

Thanks for your reply! It seems octree's are the way to go. But I do have 2 questions though, you say octree's are faster than scanning through an array, which is correct. But I wouldn't need to do that as the array could be static meaning I can calculate where the cube I need is. So why would I need to scan?  Second question, in the last tier of the octree(the 1x1x1), how do I know which cube is where, since if I understand it correctly, and octree node has 8 more nodes, how do you know which node belongs to which 3d position?(Or am I supposed to remember that myself?)

Yes, you already covered the case of an exhaustive array of 16x16x16 voxels in your question, and seemed to reject the 4K per chunk memory footprint (assuming each voxel ID is a byte) as excessive. The search you mentioned comes when storing a list of voxels with a position, forcing you to scan through the list to find the voxel at your target position. 4096 here is the upper bound of that list length - typically it will be smaller than that, but generally still deeper than a corresponding octree search.


text:
How do we add a spell in Skyrim with the Creation Kit that can spawn several variants of the same NPC?
I am thinking of adding a spell that can summon a Nord, but I want it to have a random chance of spawning a female nord. I also want the NPC to appear in different armors, have different tattoos and different hairstyles. Is it possible to do this without using a script? What's the easiest way to achieve this?

You would have to have a function that is able to create new reference objects of any base object selected. The edits you talk about, character attributes, are usually manually adjusted, but there once was a mod that did loop through a list of prevously defined colours of wolf's fur to spawn differently looking enemies randomly. This mod did require SKSE.
So you would have to prepare different base objects and then call them via script and spawn them, following your own rule. Perhaps on activate event, similar as a magic effect.
The mod that could work as a proof of concept for your idea is
"Automatic Variants" - but it requires manual preparation of these encounters.
https://www.nexusmods.com/skyrim/mods/21377?tab=description
I am not sure how to access the actor properties via script and adjust them inside the script without GUI - i guess that would require much more work, to have variables randomly change these properties.
best success


text:
*Python* Class - self.x = self - What does it mean to set it to self?
I have this class for my game that is a scene manager. I followed a tutorial and I am confused on why the self.scene.manager is equal to self
class SceneManager(object):
    def __init__(self):
        self.go_to(TitleScene())

    def go_to(self, scene):
        self.scene = scene
        self.scene.manager = self #<--

In the main game scene I also have a similar thing happening
class GameScene(Scene):
    def __init__(self, levelno):
        super(GameScene, self).__init__()
        self.player = Player(5, 40)
        self.player.scene = self

What is the purpose of setting it to self?
Another Question:
I have been using classes and for most of them I create a class and I include this within the class
Class myClass():
   super(myClass, self).__init__() #<----- This line here

Does this have something to do with my original question?
What is the purpose of doing this?

When you use something like self.foo.bar = self from the class bar, you're telling foo which bar it is linked to. Basically,
    self.scene = scene
    self.scene.manager = self

is used to set reference in both ways, so that from the SceneManager, you can know which scene is managed, and from the scene, you can get access to the scene manager through the manager variable.

Does this have something to do with my original question? What is the purpose of doing this?

No. Presumably, your current code looks more like this:
class myBaseClass:
    def __init__(self):
        # initialize stuff

class myClass(myBaseClass):
    def __init__(self):
        super(myClass, self).__init__()
        # initialize more stuff

According to the documentation, what you're actually doing here is calling the __init__() method of a parent class; i.e. you're calling the constructor of the parent. You do it like that because since you define the function in both classes, the one defined in the child class (myClass) overrides the one from the parent class (myBaseClass), i.e. it hides it. To "force" the usage of the parent's class, using super like that seems the way to go.


text:
Should I use a FOV slider or fixed camera fov?
I'm making a single-player third person 3D adventure game, and I was wondering if I should fix the camera's FOV, or if I should create an in-game slider to change it. If I should create a slider, what should I limit the range to, and what should be the default?

What goals do you want to serve? Once you've clearly identified the goals for your game (which might be similar to or different from the goals of another game), you can evaluate which options serve those goals. In a vacuum, there's not much we can say: some games do it one way and some do it another.

For third person?  Allow change of the camera distance, assuming you're also allowing the player to move the camera around.  It's hard to sometimes get your bearings on where you are in 3rd, and you need that zoom and move camera function to help establish spatial awareness.
Go play other game and see what they do.  In other words, make it something game players are familiar with already.
A very common design pattern is that the mouse wheel zooms the camera in and out, and right click drag moves the camera.  Left click is for player interactions.

It'll be a bit tricky, but I'll try doing it. I'll have to find some different keybinds though


text:
How do we convert a pex file to a psc file?
How do we convert a pex file to a psc file?
https://skyrim.nexusmods.com/downloads/file.php?id=2909
There used to be a file here that allegedly converted pex files to psc files, but it's no longer available, so I was wondering if there was a alternative GUI program that allows you to do this. I am trying to modify a pex file in a Skyrim mod.

You can use PapyrusAssembler.exe to decompile the .pex (which is a compiled Papyrus script) into something more human-readable:
PapyrusAssembler.exe <name of .pex without extension> -D

However the documentation notes that this output isn't the .psc file itself. You can also look for a .pex decompiler (or write one yourself). The Creation Kit documentation doesn't seem to detail the format of the .pex file, so unless you want to spend a lot of time reverse-engineering it you're probably better off finding a pre-written tool.
Searching the web for "Skyrim pex decompiler" yields a few results, including a link to this tool. These sorts of tools are usually never able to recover the original source code (since often, most of that information -- such as comments -- is lost when compiling). Poking around a little, it looks like they're useful for producing human-readable stuff but that stuff isn't necessarily human friendly and may not immediately be re-compilable as a new .pex without editing.
This one claims to be able to produce something that is round-trip capable, even if it isn't the original file.

If you're doing this to recover source code to scripts you've written, and subsequently lost, it won't get you all the way there (and next time, you may want to consider a backup solution).
If you're doing this to try to figure out how scripts you didn't write function, you may have better results trying to contact the author of the script and see if they can't just explain it to you. If they're not willing to do that, they may also not be okay with your decompiling their scripts.

It creates a pexd file and not a psc file.

Right; "pexd" and "psc" are just text files; as I noted it's usually quite hard to produce original source code for something compiled, because information is lost. While doing some follow-up research I found a second tool (now linked in the answer) that claims to produce output that is round-trip capable, you might try that one.

Compiling happens for instance via Champollion compiler, an external application added by Bethesda to Creation Kit.
You can find it here. You can also use Notepad++ and Sublime to compile or just use the version of the compiler build in the Creation Kit.
If you use the Notepad tools, it's a good idea to install the library of Papyrus for Skyrim.
Here, in the official Bethesda CK wiki for Skyrim, you find a walkthrough how to use 5 different text editors for compiling scripts.


text:
How to get past Visual Studio "Setup Error" for Unity development?
When I launch Visual Studio from Unity on my laptop, I get the following error:

Setup Error
The setup for this installation of Visual Studio is not complete. Please run the Visual Studio Installer again to correct the issue.

As instructed, I've tried reinstalling Visual Studio multiple times, or using the "repair" option, but nothing has resolved the error.
How can I fix this?

What actually worked was something along those lines:

Completely uninstall visual studio.
Download and install "CCleaner".
Use CCleaner to clean your registry.
Reboot your PC. (This seems really important.)
Download and install Visual Studio Community 2019.
During installation, make sure you select the game development tool package (but uncheck the unity editor installation if you already have unity installed).
Let the download and install finish completely without any interruptions.

(Thanks to Alex Myers for their comment.)

If VS setup fails, these are alternatives:

Visual Studio Code is also at least semi-officially supported with plug ins and ability to launch from the Unity editor.
C# source files are just text files so you can use any text editor you wish to edit them. It won't be as nice an experience though.
Jetbrains Rider is an alternative.
MonoDevelop, it has less features but also lower requirements.

(Thanks to comments from Colin Young and trollingchar.)

In "preferences", go to editor and you can choose which visual studio you are using, that's how I fixed it.

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.


text:
ForceMode in AddTorque in Unity game development
In UNITY game development platform while programming in C# I came across a method to add torque to component: public void AddTorque(float x, float y, float z, ForceMode mode = ForceMode.Force);
In this Function what is meant by ForceMode?

ForceMode is an enumeration. It has 4 values,
ForceMode.Acceleration = Constant change not affected by mass
ForceMode.Force = Constant change which is affected by mass
ForceMode.Impulse = Instant change which is affected by mass
ForceMode.VelocityChange = Instant change which is not affected by mass
For more details, watch the Official Unity tutorial for AddForce. https://www.youtube.com/watch?v=MBDWTjn05eg

@hkishnani3 this is correct, documentation: ForceMode


text:
Dynamic Game Server Architecture
I'm trying to find a way to design a game server architecture for a real time mobile game. The design should be cost effective but still to some extend scaleable (later on).
Mobile client flow:
Connects to a distributor server which was given by DNS LB and gets grouped with x players. If y players are reached, the distributor server needs to contact a control server, which starts or uses a already running game server. The control server sends back the ip and port to the distributor server which then sends it to the grouped players.
The players then connect to the given game server. After the game the players will be send together to a new or same distributor server.
I wonder how the real server (VMs) for the game servers can be managed in a dynamic matter.
I have looked at AWS EC2 instances, but if we have 500 players with 6 players per group that play 6 hours per day, we would need ~84 EC2 t3.small (2 vCPU, 2GiB RAM) instances running. This will cost ~1,160.00 USD monthly. With this price it would be favorable to have real VMs and not dynamic cloud instances I guess?

Explanation of the components
Distributor:
Mobile clients will connect to these to get grouped with other players. It's like a lobby where players will sit until X players are reached or eg. a countdown ran out.
Control Server:
Need to take care of started server (VMs) and handle game server start requests from the distributors.
Game Server:
Is an authoritive like server client with physics etc. One game server (software) for X players in a group. Players will connect to these from the distributor after the lobby "phase".
Question:
How can this be dynamic scaleable/cost effective and is this a useable architecture?
I see one problem with the control server because it must take care of N game server vms and N distributors. But if we scale the control server, then every control server needs to know the same as every other.
(If anything is missing or can be improved, please let me know. English is not my native language so it's a bit challenging to express my goal in such a complicated topic like this)

Do you really need a full-fledged VM for every 6 player game session? This is going to generate a lot of overhead. It might be far more efficient to run multiple server processes on the same virtual server and even more efficient to let your game server software handle multiple games in parallel in one process.

You are saving the overhead of running multiple full-fledged operating systems and runtime environments as well as the overhead of spinning up and shutting down AWS instances all the time (Yes, Amazon got pretty good at this, but still...)
You are saving RAM and inter-server network load because the games can share data when they are running on the same process.
You are utilizing CPU time more efficiently because a more powerful server running multiple games can handle CPU load spikes generated by a single game far more gracefully than a small server running only that one game.

In order to allow horizontal scaling on multiple physical servers, the control server should be able to handle multiple gameserver hosts which each handle multiple sessions and be capable of load-balancing between them.

@LeftOver This is more of a topic for system administrators than game developers, but I heard good things about technologies like Docker and Kubernetes which allows you to move arbitrary server applications around physical or logical servers.

@LeftOver Amazon advertises how well Docker works with AWS.

@LeftOver The technical details about how to manage AWS instances in an automatic way apears to be a separate in-depth question specific to the AWS API. You might want to ask this as a separate question. Also, it's no longer really gamedev specific, so you might want to ask on stackoverflow.com or serverfault.com.

@LeftOver The reason why it is so difficult to get a price for "500 monthly players" is because it's a completely meaningless metric for a server hoster. They don't know how long each of these 500 players will be connected and they don't know how resources each player will consume while they are playing. That's why they let you pay by the metrics which do have a meaning for them: Storage capacity, RAM, CPU, bandwidth. How much do you need of those? That's what you need to figure out by measuring it.


text:
Friction using delta time returns inconsistent result
Slowing down a character using the following formula returns different results depending on the frame rate:
this.y += this.yVel * delta;
this.yVel *= Math.pow(0.99, delta);

Is there a better way to decelerate a player using delta time to allow for consistent movement across several framerates?

Normally, fixed delta time is used in physics simulation cause in this reason. On the other hand, frame base delta time is useful for rendering.
Of course, fixed delta base calculation result is make diff frame time object position. So you will need interpolation.

This line assumes that yVel is constant for the entirety of the duration delta:
this.y += this.yVel * delta;

But that's not true - we know by the end of duration delta that yVel has decreased to a fraction of \$0.99^\text{delta}\$ according to this line:
this.yVel *= Math.pow(0.99, delta);

So if we think of yVel as a function of time, \$v(t) = v_0 \cdot 0.99^t\$, then the total displacement in y over the course of the interval delta is the integral:
$$\begin{align}
\Delta y &= \int_0^\text{delta}v_0 \cdot 0.99^t dt\\
&= v_0 \cdot \int_0^\text{delta} e^{\ln (0.99) \cdot t} dt\\
&= v_0 \cdot \left( \frac 1 {\ln(0.99)} e^{\ln(0.99) \cdot t}\right)\Bigg|^\text{delta}_0\\
&= \frac {v_0} {\ln(0.99)}\left(e^{\ln(0.99)\cdot \text{delta}} - 1 \right)\\
&=v_0 \cdot  \frac {0.99^\text{delta} - 1} {\ln(0.99)}
\end{align}$$
In code:
var frictionFactor = Math.Pow(0.99, delta);
this.y += this.yVel * (frictionFactor - 1)/Math.Log(0.99);
this.yVel *= frictionFactor;

This will be smoother, but can still vary from one run to another due to limited precision and accumulation of rounding errors. So as Shin Dongho mentioned, your best bet here is to fix your physics timestep at a known value, so you get consistent, reproducible results.

I notice a recent down-vote four years after posting this. If there's some error or problem in this answer, I'd be happy to make improvements. (Mostly I don't want to Community user bot to bump this thread forever since it has only 0-point answers)


text:
How can we modify all of the human bone items in Skyrim?
I have the models, but I am wondering which object_id I need to modify. Is there a single object_id for every skeleton part, or each parts have several variants and several object_id? Is there a list with all of the skeleton parts in the game thereby allowing me to modify all of the vanilla models without having to worry about not having changed all of the skeleton models in the game?