You are confusing the difference between the projection matrix and the worldview matrix. Z is depth in the projection matrix because the XY coordinate is the pixel location on the screen. The world matrix tells you how the world & items in it are oriented and the view matrix tells you how you are oriented in the world. Multiply a vector against all three and you end up with a vector for which the xy component is the pixel coordinate on the screen & the z is the depth. Z fighting happens because two pixels have the same z distance from the screen. Usually this is taken care of by telling the renderer to over-write anything that is equal in depth, meaning it will reliably render the last thing rendered with no z fighting. The z buffer is a texture that holds a value between 0 and 255 that tells you the depth of the scene at that pixel coordinate. This can be retrieved after rendering for a variety of uses. For example it can be used for differed lighting. Differed lighting computes the lighting by rendering lights as spheres into a buffer. With the depth buffer & lighting buffer you can compute the lighting on the 2D plane that is the screen, which allows you to use virtually infinite light sources which would normally be impossible due to hardware constraints & the costs of computing lighting on a per face or per vertex basis.
I was talking about projection matrix the whole time. What else were you thinking ? Admit you got caught with your pants down and now youāre trying to find some dumb excuse.
I know what Z-fighting is. No need for explanation.
You absolutely were not. Game logic is implemented in the world space which is defined by the world matrix. We were talking about game logic & why a sc2-style rts is extremely difficult to implement in 3D. That has nothing to do with the projection matrix because the projection matrix is only useful for converting the world to pixels on the screen. Itās purely for graphics and nothing else. Sometimes you do use it for certain utilities. For example if you want to know where in the scene a certain pixel projects to. You might want to know this if you are doing a unit selection with the mouse for example. Thatās one way you can use the z buffer. With the XY mouse coordinate & the depth from the z-buffer you can calculate the 3D position in the world that the mouse is pointing at. Other than that the projection matrix has no relevance to an rts game at all.
Yes i was talking about projection matrix from the start because thatās how 3d graphics are created. You have a point in three dimensional coordinate system like (100,100,100) and you use projection matrix to represent that point on 2d monitor screen using Perspective projection. Later it can be used for frustrum culling for example and other stuff. Most certainly video games engines like quake, counterstrike and SC2 use this matrix for calculation purpose. I didnāt say a word about some world view.
Best case scenario you were confused on the difference between graphics and game logic. Yes, sc2 has 3D graphics. No, sc2 game logic is not computed in 3D. Because we were talking about game logic, bringing up the graphics is bizarre to say the least. SC2 game logic is 2D. One of the advantages of fully 3D terrain is that you can make obstacles that units that are too tall canāt fit through. You can also modify the vision mechanic to where units that are too short canāt see over terrain that is too tall. So if terrain is āhigh groundā or ālow groundā is entirely up to the unit parameters instead of solely the map parameters.
This is useful because you can create attack paths that are great for short units and bad for tall units, or that are great for tall units and bad for short units. The maps can modify the meta by changing what attack paths can be utilized by unit height. That makes the strategy much more diverse.
Ok so can we make agreement that Z is used as depth in projection matrix, but vertical height in your āgame logicā is up to individual interpretation like i said ? You can use Z or Y - itās really up to the developer and his programming style.
Btw how do you know how SC2 logic works ? Have you seen the code ? Are you reverse engineer ? Or do you work for Blizzard ?
No, the proper way to do it is Z up because of the right hand rule. Itās not just an axis label, it transposes values in the 3d vectors and matrices. Putting Z as depth makes a lot of the matrix math cleaner. When you start dealing with shadow projections & quaternions and the like, you really want your matrices to be as clean as possible. The last thing you want is to accidentally flip your coordinate system from left handed to right and have nothing inside a reflection buffer because everything is off the camera and you are left scratching your head about what is going on.
Throughout my programming career, most of it was spent programming rts engines. Iāve worked on 5 and was the lead programmer on 3. I can tell how things work just by looking at it.
What engines ? Can you give names of those engines and games you were working on ?
Two were open source, one was one I developed from the ground up & released open source. Due to a dispute with someone else, I decided to take it down. Itās no longer available. One was developed as a generic engine for a studio in europe that will license it to studios to produce their own rts games with and the last is my own personal engine that I developed to push the boundaries on what the genre is capable of. The development of the generic one I worked on for about a decade before the project wrapped up. Developing a generic engine is much harder than a specific engine because you donāt have a feature list. The engine has to be much more dynamic and robust than usual. It was a fun project while it lasted. So yeah, Iāve worked with dozens of other RTS programmers & am very familiar with a broad range of the algorithms that make them work, and I have never found one that implements fully 3D game logic, but I have found many reasons why youād have to be literally insane to even try doing that. It makes the pathfinding algorithms an absolute nightmare.
Well, no wonder if you want to make pathfinding in three dimensions, like you said you used some āsphere map where units can attack to ceilingsā it is a nightmare. Probably even SC2 devs who are, i assume, much better than you and i would struggle to do this properly without issues. 2d pathfinding is much easier as you only need to find a route that bypasses obstacles in flat terrain (cliffs donāt matter because units cannot walk through them except protoss collosus which is basically air unit restricted to ground movement. I hope that makes sense.
Their work was excellent, obviously, but all 2d game logic like that has been pretty much figured out for like 40 years. Itās just a-star with some extra bells and whistles. The reason a-star in 3d is difficult is because a lot of the assumptions that work in 2D are simply absurd in 3D. For example, itās easy to define terrain boundaries in 2D. A unit canāt cross a cliff unless it flies. But in 3D what is a ācliffā? How do you even define where the cliff is. Thatās just the tip of the iceberg.
Yes. The boundary issue is much more complicated in 3D. In 2D you can find a series of line segments that define the exterior hull of the walk-able space and apply a force to any unit that gets too close to one of these segments. That keeps them from crossing terrain boundaries. These tests are extremely fast to implement via an octree nearest neighbor search. But in 3D itās a nightmare. Instead of line segments you have planes, and tens of thousands of them for a single map. The reason there are so many is because you have an extra dimension adding more boundaries. In 2D you have +x+y, +x-y, -x-y, -x+y, +x, -x, +y, -y but in 3D you have 27.
Letās set aside the difficulty of computing these ābarrier planesā and assume you have code that does it just fine. The next step is actually using them. The computational cost of projecting a point to a plane in 3D is much higher than that of point to line segment in 2D and because of that the math is slower to compute. In a game where there can be hundreds of units, and where the boundary collision computations grow exponentially X*N where X is the number of units and N is the number of boundary planes, itās basically impossible to do these calculations on the time scales that are needed to keep the game from lagging. Unless of course you are a math wizard and can drastically speed up these calculations. Which I am. I developed an entire software suit specifically for the purpose of finding approximate solutions to problems but with the criteria that they have to compute fast enough to actually work. So it finds the most accurate algorithm that meets the time requirements.
One of the old school ways of speeding the algorithms up is to do it in integer math. You basically take the value and multiply it by 10000 and then do the same computations as normal and divide it back down at the end. The reason this works is because computers are much faster at integer math, but you lose precision due to rounding. Thatās why you multiply by 10,000 because it gives you 5 decimal places of precision. But itās a trade off because you run the risk of integer overflow so you have to be careful the design the integer version of the algorithm to have the right amount of precision and never overflow an integer. This sped things up but not sufficiently. I converted it to run using SSE optimizations (huge pain in the rear) and it still wasnāt fast enough. I parallelized it with multithread. Still not enough. So I had to go on a side quest to develop a piece of software that finds approximate solutions to a problem. That project alone took 2 years of my life. Thatās just a small tidbit of the challenge to implement 3d pathfinding.
So letās do an example just to illustrate how powerful this thing is. I have an equation Y = Sin(X * A + B)^C * D + E
. 1000 data points are generated with this function and each dtga point uses random values for every variable. Gotta find an equation that approximates this insane function. Well the program ran for 5 minutes before finding Y = (19373338.462445 / (B + -6.235767 / B))
which apparently matches the data set with an R2 value of 0.72. Thatās amazing. If I let it run over night it would find something that would match with an R2 value of 0.99.
Just found one with an R2 value of 0.91: Y=(D ^ 4.771200 ^ 0.000000 * 4.188551 + A / (E + -6.545047) + B * 5181299.697399)
Just found another one with an R2 value of 0.99: ((E + 9.000000 / E + C logbase D logbase ((A / A / B ^ -4.000000 ^ B logbase (4.259533 / B ^ 19.041855)) * 4.794790 logbase -0.000000 logbase C logbase B ^ E + 21.718357) + E + X * A logbase E / 7.877138 / -5.080174 ^ 19.064893 ^ 0.000000 / -5.000000 + -8.599812 / D / B + 0.393503 / B / -7.673116 ^ -2.000000 / E + E * C / -2.000000 * D) + 9.599032 + X)
It is a bit complicated so letās bump up the emphasis on producing a simpler algorithm (now that it has one it knows matches the data very well).
Just for you, abs.
https://i.imgur.com/8Buyhwk.png
Donāt post screenshots like this. I told you, unless i know your real account name they donāt matter. You could take screenshots of anyoneās stream and claim itās yours. If you want to prove your 5.5 these days, get to it using your official account - Slammer or Bowlcut - these i know are yours. You can sacrifice bowlcut if you donāt need it.
Unless you are top-notch mathematician donāt try it. The best engines/algorithms are made by people who are mathematical geniuses - John Carmack, Tim Sweeney etc. Together with the entire team of developers they can guarenatee their algorithms are fast and efficient. On the other hand with all your knowledge you are relatively unknown and you cannot implement such algorithm yourself. What degree do you have in math ? Doctor, professor ? If not leave this task to folks who know how to do it properly. Btw iām sure there are articles on the internet how to implement pathfinding in 3D. Why bother yourself inventing your own algorithm which probably will be slow and inefficient if you can āstealā someone elseās solution which most likely is tested and verified.
Well they establish just how delusional your takes are. A random gm opponent is so bewildered at how hard heās getting clowned on he realizes my mmr isnāt right. But abs has seen screenshot after screenshot and video clip after video clip and still canāt figure it out. Heās just a little slower than your typical GM, I guess. Heāll get there eventually.
I built a career off of doing exactly that. So sue me.
You donāt say.
Thereās limitations to what a human can do. Systems of equations have trillions of possible solutions. You canāt optimize that without software designed to do exactly that.
My analysis of the sc2 pro scene alone could be a doctoral thesis. The behavior of elo algorithms as a system arenāt well understood. Researchers canāt even decide if the system should be logistic or gaussian. Do you know what Neil Degrasse Tyson did for his thesis? He showed there was a correlation between two variables in telescope measurements. Thatās it. Metallicity increases in some parts of the milky way. The problems you deal with in computer science are drastically harder. Itās a ridiculously hard field. You gotta predict how a protein will fold or how water will move when there are literally a trillion answers or more, and you have to find the 1 correct one. Itās like, good luck.
I canāt believe I have to explain this because you are such a smart guy. I am amazed you donāt know this. If you copy/paste other peoplesā work into your product, you end up with a product exactly like what is available on the market already. By definition, if you want to succeed in any field, you have to do something novel. Every successful mathematician, scientist, businessman, was successful because they stopped doing what other people had already done. There is no money to be made by repeating the past. You have to look for ways to push boundaries. If you donāt, you will fail.
Itās impossible to break into a new market with a product thatās the same as whatās already on the market. You have no brand recognition & youāre offering the same thing as everyone else. So the only thing you can do is to offer it for cheaper. But they price their products such that itās impossible for someone to offer it cheaper & yet still turn a profit. Thatās how they maintain a vice grip on the market. If you somehow find a way to turn a profit, they will hit you with a lawsuit and even if the lawsuit has no merit it will destroy your profit margins. There is no way to break into an existing market with the same product as what is already offered on that market.
If you bring something new to the table, consumers are incentivized to take a risk buying a product with no brand recognition & because you invented it from scratch you own the intellectual property which makes you bulletproof to lawsuits. Thatās why having software that can spit out thousands of algorithms to compute the same answer is worth its weight in gold. You can do anything without having to worry about being sued for violating someoneās patent because you are 100% guaranteed to have a unique algorithm. That means you can break into any market.
Anyway the program optimized a new answer to the above problem: (-6.545047 logbase 3.544704 / -7.000000 ^ 0.000000 + 2.000000 + B / (0.000000 ^ X + (E + 0.000000 + -6.545047)) + B * 5181300.000000)
It could make it smaller and simpler, but you get the point.
Iāve been playing the races a bit, and I think youāre a bit off about Terran. I think they are usually in bronze-silver because Terran is garbage as a race. Both Zerg and Protoss have easy ways to play. You can do quick attacks with them. You have so many options.
Terran honestly feels like crap. Thereās no easy way to win. Thereās no early attacks, just nothing special. However, itās actually good that Terran is hard. Itās the only thing stopping everyone picking Random.
Thatās completely not possible, because I didnāt make a public post about starcraft on a forum between 2016 to 2022. I resumed rereading these forums mid-2022, but then took another hiatus from here in april 22, until almost exactly a single year ago. This is also easily verifiable because I use exactly two account names for all my online presences, and my profile is public.
Why do you insist on saying things that are demonstrably just not true?
but you donāt need 3d terrain for this, you just tag the 2d elements with a āheightā or āgapā parameter - or a strict bump/height map. :\ This is a solution looking for a problem - a much better example is just the idea of an overpass where you actually need to have things that would otherwise have the same coordinates but need to have a distinct set of interactions.
You donāt want to be doing raycasting anyway, so youād want to not have to check thingsā actual heights. But you knew that and that thatās equivalent, because youāre smart.
ā¦ You can do so many early timing pressures as Terran? Fast-stim pressure has always been crazy, Tank contains still work, Mine-Hellion pingpongs, early on battlemech still works, and thatās ignoring proxied barracksā three variants, floated factoriesā¦
My personal favorite is Banshees, but they have problems from their low HP - just like most Terran units, really.
Yeah, those attacks are nothing compared to Protoss and Zerg. As your average cheeser, Zealots, Zerglings and Cannons cannot be beat.
This is just plain wrong.
Terran has of all races the most amounts of different early pressure/harass. You can go banshees, widow mine, some marine stim timing, proxy rauder, proxy reaper, a 16 marine drop, hellion harass, last patch busted cyclone all in and now still cyclone drops and even early bc or thor plays.
Almost any unit can be used as an all in/cheese or macro play to harass. I actually cannot think about a unit that cant be used in early game, apart from ghosts. they were used when cloak wasnt needed to be researched tho.
Iāve got an interesting way to ābalanceā the game.
First, remove all proxies, of course. No buildings near the enemy. This is mainly a Protoss ladder nerf.
Then scale the Town halls.
Hatchery - 350
Command Centre - 400
Nexus - 450
Those arenāt as quick as Zergling, Zealot and Cannon attacks.