• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Minigame] Particle Party - The Quantum World of Azeroth

Status
Not open for further replies.
3MoBoI.png

"Operation Firefly: A joint project between gnomish and goblin engineers. The task was simple: Reduce the test subjects down to a subatomic size with the Ultra-Miniaturizer 3000, then fire them to the outpost on Outland, where our technicians would get them back to their original size. It was supposed to be a cost-efficient way to travel between the two planets. Well, compared to the Dark Portal, that is. Do you know how much energy it takes to keep that thing open all the time?

Anyway, the miniaturization worked perfectly. But, as it is always the case with goblin technology, the rocket malfunctioned, and now instead of arriving on Outland, the passengers are stranded somewhere in the cosmos, reduced to a subatomic size, being exposed to the interstellar medium and who knows what else.

I don't dare to imagine the lawsuit that's coming our way."



Description:

A minigame map in which you skateboard through space, create elementary particles to shoot them at your opponents, and generate force fields to deflect those coming your way.

Minigames include various goals such as "Push the monkey into the black hole" or "Evade the cosmic particle shower."


Features:

  • Powerful N-body simulation algorithm* that is able to compute close to 100 particles interacting with each other and their force fields.
  • "Trippy" atmosphere, accentuated by the graphics and music.
  • Most well-known elementary particles: Protons, electrons, higgs bosons, mini black holes, as well as lightrays with reflection, color, and everything. However, no Ph.D. in physics required. Everything will be explained properly and gameplay is prioritized over scientific accuracy.
  • Custom commands for an easy control of the player's flying discs.
  • Particle Party can be played both Team vs. Team or Free for All.
*The N-body simulation is what makes Particle Party's physics engine unique. Not only are particles moved based on their equations of motion, but also exert forces on every other particle, influencing how those particle must move. The rapidly increasing amounts of interactions as new particles are added lead to very high computational requirements compared to other physics engines.


Media:

"If you think you understand quantum mechanics, you don't understand quantum mechanics."

This is a video showcase of the first game mode: Cosmic Shower. The voidlord is unleashing a barrage of electrons (blue) and protons (red), which the players must attempt to dodge. Crystal generators create a high voltage field that repels the incoming electrons, allowing players to find shelter underneath.

Throughout the game, powerups spawn that heal, restore mana, or provide players ammunition for their own particle abilities. Players can use these abilities both to deflect incoming particles or to attack their opponents.


Cosmic Shower is the perfect game mode for testing controls, general mechanics, and the engine's limits. But only few game modes will revolve around evading massive numbers of particles to survive.


Status:
  • The engine is working and mostly bug-free.
  • The basic framework of the code has been written so that new objects, particles, game modes etc. can be easily implemented.
  • Characters and spells require more work.
  • The "terrain" could use some more eye-candy, although I want it to be more minimalistic so that it isn't too distracting from all the stuff that's already going on.
  • There's no lobby or tutorial yet.
Want to help?
  • Getting the controls right is essential to making such a map fun to play. Try out the map and tell me about your experience. Since there is no tutorial, make sure to watch the video above, so that you can some clue of what the hell is going on.
  • Cosmic Shower performs well on my pc, but there are those who have less computing power. How well does it perform for you?
  • I'm looking for co-contributors who would like to help with game modes, tutorials, heroes etc.
 

Attachments

  • Particle Party v0.15.w3x
    3.5 MB · Views: 117
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,013
I would love to contribute code to this project! I studied physics and astronautical engineering in college and this is right up my alley.
  • Higgs has a significant fly height to it (honestly hard to tell though), which makes it hard to determine where exactly it is. Since I can see the simulation is 2D rather than 3D this can be very awkward because things will miss it when they 'should' hit, and will hit when they 'should' miss... and the entire point of the Higgses is to hit shit with them.

  • The terrain definitely needs some improvements to give it depth. Perhaps some rock-like space debris that isn't intrusive and doesn't make you think it's part of the game mode? The simplest solution I see is to make a tile with faint/unobtrusive gridlines (like the Tron grid)and use that to differentiate where the 'ground' is instead of the skybox, since the whole thing takes place on alpha'd tiles. As long as the gridded tiles are still mostly alpha you'll be able to see the skybox and also feel like there really is a 'plane' you're playing on.
 
I would love to contribute code to this project! I studied physics and astronautical engineering in college and this is right up my alley.
Awesome, sounds like the right person for the job :).

Higgs has a significant fly height to it (honestly hard to tell though), which makes it hard to determine where exactly it is. Since I can see the simulation is 2D rather than 3D this can be very awkward because things will miss it when they 'should' hit, and will hit when they 'should' miss... and the entire point of the Higgses is to hit shit with them.
Oh yea, I noticed that too when I rewatched the video. I gave the higgs a negative z relative to the other particles because the Eye of Sargeras model hovers very high, but turns out I made a sign error and made it way worse :rolleyes: .

The terrain definitely needs some improvements to give it depth. Perhaps some rock-like space debris that isn't intrusive and doesn't make you think it's part of the game mode? The simplest solution I see is to make a tile with faint/unobtrusive gridlines (like the Tron grid)and use that to differentiate where the 'ground' is instead of the skybox, since the whole thing takes place on alpha'd tiles. As long as the gridded tiles are still mostly alpha you'll be able to see the skybox and also feel like there really is a 'plane' you're playing on.
I tried to put some planets in the background, but I had issues with visibility. The planets would randomly disappear when you move the cameras to certain angles.
Making a full-alpha terrain is new territory for me, so help here is appreciated. I like the idea with the Tron grid.
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
I made a map years ago. Your map seemingly has the exact same control as mine.

Recently, I created a much more powerful physic engine (LINK). You can probably have way more than 100 simulated unit movements at once (untested). You might want to check it out. Maybe the demo looks a bit broken because the collision handling was a joke (only experimental), you can disable collision in the configuration part tho.
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
A big portion of the engine needed for this map IS the collision/interaction detection that’s being run constantly. He’s simulating both gravity and E&M in 2D constantly, and the bottleneck for those checks is having to see how/if every particle affects every other particle in some tangible way. Moving N particles according to physics is easy, having N particles interact with each other’s fields is much more computationally taxing.
 
Pyrogasm is right, the moving of the particles is only a small amount of the computation required for this engine. Currently, I have the particle limit set to 90, because for higher numbers, my frame rate starts to drop. With the particle interactions disabled (so particles will just move in a straight line), I'm able to go up to 400 particles before the frame rate drops. That means that at the particle limit, the move function only accounts for approximately 20% of the processing power required.

The problem is that, while the move function's computation requirement increases linearly with the amount of particles, the requirements of the interaction function increase quadratic. That is because every particle sees every other particle. If you have 2 particles, that's 1 interaction. If you have 3 particles, that's 3. If you have 4, that's 6. If you have 90, that's 4095.

For example, the first two lines here
JASS:
set renewalCounter[I] = renewalCounter[I] + 1
if renewalCounter[I] == stepsPerRenewal[I] then
    call FORCEFUNC([...]
are executed for each particle pair, governing when the interaction function is called again to recalculate the pair's interaction to update their new positions etc. These lines are executed 135,000 times per second at the particle limit. I experienced a significant increase in performance when I changed the counter to count down instead, so that I could replace the second line:
JASS:
set renewalCounter[I] = renewalCounter[I] - 1
if renewalCounter[I] == 0 then
I hope I can come up with a solution where it isn't necessary to execute these lines that often. That would increase the particle limit by a good chunk.

------------------------------

I uploaded version 0.14:
  • Powerups now start to flicker when they're about to despawn.
  • Crystal generators now have collision boxes.
  • Players now collide with each other.
  • Players are now invulnerable for 2.5 seconds after reviving.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,013
I think the easiest way to gain back some computation power would be to determine some sphere of influence radius for each particle (probably based on its momentum) and then ignore all the other objects further away than that.

For that matter the magnetic field effect could use a radius indicator; the purple sparkles aren’t very definitive.
 
Something similar is already happening. Particles that are far away from each other get updates to their interaction only once every few seconds. The formula that calculates the interval can be refined, because I think it doesn't increase fast enough for far away particles. I have to experiment with that.

I can compile some notes on the force algorithm. I think, besides the fact that it doesn't use many of the advanced techniques used in professional simulations, the algorithm is quite well optimized. JASS is just not that well suited for this :D. If you had access to vector and matrix addition and multiplication, you'd be able to increase the particle limit by a large factor.

I actually tried a small optimization just now and I was able to get another 5-10 particles out of it. By using one global counter for all particle pairs, I was able to eliminate this line
JASS:
set renewalCounter[I] = renewalCounter[I] - 1
which was being called >100,000 times per second.

-------------------

Yes, the magnetic field isn't very useful. I was just testing what I could do with fields. I think it shouldn't be a player ability, but a game mode or two could have a magnetic field as a gimmick.
 
Last edited:
Heroes:

Each hero's design is based on a standard Warcraft lore character, then imagining how that hero's powers would translate to the quantum world. Before she was ultra-miniaturized, the Mistress of Waves was a naga tidal mage. Her mastery over the ocean's waves now allow her to master the manipulation of light and particle waves.

Each hero has access to up to eight abilities:
  • The bottom row (Q, W, E, and R) are the particle spawn abilities. They require particle powerups to be picked up before they can be used. The particles that are assigned to these slots may vary between game modes.
  • The center row(A, S, D, and R) are the hero's unique abilities. All abilities must interact with the particle field in one way or another. There will be no simple "Deal X damage" or "Restore X health" abilities.
  • The top row(Z, X, C, and V) are the movement commands. Out of these, C (Release Control), and V (Accelerate) are the most interesting. Z and X are the standard Move and Stop.

Silandori, the Mana Addict:

The first hero, the Mana Addict, encourages an aggressive playstyle, with many skills to accelerate particles launched at her opponents, but with poor defensive skills.


Cosmic Power (A)

When activated, increases the velocity of particles you launch by 150% at the cost of 6 mana per particle. Lasts 10 seconds. Cooldown: 30 seconds


Charge Up (S)

Gives target player an electric charge of +15 for 6 seconds. Cooldown: 40 seconds

Using Charge Up on an opponent turns electrons into homing missiles. Using it on yourself, you're able to combine it with the next ability.


Absorption Field (D)

While channeling, creates an energy field around Silandori that converts all nearby particles into mana, restoring 10 mana per particle absorbed. Lasts 8 seconds. Cooldown: 60 seconds


Arcane Vortex (F)

Creates a massive arcane explosion around Silandori that pushes away all nearby particles for 3 seconds. Cooldown: 90 seconds

The Mana Addict's "Oh Sh*t" button is only moderately effective when used purely in a defensive manner. However, the explosion accelerates particles to extreme speeds, putting all nearby opponents in danger. Arcane Vortex can also be used as a launching pad for your own particles.
 
Last edited:
Uploaded version 0.15:
  • Mana Addict and Astromancer heroes playable: Some spells need a bit more work. I will change the unit-target spells to point-target, affecting the nearest unit of the targeted point.
  • Planets in the background for decoration: The location of the planets is calculated using each player's camera position. This makes the planets lag behind a bit when scrolling the camera. It might look a bit weird?
  • Particle force field calculation further improved and particle limit increased: Inlined all functions in the force field loop. This makes a massive difference.
  • Added buttons for adjusting camera height: I'm not sure if these will remain, because zooming out is almost always beneficial, except that it drains cpu resources. It might be better to fix the camera height at a distance slightly higher than the standard height.
 
Status
Not open for further replies.
Top