I've been experiencing this problem for a couple of days now. My wifi works but I either I can't connect to a game or I am getting massive ping spikes every couple of seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Ping statistics for 8.8.8.8: Packets: Sent = 100, Received = 0, Lost = 100 (100% loss)

Tracing route to google-public-dns-a.google.com [8.8.8.8]
over a maximum of 30 hops:

1 9 ms 3 ms 3 ms hitronhub.home
2 * * * Request timed out.
3 20 ms 15 ms 20 ms 64.59.134.209
4 * * * Request timed out.
5 36 ms 35 ms 52 ms 72.14.221.102
6 * * * Request timed out.
7 45 ms 38 ms 34 ms 108.170.233.153
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
11 * * * Request timed out.
12 * * * Request timed out.
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 * * * Request timed out.
21 * * * Request timed out.
22 * * * Request timed out.
23 * * * Request timed out.
24 * * * Request timed out.
25 * * * Request timed out.
26 * * * Request timed out.
27 * * * Request timed out.
28 * * * Request timed out.
29 * * * Request timed out.
30 * * * Request timed out.
Trace complete.
---------------------------------------------------------------------------------------------------------------------------------------------------------
Additional Information:
I am using wireless and I have not called my internet service provider.

- - - Updated - - -

Haha, I feel so silly. All I had to do was reset my modem and that fixed the problem.

Ping statistics for 8.8.8.8:
Packets: Sent = 100, Received = 100, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 28ms, Maximum = 57ms, Average = 31ms