This commit is contained in:
Miloslav Ciz 2023-03-12 22:18:22 +01:00
parent 7f05aeef53
commit 4077aab5ab
6 changed files with 8 additions and 49 deletions

View file

@ -10,4 +10,6 @@ The Doom engine was revolutionary and advanced (not only but especially) video g
Doom source code is written in [C89](c.md) and is about 36000 [lines of code](loc.md) long. The original system requirements needed roughly a 30 MHz [CPU](cpu.md) and 4 MB [RAM](ram.md) as a minimum. It had 27 levels (9 of which were shareware), 8 weapons and 10 enemy types. Doom source code is written in [C89](c.md) and is about 36000 [lines of code](loc.md) long. The original system requirements needed roughly a 30 MHz [CPU](cpu.md) and 4 MB [RAM](ram.md) as a minimum. It had 27 levels (9 of which were shareware), 8 weapons and 10 enemy types.
Doom has a [deterministic](determinism.md) [FPS](fps.md)-independent physics which allows for efficient recording of demos of its gameplay and creating [tool assisted speedruns](tas.md). Such demos can be played back in high quality while being minuscule in size and help us in many other ways, for example for verifying validity of [speedruns](speedrun.md). This is very nice and serves as an example of a well written engine (unlike later engines from the same creators, e.g. those of [Quake](quake.md) games which lacked this feature).
LOL someone created a Doom system monitor for [Unix](unix.md) systems called [psDooM](psdoom.md) where the monsters in game are the operating system [processes](process.md) and killing the monsters kills the processes. LOL someone created a Doom system monitor for [Unix](unix.md) systems called [psDooM](psdoom.md) where the monsters in game are the operating system [processes](process.md) and killing the monsters kills the processes.

View file

@ -2,49 +2,4 @@
Here let be listed exercises for the readers of this wiki. You can allow yourself to as many helpers and resources as you find challenging: with each problem you should either find out you know the solution or learn something new while solving it. Here let be listed exercises for the readers of this wiki. You can allow yourself to as many helpers and resources as you find challenging: with each problem you should either find out you know the solution or learn something new while solving it.
1. What's the difference between [free software](free_software.md) and [open source](open_source.md)? TODO
2. Say we have an algorithm that finds all pairs of equal numbers in an array of numbers of length *N* and adds all of these (unordered) pairs to a set *S*. The algorithm is (pseudocode): `for i := 0 to N: for j := 0 to N: if numbers[i] == numbers[j]: add(S,pair(i,j))`. How can we optimize the algorithm in terms of its execution speed (i.e. make it perform fewer operations while keeping its results the same)? How did the asymptotic time complexity ("big O") class change?
3. In computer graphics, what is the difference between ray casting, ray tracing and path tracing?
4. Why are manhole lids round and not square?
5. Give one real-life example of each of the following binary [relation](relation.md) types: [transitive](transitivity.md) but not equivalence, non-transitive, [antisymmetric](antisymmetric.md) and symmetric at the same time, [asymmetric](asymmetry.md), non-trivial [equivalence](equivalence.md).
## Solutions
A solution to each problem should be listed here -- keep in mind there may exist other solutions that those listed here.
**solution 1**:
Both movements share very similar rules of licensing and technically free software and open-source are largely the same. However, free software is fundamentally aiming for the creation of ethical software -- that which respects its user's freedom -- while open source is a later movement that tries to adapt free software for the business and abandons the pursuit of ethics, i.e. it becomes corrupted by capitalism and no longer minds e.g. proprietary dependencies.
**solution 2**:
In the given algorithm we compare all numbers twice. This can be avoided by not comparing a number to previous numbers in the array (because these have already been compared). Additionally we don't have to compare the same number to itself, a number will always be equal to itself:
```
for i := 0 to N:
add(S,i,i) // no need to compare
for i := 0 to N:
for j := i + 1 to N:
if numbers[i] == numbers[j]:
add(S,pair(i,j))
```
While the first algorithm performs N^2 comparisons, the new one only needs N - 1 + N - 2 + N - 3 + ... ~= N * N / 2 = N^2 / 2 comparisons. Even though the new version is always twice as fast, its time complexity class remains the same, that is O(N^(2)).
**solution 3**:
They are all image-order methods of 3D [rendering](rendering.md). [Ray casting](ray_casting.md) casts a single ray for each screen pixel and determines the pixel color from a single hit of the ray. [Ray tracing](ray_tracing.md) is a [recursive](recursion.md) form of ray casting -- it recursively spawns secondary rays from the first hit to more accurately determine the pixel color, allowing for effects such as shadows, reflections or refractions. Path tracing is a method also based on casting rays, but except for the primary rays the rays are cast at random (i.e. it is a [Monte Carlo](monte_carlo.md) method) to approximately solve the rendering equation, progressively computing a more accurate version of the image (i.e. the image contains significant noise at the beginning which lowers with more iterations performed) -- this allows computing [global illumination](global_illumination.md), i.e. a very realistic lighting that the two previous methods can't achieve.
**solution 4**:
Round lid can't fall into the hole.
**solution 5**:
- transitive, not equivalence: *A* is a descendant from *B*.
- non-transitive: *A* is a friend of *B*.
- symmetric: *A* had sex with *B*.
- antisymmetric and symmetric: *A* is *B*.
- asymmetric: *A* is a mother of *B*.
- non-trivial equivalence: *A* is of same age as *B*.

View file

@ -6,7 +6,7 @@ WIP
This is a brief summary of history of [technology](technology.md) and [computers](computer.md). This is a brief summary of history of [technology](technology.md) and [computers](computer.md).
The earliest known appearance of technology related to humans is the use of **stone tools** of hominids in Africa some two and a half million years ago. Learning to start and control **fire** was one of the most important advances of earliest humans; this probably happened hundreds of thousands to millions years ago, even before modern humans. Around 8000 BC the **[Agricultural Revolution](agricultural_revolution.md)** happened: humans domesticated animals and plants and subsequently started to create cities. Primitive **writing** can be traced to about 7000 BC to China. **Wheel** was another extremely useful technology humans invented, it is not known exactly when or where it appeared, but it might have been some time after 5000 BC -- in Ancient Egypt **The Great Pyramid** was built around 2570 BC still without the knowledge of wheel. Around 4000 BC **history starts with first written records**. Humans learned to smelt and use metals approximately 3300 BC (**Bronze Age**) and 1200 BC (**Iron Age**). **[Abacus](abacus.md)**, one of the simplest devices aiding with computation, was invented roughly around 2500 BC. However people used primitive computation helping tools, such as bone ribs, probably almost from the time they started trading. Babylonians in around 2000 BC were already able to solve some forms of **[quadratic equations](quadratic_equation.md)**. The earliest known appearance of technology related to humans is the use of **stone tools** of hominids in Africa some two and a half million years ago. Learning to start and control **fire** was one of the most important advances of earliest humans; this probably happened hundreds of thousands to millions years ago, even before modern humans. Around 8000 BC the **[Agricultural Revolution](agricultural_revolution.md)** happened: this was a disaster -- as humans domesticated animals and plants, they had to abandon the comfortable life of hunters and gatherers and started to suffer greatly from the extremely hard [work](work.md) on their fields (this can be seen e.g. from their bones). This led to the establishment of first cities. Primitive **writing** can be traced to about 7000 BC to China. **Wheel** was another extremely useful technology humans invented, it is not known exactly when or where it appeared, but it might have been some time after 5000 BC -- in Ancient Egypt **The Great Pyramid** was built around 2570 BC still without the knowledge of wheel. Around 4000 BC **history starts with first written records**. Humans learned to smelt and use metals approximately 3300 BC (**Bronze Age**) and 1200 BC (**Iron Age**). **[Abacus](abacus.md)**, one of the simplest devices aiding with computation, was invented roughly around 2500 BC. However people used primitive computation helping tools, such as bone ribs, probably almost from the time they started trading. Babylonians in around 2000 BC were already able to solve some forms of **[quadratic equations](quadratic_equation.md)**.
After 600 BC the Ancient Greek [philosophy](philosophy.md) starts to develop which would lead to strengthening of rational, [scientific](science.md) thinking and advancement of [logic](logic.md) and [mathematics](math.md). Around 300 BC Euklid wrote his famous *Elements*, a mathematical work that proves theorems from basic [axioms](axiom.md). Around 400 BC **[camera obscura](camera_obscura.md)** was already described in a written text from China where **[gears](gear.md)** also seem to have been invented soon after. Ancient Greeks could communicate over great distances using **Phryctoria**, chains of fire towers placed on mountains that forwarded messages to one another using light. 234 BC Archimedes described the famous [Archimedes screw](archimedes_screw.md) and created an **[algorithm](algorithm.md) for computing the number [pi](pi.md)**. In 2nd century BC the **Antikythera mechanism, the first known [analog](analog.md) computer** is made to predict movement of heavenly bodies. Romans are known to have been great builders, they built many roads and such structures as the Pantheon (126 AD) and aqueducts with the use of their own type of concrete and advanced understanding of physics. After 600 BC the Ancient Greek [philosophy](philosophy.md) starts to develop which would lead to strengthening of rational, [scientific](science.md) thinking and advancement of [logic](logic.md) and [mathematics](math.md). Around 300 BC Euklid wrote his famous *Elements*, a mathematical work that proves theorems from basic [axioms](axiom.md). Around 400 BC **[camera obscura](camera_obscura.md)** was already described in a written text from China where **[gears](gear.md)** also seem to have been invented soon after. Ancient Greeks could communicate over great distances using **Phryctoria**, chains of fire towers placed on mountains that forwarded messages to one another using light. 234 BC Archimedes described the famous [Archimedes screw](archimedes_screw.md) and created an **[algorithm](algorithm.md) for computing the number [pi](pi.md)**. In 2nd century BC the **Antikythera mechanism, the first known [analog](analog.md) computer** is made to predict movement of heavenly bodies. Romans are known to have been great builders, they built many roads and such structures as the Pantheon (126 AD) and aqueducts with the use of their own type of concrete and advanced understanding of physics.
@ -18,7 +18,7 @@ Around the year of our Lord 1450 a major technological leap known as the **Print
They year 1492 marks the **discovery of America** by Christopher Columbus who sailed over the Atlantic Ocean, though he probably wasn't the first in history to do so, and it wasn't realized he sailed to America before his death. They year 1492 marks the **discovery of America** by Christopher Columbus who sailed over the Atlantic Ocean, though he probably wasn't the first in history to do so, and it wasn't realized he sailed to America before his death.
During 1700s a major shift in civilization occurred, called the **[Industrial Revolution](industrial_revolution.md)**. It spanned roughly from 1750 to 1850. It was a process of rapid change in the whole society due to new technological inventions that also led to great changes in how people worked and lived their everyday lives. It started in Great Britain but quickly spread over the whole world. One of the main changes was the **transition from manual manufacturing to factory manufacturing** using machines and sources of energy such as coal. **[Steam engine](steam_engine.md) played a key role**. Work became more organized, society became industrionalized. This revolution became [criticized](ted_kaczynski.md) as it unfortunately opened the door for [capitalism](capitalism.md), made people less independent as everyone had to become a specialized cog in the society machine, at this time people started to measure time in minutes and lead very planned lives. People became enslaved by the system. During 1700s a major shift in civilization occurred, called the **[Industrial Revolution](industrial_revolution.md)** -- this was another disaster that would lead to the transformation of common people to factory slaves and loss of their self sufficiency. The revolution spanned roughly from 1750 to 1850. It was a process of rapid change in the whole society due to new technological inventions that also led to big changes in how people lived their everyday lives. It started in Great Britain but quickly spread over the whole world. One of the main changes was the **transition from manual manufacturing to factory manufacturing** using machines and sources of energy such as coal. **[Steam engine](steam_engine.md) played a key role**. Work became a form of a highly organized slavery system, society became industrionalized. This revolution became highly [criticized](ted_kaczynski.md) as it unfortunately opened the door for [capitalism](capitalism.md), made people dependent on the system as everyone had to become a specialized cog in the society machine, at this time people started to measure time in minutes and lead very planned lives with less joy. But there was no way back.
In 1712 Thomas Newcomen invented the first widely used **[steam engine](steam_engine.md)** used mostly for pumping water, even though steam powered machines have already been invented long time ago. The engine was significantly improved by [James Watt](james_watt.md) in 1776. Around 1770 Nicolas-Joseph Cugnot created a first somewhat working **steam-powered [car](car.md)**. In 1784 William Murdoch built a small prototype of a **[steam locomotive](steam_locomotive.md)** which would be perfected over the following decades, leading to a transportation revolution; people would be able to travel far away for work, the world would become smaller which would be the start of **[globalization](globalization.md)**. The railway system would make common people measure time with minute precision. In 1712 Thomas Newcomen invented the first widely used **[steam engine](steam_engine.md)** used mostly for pumping water, even though steam powered machines have already been invented long time ago. The engine was significantly improved by [James Watt](james_watt.md) in 1776. Around 1770 Nicolas-Joseph Cugnot created a first somewhat working **steam-powered [car](car.md)**. In 1784 William Murdoch built a small prototype of a **[steam locomotive](steam_locomotive.md)** which would be perfected over the following decades, leading to a transportation revolution; people would be able to travel far away for work, the world would become smaller which would be the start of **[globalization](globalization.md)**. The railway system would make common people measure time with minute precision.

View file

@ -18,6 +18,7 @@ It's sad and dangerous that newer generation won't even remember technology used
- **Old software was shipped finished, complete and with minimum [bugs](bug.md)**. Nowadays newly released "[apps](app.md)" and [games](game.md) are normally released unfinished, even in pre-alpha states and even "finished" ones have [bugs](bug.md) often rendering the software unsuable (see Cyberpunk 2077, GTA: Definiteve Edition etc.), user is supposed to wait years for fixes (without any guarantees), pay for content or even subscriptions. Old software was difficult or even impossible to patch (e.g. on [Gameboy](gameboy.md)) so it had to work. - **Old software was shipped finished, complete and with minimum [bugs](bug.md)**. Nowadays newly released "[apps](app.md)" and [games](game.md) are normally released unfinished, even in pre-alpha states and even "finished" ones have [bugs](bug.md) often rendering the software unsuable (see Cyberpunk 2077, GTA: Definiteve Edition etc.), user is supposed to wait years for fixes (without any guarantees), pay for content or even subscriptions. Old software was difficult or even impossible to patch (e.g. on [Gameboy](gameboy.md)) so it had to work.
- **Old tech had minimum malicious features**. There wasn't [spyware in CPUs](intel_me.md), **[DRM](drm.md) was either absent or primitive**, there weren't ads in file explorers, there weren't [microtransactions](microtransaction.md) in games, there weren't [autoupdates](autoupdate.md), there weren't psychologically abusive [social networks](social_network.md), technology was **designed to last**, with replaceable parts; not to be [consoomed](consumerism.md), there was much less [censorship](censorship.md). - **Old tech had minimum malicious features**. There wasn't [spyware in CPUs](intel_me.md), **[DRM](drm.md) was either absent or primitive**, there weren't ads in file explorers, there weren't [microtransactions](microtransaction.md) in games, there weren't [autoupdates](autoupdate.md), there weren't psychologically abusive [social networks](social_network.md), technology was **designed to last**, with replaceable parts; not to be [consoomed](consumerism.md), there was much less [censorship](censorship.md).
- **Old tech was much easier to repair, modify and customize**, thanks to not being so overcomplicated and not containing so many anti-repair "features". Old software wasn't in the [cloud](cloud.md) which makes it impossible to modify. - **Old tech was much easier to repair, modify and customize**, thanks to not being so overcomplicated and not containing so many anti-repair "features". Old software wasn't in the [cloud](cloud.md) which makes it impossible to modify.
- **Old software was better programmed** because it was firstly made by actually the smartest people such as mathematicians and physicist (who were considering the big picture and saw e.g. the necessity for minimalism) and secondly without such a great pressure of the market because software was more a subject of research and experimenting rather than dirty fight for consumers. For example the [Doom](doom.md) engine was written very nicely, in an extremely [portable](portability.md) way (which actually became legendary), with things such as an elegant deterministic FPS-independent physics (which results in many advantages and is basically THE only correct way of writing an engine) and [software rendering](software_rendering.md) that ran smooth even on that time's slow CPUs. Later engines from the same creators -- those of [Quake](quake.md) games -- began to suffer from worse design (no deterministic physics, dropping of software rendering etc.). Nowadays software is written by high schoolers, women and incompetent minorities forced into tech just for diversity quotas and generally anyone who can just copy paste snippets of code from the web -- game engines (like anything else) nowadays are indescribably badly written, non-portable, non-deterministic, bloated, running slow even on computers thousands of times faster than those that ran Doom (even if you lower graphic details of a 2023 game to the looks of a 2000s game, it will likely run under 10 FPS on a 2020 computer).
- **Old tech was much more independent and freedom friendly**, did not require Internet connectivity, subscription etc. Thanks to its simplicity and better hackability it was possible for people to partly control their devices, even if the devices were [proprietary](proprietary.md). - **Old tech was much more independent and freedom friendly**, did not require Internet connectivity, subscription etc. Thanks to its simplicity and better hackability it was possible for people to partly control their devices, even if the devices were [proprietary](proprietary.md).
- There was **minimum [bullshit](bullshit.md)**. True usefulness was more important than killer features and marketing. - There was **minimum [bullshit](bullshit.md)**. True usefulness was more important than killer features and marketing.
- Old tech was **simpler and more [fun](fun.md) to program**, allowing direct access to hardware, not complicating things with [OOP](oop.md) and similar [shit](shit.md), and so **old programmers were more [productive](productivity_cult.md)**. - Old tech was **simpler and more [fun](fun.md) to program**, allowing direct access to hardware, not complicating things with [OOP](oop.md) and similar [shit](shit.md), and so **old programmers were more [productive](productivity_cult.md)**.

2
tas.md
View file

@ -10,7 +10,7 @@ TAS does NOT allow hacking the game in other ways than what's possible to achiev
TAS runs coexist alongside RTA (non-TAS) runs as separate categories that are beneficial to each other: RTA runners come up with speedrunning techniques that TAS programmers can perfectly execute and vice versa, TAS runners many times discover new techniques and ideas for RTA runners (for example the insane discovery of groundbreaking noseboost when TAS was introduced to Trackmania). In fact RTA and TAS runners are many times the very same people. Of course if you submit a TAS run in RTA category, you'll be seen as a cheater. TAS runs coexist alongside RTA (non-TAS) runs as separate categories that are beneficial to each other: RTA runners come up with speedrunning techniques that TAS programmers can perfectly execute and vice versa, TAS runners many times discover new techniques and ideas for RTA runners (for example the insane discovery of groundbreaking noseboost when TAS was introduced to Trackmania). In fact RTA and TAS runners are many times the very same people. Of course if you submit a TAS run in RTA category, you'll be seen as a cheater.
Creating a TAS is not an easy task, it requires great knowledge of the game (many times including its code) and its speedrunning, as well as a lot of patience and often collaboration with other TASers. TASes are made *offline* (not in real time), i.e. hours of work are required to program minutes or even seconds of the actual run. Many paths need to be planned and checked. Compared to RTAs, the focus switches from mechanical skills towards skillful mathematical analysis and planning. Besides this some technological prerequisites are necessary: the actual tools to assist with creation of the TAS. For many new [proprietary](proprietary.md) games it is extremely difficult to develop the necessary tools as their source code isn't available, their assembly is obscured and littered with "anti-cheating" malware. The situation is better with old games that are played in [emulators](emulator.md) such as [DOS](dos.md) games or games for consoles like [GameBoy](gameboy.md) -- emulators can give us a complete control over the environment, they allow to save and load the whole emulator state at any instant, we may slow the time down arbitrarily, rewind and script the inputs however we wish (an advanced technique includes e.g. [bruteforcing](brute_force.md): exhaustively checking all possible combinations of inputs over the following few frames to see which one produces the best time save). In games that don't have TAS tools people at least try to do the next best thing with segmented speedruns. Creating a TAS is not an easy task, it requires great knowledge of the game (many times including its code) and its speedrunning, as well as a lot of patience and often collaboration with other TASers. TASes are made *offline* (not in real time), i.e. hours of work are required to program minutes or even seconds of the actual run. Many paths need to be planned and checked. Compared to RTAs, the focus switches from mechanical skills towards skillful mathematical analysis and planning. Besides this some technological prerequisites are necessary: the actual tools to assist with creation of the TAS. For many new [proprietary](proprietary.md) games it is extremely difficult to develop the necessary tools as their source code isn't available, their assembly is obscured and littered with "anti-cheating" malware. Many "[modern](modern.md)" (even [FOSS](foss.md)) games are additionally badly programmed and e.g. lacking a [deterministic](determinism.md) physics, which makes precise TASing almost impossible (as the traditional precise crafting of inputs requires deterministic behavior). The situation is better with old games that are played in [emulators](emulator.md) such as [DOS](dos.md) games ([Doom](doom.md) etc.) or games for consoles like [GameBoy](gameboy.md) -- [emulators](emulator.md) can give us a complete control over the environment, they allow to save and load the whole emulator state at any instant, we may slow the time down arbitrarily, rewind and script the inputs however we wish (an advanced technique includes e.g. [bruteforcing](brute_force.md): exhaustively checking all possible combinations of inputs over the following few frames to see which one produces the best time save). In games that don't have TAS tools people at least try to do the next best thing with segmented speedruns.
There also exists a term *tool assisted superplay* which is the same principle as TAS but basically with the intention of just flexing, without the goal of finishing the game fast (e.g. playing a [Doom](doom.md) level against hundreds of enemies without taking a single hit). There also exists a term *tool assisted superplay* which is the same principle as TAS but basically with the intention of just flexing, without the goal of finishing the game fast (e.g. playing a [Doom](doom.md) level against hundreds of enemies without taking a single hit).

View file

@ -54,6 +54,7 @@ Here are some [pro](pro.md) tips to git gud, impress your frens and generally ha
- Play drunk and/or high for a challenge. - Play drunk and/or high for a challenge.
- Change your name to ^6.̸̡͋̽̍̎͗̊͛̋̂̃̌͗͘^5.̸̨̧̯̙̞̟͙̖̞͈̬͙̞̖͎͉̽̿̇̔̂̎͗͌͆́̕͝͠͝͝ͅ^1.̷͕́͛̈́. { [RIP](rip.md) if your reader can't [Unicode](unicode.md) well :) ~drummyfish } - Change your name to ^6.̸̡͋̽̍̎͗̊͛̋̂̃̌͗͘^5.̸̨̧̯̙̞̟͙̖̞͈̬͙̞̖͎͉̽̿̇̔̂̎͗͌͆́̕͝͠͝͝ͅ^1.̷͕́͛̈́. { [RIP](rip.md) if your reader can't [Unicode](unicode.md) well :) ~drummyfish }
- [Doom](doom.md) challenge: disable looking up and down with console. - [Doom](doom.md) challenge: disable looking up and down with console.
- If you're slow, [strafe](strafe_jumping.md) harder.
- Move to [Europe](europe.md) to actually enjoy the game with good ping. - Move to [Europe](europe.md) to actually enjoy the game with good ping.
- { My config is at https://codeberg.org/drummyfish/my_text_data/src/branch/master/configs/xonotic_config.cfg. ~drummyfish } - { My config is at https://codeberg.org/drummyfish/my_text_data/src/branch/master/configs/xonotic_config.cfg. ~drummyfish }
- Buy premium account for extra skins and [lootboxes](lootbox.md). Just kidding :) - Buy premium account for extra skins and [lootboxes](lootbox.md). Just kidding :)