Game design: implications of varying 2D race speeds

I'm getting my feet wet trying to design and implement a 2D action platform game. Combat will be a great approach, so I want to have a narrow ground and air control so that players can be precise and express dominance. For now, I don't think I want times of high acceleration and deceleration, since I think they detract from a feeling control scheme & # 39; tight & # 39 ;, but feel free to correct me if there are data or examples that say otherwise .

I'm very inspired by combat and I want it to look like a fighting game. From a surface level analysis, in many fighting games, especially crushing brothers, there are usually two (or more) horizontal movement speeds: a walk and a run, a run and a sprint, and so on. Naively, I thought "good fighting games have it, so if I want this to feel like a fighting game, I need to have it too," but if I think about it a little more, I'm not sure if it's worth implementing. Mainly because I don't understand the implications of having a sprint mechanic or not.

One thing that I am quickly discovering is that any design question can be reduced to & # 39; it depends & # 39 ;, especially on the game itself and on what I want to achieve. If you need more context, my initial idea is to unite more closely the feelings you get when you make a new combo or link or discover new ways to use a system mechanic in a fighting game with that sense of discovery when opening a game. World in a Metroidvania. Then, a 2D Metroidvania with action / fight game level combat. My initial thought is that the sprint would open the opportunity for board attacks, maybe some cancel, and make it easier to move around the world. It also means more implementation work, because most of the time I don't have buttons, so I would have to do some kind of double-touch analog input or smash attack to work.

My main example of two race speeds in a non-fighting game is in some Kirby games, where you can start a race by touching one direction twice. In the context of Kirby, what makes the board for the game as a whole? Would it be better to have a faster base speed and not run? What opportunities would open if I had a sprint and what would close?

Perhaps a better example, although not in 2D, is Raiden & # 39; s Ninja Run from Metal Gear Solid Rising Revengeance. It helped him move from one encounter to another faster, and served to close gaps while he was under fire.

The initial reaction says that my players will only use sprint to run from one encounter to another and they will lose the things I put that they might not do if they are taking their time. I would have to put things that encourage the player to slow down and be smart about it so as not to feel that I am destroying the player's rhythm. I think & # 39; go as fast as I am allowed & # 39; It is the default mode for most players, and having a variable running speed does not add much choice. I think that going fast, especially going faster in comparison, is fun, but is it a valuable compensation? I could compensate for this with a resistance system just for running or some other artificial limiter, but I think that opens up a new set of implications that I still don't fully understand.

TL; DR

What are the benefits and disadvantages of having a sprint?

Who is the cheapest and most reliable to give me the speeds I need?

I need a dedicated 1 Gbps line (preferably 2 Gbps, thus up / down, etc.) on a simple Ubuntu server.

Preferably take crypto

Also preferable, … | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1797567&goto=newpost

unit: different movement speeds for the same track

I am experiencing a small problem with different movement speeds. A card moves from Draw -> Display -> Board. The user can add another destination while the card is still moving (to Start). If you move it later (after the movement to the board is made), the movement speed is faster from Board to Start. All the movement itself is working, I just don't understand why there is a speed difference. The following script is attached to the card itself.

private Transform _fromPos;
private Transform _toPos;
private List _toPosList = new List();

private float _timeCountMove = 0.0f;
private float _speed = 0.50f;

void Update() {
   if (_isMoving) {
      MoveWithRotation();
   }
}

public void MoveFromTo(Transform from, Transform to) {
   _fromPos = from;
   _toPos = to;
   _timeCountMove = 0f;
   _isMoving = true;
}

public void MoveFromTo(Transform from, List to) {
   _toPosList = new List(to);
   MoveFromTo(from, _toPosList(0));
}

void MoveWithRotation() {
   _timeCountMove = _timeCountMove + Time.deltaTime * _speed;
   transform.position = Vector3.Lerp(_fromPos.position, _toPos.position, _timeCountMove);
   transform.rotation = Quaternion.Slerp(_fromPos.rotation, _toPos.rotation, _timeCountMove);
   transform.localScale = Vector3.Lerp(_fromPos.localScale, _toPos.localScale, _timeCountMove);
   if (_timeCountMove >= 1f) {
      _isMoving = false;
      if (_toPosList.Count > 1) {
         MoveFromTo(_toPosList(0), _toPosList(1));
         _toPosList.RemoveAt(0);
      }
   }
}

public void AddWaypoint(Transform waypoint) {
    _toPosList.Add(waypoint);
}

It is called with an array of transformations (all segments have the same speed in that case) or with only two transformations (much faster speed in that case). If AddWaypoint is called while the card is still moving, the added segment continues to fly at the same speed.

My question is, what is causing the difference between the speeds of the waypoints in the list compared to the two waypoints?

c ++ – The game works badly or at different speeds

I am making a simple 2D shooting game using C ++ and SDL2. For my main game loop, I used the code from the famous article Fix Your Timestep. The problem is that, because I am using a fixed delta time, game objects move at different speeds depending on the hardware of the computer on which it is being played. On more powerful PCs, the game runs very fast, and on weaker PCs, it runs slowly.

I was able to solve this problem by eliminating the if (frameTime > .25) { frameTime = .25; } statement, however, this caused, paradoxically, that the game runs poorly on computers with more powerful CPUs. I am not limiting the FPS, so when I run the game on a powerful PC, it starts running at around 1500 FPS, but then the FPS quickly drops to levels that cannot be played, all while using a significant percentage of the power of the CPU. However, on weaker PCs, the game works fine.

My question is, how do I balance these two problems so that the game runs at an acceptable frame rate, while making sure that the game objects move at the same speed, regardless of the hardware on which they are playing ? The game works at low resolution and uses very simple graphics, so it should be able to run smoothly even on weak PCs.

lens: can high / fast shutter speeds have negative IQ results?

In general, shutter speed can affect the IQ in several ways:

  1. Directly, by interacting poorly with the natural pulse rate of the lighting (particularly long-tube fluorescent lights and some cheap LEDs and CFLs), resulting in uneven lighting in different parts of the image (with a rolling electronic shutter) or an inconsistent exposure between shots (with a global electronic shutter or mechanical shutter).
  2. Directly, interacting badly with the moment of a flash.
  3. Indirectly, by forcing an aperture that is not sharp in your particular lens.
    • Wide openings have shallow DOF, so if the lens has a front / back focus, it can be smooth.
    • Narrow apertures may be less sharp because the lens is limited by diffraction.
  4. Indirectly, by forcing a higher ISO (which adds noise).
  5. Aesthetically, by freezing the movement you might prefer to have blurry.

In his particular case, n. 1 does not apply, no. ° 2 only applies a fill flash and the n. ° 3 does not apply because it has enough light to use a relatively low ISO. However, it is worth taking them into account when filming indoors, on cloudy days, etc.

chain rule – Change speed problem with speeds

Thank you for contributing a response to Mathematics Stack Exchange!

  • Please make sure answer the question. Provide details and share your research!

But avoid

  • Ask for help, clarifications or respond to other answers.
  • Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

For more information, see our tips on how to write excellent answers.

qbittorrent – Slow download speeds on 18.04

I need help configuring VPN settings in Ubuntu 18.04. It is a new installation yesterday. As for the Internet, everything is intact.

The download speeds in both qBittorrent and Transmission are very low (300 kbs maximum). I have a VPN enabled (VPN.ht), but this is the first operating system that I have such problems. I contacted the Internet provider and the ports that use both applications are open.

javascript: the game runs at different speeds in Chrome versus Firefox

I am using Box2D for physics on the server side.
The position of the player is updated on the server, so the client can do nothing but give his opinion.

But by running the game only in Chrome, the player moves faster compared to running only in Firefox.

If it runs in both browsers (one player in each browser), the game in both browsers runs at the speed at which it runs in Chrome.

Using this update cycle:

function update() {

    for(let p of players){

        if(p.dead) continue ;

        p.keyEvents();

        aabb.lowerBound.Set( p.body.GetPosition().x-p.s_w/(2*scale),p.body.GetPosition().y-p.s_h/(2*scale) );//top left
        aabb.upperBound.Set( p.body.GetPosition().x+p.s_w/(2*scale),p.body.GetPosition().y+p.s_h/(2*scale) );//bottom right 
        world.QueryAABB( ReportFixture , aabb , p.id );
        p.socket.emit('players',foundPlayers);

        foundBodies.players=();

    }

    world.Step(
       1 / 60   //frame-rate
        ,  8       //velocity iterations
        ,  3       //position iterations
    );

    if(deletePlayerIds.length>0){
        deletePlayer();
    }

    world.ClearForces();
}

setInterval(update, 1000/60);//to call update loop

I have read that for Box2D there is no need to apply a delta.

What could be the reason for the different speeds and how can it be resolved?

Mathematics: distance calculation while switching between two speeds

There are two velocity values, which are used by the moving object. After a while, the speed change occurs from V1 to V2. I need the formula that can be used to calculate the current distance (in the specified time).

Input Variable:

Constants:

  • V1 – first speed
  • V2 – second speed
  • Ts – switching time between V1 and V2
  • P – switching power

Output Variable:

I tried using the following formula:
S = Lerp(Clamp(T / Ts, 0, 1) ^ P), V1, V2) * T

But in this case, the moving object will return after a while and move forward again.

Should acceleration probably be used in the formula?

performance: slow sequential speeds on 9×7-drive raidz2 (ZFS ZoL 0.8.1)

I am running a large group of ZFS created for sequential reads and writes of more than 256K of requests through iSCSI (for backups). Given the need for high performance and space efficiency, and less need for randomized small block performance, I opted for scratched raidz2 over scratched mirrors.

However, the 256K sequential read performance is much lower than I expected (100-200MBps, peaks up to 600MBps). When zvols reach ~ 99% of iowait in iostat, backup devices generally run between 10 and 40% of iowait, which suggests that the bottleneck is something that I am missing in the configuration, since it should not be the backplane or the CPUs in this system, and the sequential workloads should not work the ARC too much.

I've played a lot with the module parameters (current configuration below), read hundreds of articles, problems in OpenZFS github, etc. Prior pickup and aggregation of adjustments led me to this level of performance; By default, it was running at approximately ~ 50 MBps in sequential readings as ZFS sent small requests to the disks (~ 16K). With aggregation and prefetch working fine (I think), disk readings are much higher, around ~ 64K on average in iostat.

NICs are an iscsi IOL target with cxgbit + download The iscsi Windows Chelsio launcher works well outside of ZFS zvols, with a directly mapped optane that returns an almost complete line speed in NICs (~ 3.5GBps of reading and writing).

Am i waiting too much? I know that ZFS prioritizes security over performance, but I would expect a 7×9 raidz2 to provide better sequential readings than a single 9-unit unit.

System specifications and records / configuration files:

Chassis: Supermicro 6047R-E1R72L
HBAs: 3x 2308 IT mode (24x 6Gbps SAS channels to backplanes)
CPU: 2x E5-2667v2 (8 cores @ 3.3Ghz base each)
RAM: 128GB, 104GB dedicated to ARC
HDDs: 65x HGST 10TB HC510 SAS (9x 7-wide raidz2 + 2 spares)
SSDs: 2x Intel Optane 900P (partitioned for mirrored special and log vdevs)
NIC: Chelsio 40GBps (same as on initiator, both using hw offloaded iSCSI)
OS: Ubuntu 18.04 LTS (using latest non-HWE kernel that allows ZFS SIMD)
ZFS: 0.8.1 via PPA
Initiator: Chelsio iSCSI initiator on Windows Server 2019

Pool configuration:

ashift=12
recordsize=128K (blocks on zvols are 64K, below)
compression=lz4
xattr=sa
redundant_metadata=most
atime=off
primarycache=all

ZVol configuration:

sparse
volblocksize=64K (matches OS allocation unit on top of iSCSI)

Pool design:

7x 9-wide raidz3
mirrored 200GB optane special vdev (SPA metadata allocation classes)
mirrored 50GB optane log vdev

/etc/modprobe.d/zfs.conf:

# 52 - 104GB ARC, this system does nothing else
options zfs zfs_arc_min=55834574848
options zfs zfs_arc_max=111669149696

# allow for more dirty async data
options zfs zfs_dirty_data_max_percent=25
options zfs zfs_dirty_data_max=34359738368

# txg timeout given we have plenty of Optane ZIL
options zfs zfs_txg_timeout=5

# tune prefetch (have played with this 1000x different ways, no major improvement except max_streams to 2048, which helped, I think)
options zfs zfs_prefetch_disable=0
options zfs zfetch_max_distance=134217728
options zfs zfetch_max_streams=2048
options zfs zfetch_min_sec_reap=3
options zfs zfs_arc_min_prefetch_ms=250
options zfs zfs_arc_min_prescient_prefetch_ms=250
options zfs zfetch_array_rd_sz=16777216

# tune coalescing (same-ish, increasing the read gap limit helped throughput in conjunction with low async read max_active, as it caused much bigger reads to be sent to the backing devices)
options zfs zfs_vdev_aggregation_limit=16777216
options zfs zfs_vdev_read_gap_limit=1048576
options zfs zfs_vdev_write_gap_limit=262144

# ZIO scheduler in priority order 
options zfs zfs_vdev_sync_read_min_active=1
options zfs zfs_vdev_sync_read_max_active=10
options zfs zfs_vdev_sync_write_min_active=1
options zfs zfs_vdev_sync_write_max_active=10
options zfs zfs_vdev_async_read_min_active=1
options zfs zfs_vdev_async_read_max_active=2
options zfs zfs_vdev_async_write_min_active=1
options zfs zfs_vdev_async_write_max_active=4

# zvol threads
options zfs zvol_threads=32

I'm tearing my hair out for this. Users press to go to Windows with storage spaces, but I've used peer storage spaces (even with Storage Spaces Direct with mirrors at the top), and it's not pretty either. I am tempted to go directly to mdadm raid60 under iSCSI, but I would love if someone could point out something crazy that I need that will unlock performance with ZFS bitrot protection 🙂