Tuesday, 22 October 2019

Some performance test results on 3DO rendering

About 3 weeks ago, I got hooked by another senseless project on 3DO. It's not like a complete project rather than an experiment. Also my love for the game Daggerfall. I just had to see whether I can load the Daggerfall map data and have the player move around any place in the world of Daggerfall and if this is possible at a semi-decent framerate on 3DO. This project hasn't finished yet as I only have examples of me clicking on a map pixel and rendering the area from far enough and not from player's eye. Each quad I render in the above twitter link is around 164 square meters and I should be much closer and subdivide the geometry more to get the exact scale of Daggerfall.

That's a project I will continue soon, it just gave me the opportunity in the meanwhile to make some performance tests on the real machine and get some numbers I was curious to. One of these numbers, trying to reach the theoritical limit of how many polygons per second, was posted in my latest tweet. Of course when I use the CPU to transform the polygons (and maybe I can optimize or learn to use the alleged matrix hardware of the machine, if I find out how or maybe the math portfolio API utilizes it) a geometry of 2916 quads drops down to 5 frames per second. But when pressing a key, I make it skip calculating the next transformation, but keep sending the already transformed list of quads from the last frame again and again. This way, I am testing exclusively the limits of purely feeding the hardware with polygons, possibly mimicking the way the marketing of the old consoles would claim thousands or millions of polygons per second (numbers you would never see in a game, even if you divided them with 30 or 60 to get a rough number per 30 or 60fps). They never talk of the actual polygons you expect to see at games which will be way much less. But still, such test is a good idea of what to expect, if you were the god of optimizing, you'd know that you still wouldn't be able to get over these numbers or even half of them. Being conservative, maybe you would divide these numbers by 4 or 8 to get some rough idea of what could be a practical focus on the complexity of the scenes.

I was really curious about the whole thing and I am with pushing things and benchmarking on a real hardware. I did hit some of the theoritical maximums I've heard back in the past this way. You usually try to test the ideal conditions. Small polygons, flat untextured, I got a bit over 50fps, this is around 150000 per second, which is an exact number I kept hearing around the internet. With textures (and small ones, 8*8, size really matters) I dropped to 90000 (I might have heard this number somewhere too). It's not over, I want to do a more robust test. I realized that a small percentage of the polygons (but maybe 5-10%) might be hiding a bit outside the screen and I have hardware clipping enabled, while others might be sided in the back and the CW/CCW settings might have discard rendering another small percentage. I'll prepare a more robust test where I subdivide a 2d screens into more more detailed grid, looking always straight at the player like 2d sprites. That's a next test I want to do. And I will do it in a way that will test both high poly throughput and pure fill rate in the lowres.

But that's not why I opened this post. I did some more tests I didn't posted that have to do with the fillrate exclusively. I also tried some new methods of scrolling the big 2D map more efficiently. Before the 3d rendering, I had to load the lowres map (1000*500 pixels) which later was subdivided to 5*5 subpixels (making it 5000*2500, but those subpixels would have to be streamed from CD every time I click a pixel on the lowres 2D map). And I would scroll it around so that the player can chose a pixel to display in 3D (it really was chosing an area of 3*3 such pixels, subdivided to 14*14 quads (a grid line consists of 3*5 vertices, but you have to subtract one, as they fit 14 quads), that's for the simple tests, but of course for the 2916 quads test, it was 11*11 and 54*54 quads). And even the scrolling of this big bitmap became a problem of performance the brute force I was doing it at first. It wasn't bad but it was lacking the full 50-60fps (I get 50 on my PAL 3DO here).

Simply put, I had created a CEL with size 1000*500 16bit pixels (and that's near the limit as from what I've read in the docs, the maximum texture width or height the GPU can accept has to be 1024). The regular screen is a fraction of this, 320*240*16bpp. So, I would simply render this as a sprite (with my code that you define a sprite object with position, zooming, rotation (although we don't need the last two) and prepares a CEL object with the necessary vectors to display it) and let the hardware manage when the majority of the CEL is outside the screen.

There is another interesting bottleneck of the 3DO, the fact that CELs will not be very efficiently clipped against the screen the way a modern GPU would do it. First of all, a trap is that when you start a new 3DO project, by default the superclipping (as it's called) of the GPU is disabled. And while CELs are carrying flags where by changing bits you can enable or disable various things, and two flags for clipping (CEL clipping and line clipping) are available, in my first test I would enable this and nothing would change in the performance. This is a fact I knew way before doing this experiment, in an old code where I would zoom some 3D stars (really 2D billboards) and when some of them were getting very closed but maybe outside the frame so it wasn't obvious, I would get enormous frame drops. I found out that you don't only have to enable the two super clipping functions in the flags of every of your CELs (every sprite is one CEL object). But you first have to remember when you init the BitmapItems of your videobuffer at the beginning of your code, to set some CEL engine controls, for example enabling the superclipping functionality for all by calling SetCEControl(BitmapItems[i], 0xffffffff, ASCALL);

Now, if you didn't do that, then my scrolling map of 1000*500 with enormous amounts going out of the screen would be slow as hell. And that wasn't the case. But still, something was off. And I knew the reason way before too. When I start my test, with the position nailed at the upper left of the map (this means that most of the out of bounds texture will extend out of the screen on the right side and under) I got over 50fps (when disabling the vsync it hit 60). But when scrolling the map to the very right I got 25. When scrolling down to reach the lower right corner (so most of my bitmap would be outside the screen on the left and upper sides) I got 33. I understand right now the 25 but still a bit puzzled with the 33 (because of my understand on how it works and how I provide the vector directions for this sprite, I would expect 25 and 33 to be reversed, but anyway this needs more investigation). And the reason is that the GPU clipping is not just deciding to find geometrically a smaller subquad region where to start rendering, but it walks a horizontal rasterizer for every line (or maybe builds a grid) and every time it decides whether it should stop rendering preemptively. For example, if I render a horizontal scanline of the texture from X=0 to 1000 with the direction to the right, every time I'd check I am still the framebuffer, and when I am over 319 I'd say "Since my direction vector is pointing to the right and my current position is already outside of the framebuffer in the right side, there is no reason to continue, so let's skip and go to the next line". But if I was rendering from -680 to 319, every time I was on the left side outside the framebuffer, I would say "Yes, it might be possible that I am outside for a lot of pixel, but since my direction goes to the right I can't predict if I ever hit the framebuffer, so I am not allowed to stop.". Your scanline could be from -1000 to -1 for all I know but it would waste time, since the GPU wouldn't geometrically calculate bounds and skip before from what I understand so far. There might be partial clipping (that will still be faster than no clipping at all) and no rendering outside but still going through a process that could be avoided by finding the smaller region that fits. My understanding comes from the CEL Clipping section on this link.

But in my latest version of my project I thought of a much better and easier way, where you can make a CEL only read and render a specified region of a much bigger texture. There are two numbers for the horizontal width in some of the flags of a CEL. These are set in some flags called Preamble. One of the numbers (or really certain bits on the flags) is the exact number of pixels of a CEL bitmap line (I set this to 320 instead of the original 1000). The other number also affects the width and is how many words minus 2 to skip in the bitmap data to reach the next line. So, I could set this to correspond to 1000 pixels (500-2 = 498, since pixels are 16bit=2bytes, 1000 shorts(16bit) are 500 longs(32bit)). It's a bit complicated and has bit fidling and reading the manuals till you get it. And now I render 320*240 pixels from the big bitmap and never outside. But of course there are more problems like how do you scroll? You change the bitmap start address. But this is dword(32bit) aligned. So in 16bpp texture, you'd scroll every 2 pixels horizontally, but vertically you can have smooth scroll at least. However, combining some other flags of CEL like the SKIPX (I learned this from the original Doom 3DO column rendering code) you can offset by pixel (you have to self correct by reducing the texture width between 320 and 219 with a module over the offset X) and combining all these you achieve pixel perfect scrolling (or region selection of an exact 320*240 subtexture rendered over the 320*240 screen).

So, anyway I achieved this, and here is where I started some more performance test I was curious of. What are the limitations of the fillrate on this machine? What to expect for 2D games? It seems kinda not that fast, but not so bad either and with more optimizations and careful selection you could achieve a lot. So what are some results?

In this one, I had the perfect simple test of exactly reading 320*240*16bpp bitmap and rendering back to 320*200*16bpp screen. One fullscreen read and one fullscreen write. I would get 85fps overall (regardless where I scrolled the texture, no variance as there is no supercliping needed anymore). It's over the target fps (being 50 ot 60) if we want to vsync for perfect smooth syncing. That's good. But of course if we had some heavy layers parallax 2d game, maybe things would become problematic. But is it?

Usually the 2nd/3rd parallax layers won't be fullscreen pixels, they will have transparnet gaps in the majority of the bitmap and that is greatly optimized with 3DO. So, if you don't do stupid things and you optimize it in terms of graphics design you can achieve way more. Secondly, my texture is 16bit but as I realized there is more to be gained by designing your graphics to fit in 8bit or less. a CEL texture can be 1, 2, 4, 6, 8 or 16 bits. So, I tried the same experiment with different bit depth. I tested 8bit-16bit Uncoded (these are the pure RGB) and 4bit-6bit-8bit Coded (this is how the 3DO manuals and API call the texture formats based on an indexed palette). Here are my results.

  • 16bit - 85fps
  • 8bit - 113fps
  • 6bit - 129fps
  • 4bit - 148fps
It's not exactly linear (but you could plot a line that fits) as the 8bit are not twice than 16bit, but it's also that we have the heavier rendering to the 16bit videoram. I could say if I can make a simple equation to predict as I learn more from my tests. Another thing, there is no difference between the Coded (paletized) and Uncoded 8bit versions here (both at 113fps really), but I read somewhere in the manual Coded might be preferred in cases where you have transparent pixels (index color 0 instead of being a solid color, to skip rendering, maybe easier to check than RGB 0,0,0 (which does get transparent indeed) ?). There is more really to see in the future for optimization, there is even a texture format with RLE compression which I guess could vastly skip big transparent lines of pixels. So it really depends what kind of texture formats you use and you have to be strategic between lowering your color depth as much as your art doesn't look too bad.

Another thing. I wanted to try pure rendering and very little texture reading. The original test would read exactly 320*240*16bpp data and write back the same amount of data. What if I fed a very tiny texture 4*4*16bpp and scale it up (so that it's not 4*4 pixels on screen, but fit to screen). This will mostly measure pure writing to vram performance with minimal loss from texture reading. And that's what I tried. The result was 239fps!

And another test. Did you know that there is not one but to CEL engines in the GPU. There are two parallel processors in other words and from some reading I did and later experiments, it seems that the rendering is split between the odd and even scanlines of the texture bitmap. CEL engine 1 will take care of bitmap lines 0, 2, 4, 8, etc and CEL engine 2 will work on 1, 3, 5, 7, etc. There is a flag in the CEL that will tell it whether each CEL engine waits for the other to finish it's work or let them work independently. There is also another flag that will disable and only have one of the two do the whole work. Thankfully, in contrast to the superclipping, this two parallel engines feature is by default enabled when you create cels by calling the API function (but if you were to feed the bits on your own, you'd have to not forget it) so it's harder to be dumbed and underperform because the high level API didn't do it for you.

The 4*4 texture rendered to the screen, went from 239fps to 133fps if I disable one of the two CEL engines. In the regular tests (16, 8, 6, 4bit), I got the numbers 60, 82, 90 and 99fps. Another weird thing. As I enabled the dual CEL engines back in my code, I suddenly got slightly better fps. I got 89, 129, 143 and 163fps. That's a bit significant. But why? Here is the kicker. I enabled the flag that actually tells "lock the two corner engines together". But wait? The default for this was to let them operate independently. Which would make me think, if one finishes (one of it's scanlines I assume), it doesn't wait for the other. I would expect a slightly increase but not decrease by not locking them together. But what do I know about how the hardware works deeply? And does it work differently for smaller sizes of polygons or other conditions? This needs more investigation. (You can have a look btw of some of these CEL flags here)

I finally tested the DMA. Another part of the hardware is called SPORT. And this is what I use currently to erase the vram each frame with a background color. At some point I thought what if this takes time, as in my default framework I always erased the frame with this transfer, before rendering anything, and here I had a daggerfall map erasing it every time for me, so maybe it was unnecessary. It could be eating part of the framerate too for all I know. But no! It's a useful free for performance function. I tested only calling that one (totally disabled rendering the daggerfall map, just let this one clean the screen). I got 1198fps! Then, I removed that one too (nothing else is rendered except my tiny fps counter) and I got 1593fps. Keeping it or out when rendering the daggermap, wouldn't affect the 85fps of course (sometimes jumps between 84 and 85 but does it anyway). So, if you want to clean the screen before next rendering, don't do it like I did before by rendering a big black CEL on the screen, but use the SPORT DMA instead.

One final thing, if I understood well (and I need to write code and test it), the SPORT can be used for one more thing. You can render a static background from another buffer to the vram. So, instead of just cleaning fast with single color, you can clean with a static background that doesn't move. You could had for example a nice picture of space galaxies and nebulas or whatever which wouldn't scroll. But it would be your static background layer and then you can add parallax in front. You can't scroll if I understand well, but you can blit either a color or a full screen 16bit static image. The second one, I don't know how fast it will be (maybe because it's SPORT DMA it will be also something for free you can use instead of a fitting Quad CEL which would waste a lot). I'll definitely test in the future.

If one combines all these things (and even more possibly I could find) cleverly, you have a great power at your hands, could possibly have good 2d parallax layers and many sprites, sometimes zoom/rotate, as long as you know the hardware and are clever with the limitations and your art. But of course it's also very easy to screw up if you bruteforce things and don't thing about it. Which would happen in modern hardware where it's so easy to just not think about it, and sometimes will lead to very retroish indies still underperform in my modern rig. No matter how fast the system, you can always fall into traps. In 3DO is more interesting because it's too easy and yet there are great functionality and cool work arounds to get that sweet full frame rate.

p.s. Not related but I bought a 3DO mouse. Someone gave me the idea if I could support this in OptiDoom, while I didn't even know this thing existed. That would be fun and quite easy to try I think at least!

p.p.s. I forgot to mention another very interesting thing. When I was doing my STNICCC demo and in the last versions converted it to a benchmark, I noticed that some tests between textured and untextured big polygon, the untextured polygons had slightly worse speed than the textured with very small texture sizes. I was like, how is it possible? The reason was that both parallel CEL processors would need more than one bitmap row to cooperate on the job. The original CEL values on the flat rendering (as taken from Doom) from what I understand they make a 1*1 texture size (but maybe also put certain flags not sure and have to investigate, because later I need to give null pointer to source and the 16bit color to the palete pointer, weird) and that will not be halfed between the two processors. By making a single color texture on a tiny texture (e.g. 4*4 or even 1*2 would work) you force the processors to really split the job in half for big untextured single color polygons. This is why my present test uses a 4*4 (also 4*16bit is 8 bytes, minimal size for texture width in the flags and I have good reasons to have n*n texture and not n*m although not useful in this test but it doesn't matter, results wouldn't change, but something else I discovered that makes me prefer n*n some times, I will talk in the future)

Monday, 26 August 2019

Random thoughts on Ion Fury controversy and the cultural wars

I was planning to say something about the controversies behind the game Ion Fury since few days ago. Something was always holding me back, maybe the fact that while it's sparked by reading some random thing on twitter that suddenly makes me eager to reply, I then delete my sentence, realising that the medium is not good enough to expand. Another reason is that while I have an impulse to share my thoughts, I am having a fear that while some people may agree with some of the things I have to say, several other people I otherwise follow and respect their work might dislike me, being totally aware of how deeply we are into the cultural wars. Maybe it's a silly thought, maybe people already know where I stand as one can see check which people I follow and which comments I sometimes like on twitter and easily put me in a box. So, I may as well just open up and be honest with how I feel about these issues.

I've already expressed my disappointment in a tweet, that while this year there has been a great revival for the neglected genre of oldschool FPS (the way they used to do them or I prefer them, in terms of level design, not retro just in the attitude or rogue like maps) with indie games like Dusk, Amid Evil and the aforementioned Ion Fury (previously Ion Maiden), the cultural wars (and I used the h(e)ated term SJW) have disrupted these good moments. A controversy that started in the discussion forum ResetEra, based on what people said on the discord server of the game and later finding some "problematic" artwork in the game, which escalated in people calling out the developers for being homophobic, resulted in the company issuing a statement of apology and a decision to remove few assets, which again resulted in several gamers review bombing or refunding the game in Steam.

Whatever I believe about this controversy, I haven't written a negative review or refunded the game (but already had way over 2 hours so maybe it would be impossible, yet I am not a fan of these tactics) and for the first two days I didn't want to play it. I lost my appetite because of how mixed feelings I had, from one kinda agreeing with the frustration of all these gamers (and I'll explain why), from the other hand because the game is fucking brilliant in both gameplay, level design and art, and the developers simply don't deserve such a treatment after such a hard work. I started playing it for the next few days (even before the recent crazy flip of the developers to say nope for a second time to the original ResetEra outrage and side with the frustrated gamers) and I am always amazed every time I play a bit more of it. It's a shame that these cultural wars have invaded in all the media we love and we find people hating each others guts, people being fired from their job or conventions, not enjoying our hobby, can't do without some new controversy for every single game we love.

Just go read btw Sophia's Narwitz article that expands in more detail as I didn't https://medium.com/@sophnar0747/ion-furore-19b2aa371c6b

I only now want to respond to few more random things I read on twitter as they pop in my mind, and I just wasn't feeling the medium was good enough.

Homophobia. The controversy was that in some of the levels there is a bottle of shampoo of the brand Olay but written as Ogay instead. If you have played games based on the Build Engine (like Duke 3D, Shadow Warriors and Blood, the holy trinity) you will notice there are a lot of posters with parodies and references to memes and pop culture. This was a pun on the soap brand. Maybe,. it would be ok if people argued that this can be insensitive to few people (but several homosexuals at the same time weren't offended, so who is speaking about whom here?). Maybe then I would understand, especially if this was expressed on a calm manner, not calling everyone homophobic and things like this hate speech.

The matter of the thing is intent. Did the artists who drew this truly hate gay people? Isn't that just a pun, and while it can be deemed insensitive or an immature joke, can you argue that some artist wakes up in the morning thinking "You know what? I am gonna make another gay joke because I fucking hate these people!". Do you think that everybody who makes such jokes think like this all the time?

And here is another point I want to discuss. Phobias. Isms. There are certain people (like certain people on the ResetEra forums) that engage in a kind of conversation where their modus operandi is to call everyone all these words. These words I have come to understand are heavy emotionally loaded. They dominate the conversation from one side of the cultural wars. And they do have this power, nobody wants to be called a racist, a sexist, a homophobe, a transphobe. It is the equivalent of calling one a scumbag. And they know it! They know that all it gets is to throw these words, to stick an accusation to somebody, it terrifies people. It can result in someone losing his job, big companies making PR statements out of fear of looking bad, which however results in enabling this kind of outrage mob culture, that some people might find right or progressive while another big portion of the gaming population finds appalling and forceful.

The whole conversation is calling someone a phobe or ist, because a third person might read and get an instant emotion of disgust "OMG, That person is a HORRIBLE BIGGOT!". That's what you get with these words. These words are weaponized to make people and institutions look bad. I tell you, I bet that 95% of people called all these things, absolutely not hate LGBT, not hate women (everybody loves women, both men and women), not hate other races. People might sometimes say insensitive things (and we only care about certain protected groups, what about the insensitive things thrown every day at people these kind of ideologies deem as privileged?) but at least the reason for the majority is not that they are truly hating other groups of people, but can be from saying something without the intention of harming or starting a honest discussion (for example the question whether four years old should transition can be a legit concern or subject of discussion for someone on one side of the cultural wars, but a sign of transphobia or far right propaganda to the opposite side, another thing that was brought in discord) to reactionaries and trolls knowing certain jokes are gonna piss certain people.

And that's another thing we are unfortunately into, reaction breeds more reaction, the more the one side (that is called SJW from the other side) react with outrage on every little innocent thing, trying to fire people from their job, doxxing their info, throwing all the accusation even if the intention is not necessary there, the more the other side realizes that there is a good reason to be reactionary to all this political nonsense. The more this reactionary thing grows into a counter-culture, the more the other side believes we are dominated by alt right and everybody hates us. And I don't see any solution, I am a pessimist here. It's all magnified by social media and sometimes I feel like I am a part of it too. Even if I am not too vocal, but mostly following and gives likes to people from one side, that the other side may describe as haters, alt-right, scumbags and all the other phobias and isms.

I need to say that too, because I've seen another instance on ResetEra discussing the discord incident. They found that one of the developer who wrote transphobic things is also following specific accounts. Like SJW-Nonsense or Christina Hoff Sommers (who defended gamergaters back in time). SO,. according to their views, this guy is a hater and scumbag like these people he follows.

You know what? I follow the same people. I follow more crazy people. I am pro gamergate. I follow MRAs, anti-feminists. I am a big fan of Honey Badger Radio (I am even the author of this shader). I believe strongly in what they are doing. I am sympathetic to incels, I find some of the things MGTOWs say interesting, I don't have a dislike for most of them (and you can throw me examples of what horrible things someone said somewhere, then I can throw you examples of what horrible things feminists and other people re/tweeted or liked). What does that make me? Am I horrible biggot? Am I scumbag? I don't feel like any of these. Maybe an enabler? A part of the problem?

This is my attempt to open up and stop being afraid. But also to give some perspective. That I might follow certain people and believe certain things but I am a regular person as you without an axe to grind. However one side might see anyone like me with a very negative eye, while the opposite side of the cultural wars might see these accusers as woke lunatics. You might think right now "How can he not see his privilege? Why is he supporting bigots and haters? What's wrong with these people?". The other side might reflect back to you "How can they not understand? How has tolerance turned into this insane authoritarianism? These are supposed to be clever people, how can they not see the problem with identity politics here?"

There are different reasons why we are all here. I have my own reasons or inclinations that somehow made me dislike the left identity politics while being attracted to it's opposition. You might have your own reasons and motivation that led you to be militant on the other side. You get triggered by certain words like SJWs and views like criticism against feminism for example. I might be triggered by certain phrases like mansplaining, toxic masculinity and learn to notice what we call virtue signalling (which is another trigger for you, which you made another term called dog whistling or something, which will trigger me to think "Oh,. those people again!"). We have to understand that we are in these cultural wars (I may overuse this word) and it's not like you and the rest of the world is right and there are few toxic haters you have to fight, and it's not like we are the right side of history and there are these outrage culture we have to fight. But what are we doing? Why can I not check the twitter of some creative and intelligent people from gamedev/demoscene I otherwise admire, and not feel a strong like or dislike depending on their bios statements (gender pronouns irk me but not because I am hating any group, but because I know they have become a political statement of that other group).

We both get self-righteous and sometimes I wonder why am I here? How did things have come to this? Because personally, I was very very apolitical compared to all my peers (and most of my friends were left leaning yet not familiar to identity politics). And I was really a live and let live person just listening people get opinionated about classic politics but not taking strong sides. I was mostly very unbiased, very living in my own world (and that's why I decided to declare in my twitter that coder is my only identity even though I wonder whether that's true now). And with gamergate I was just an observer, but then I leaned towards something. Maybe if I had a different brain, different past, different inclinations, maybe I would have sided against gamergate. I would have become woke as they say. Just think of that. You could have a different personality, with different characteristics. You think that you are righteous and you know what's good, but given a different state of being, you could have evolved into the very thing you hate right now. And so could I.

As a final note, I do want to mention that gamer has also become a stronger identity now, let's be honest to ourselves, it became stronger after the gamergate controversy. Review bombing a game seems also like mob mentality (but one could say it's the right of the consumer, we don't try to fire people from jobs or doxx at least, however it's very easy to create gamer outrage by pointing out something even insignificant). Maybe reactions from the left create more reactionaries in the right (or those still leaning left but disagreeing with certain ideas). I say it every day. Continue red-pilling people. When I see some woke news that makes me angry, I just say that to myself. Maybe things are meant to be like that and actions breeds reactions and there is nothing we can do because all opposing groups are part of the problem. Or maybe that's where history leads and there is no point of worrying. Sometimes I am a pessimist, sometimes I believe in certain things, maybe truth will liberate us all or things will come into a closure anyway and things will be ok. Maybe we will learn something out of this mess. Or maybe I should close social media and get out..

I think I should close here, not being very satisfied by the random order of thoughts here, that expanded from the game and some criticism to exposing myself. Let it be for now.

p.s. I don't care about censorship of a little sprite personally. The game is still great without a little sprite (and a hidden text you need to noclip). From my side of things, I cared of not letting the mob mentality of the ResetEra people and others to dictate companies what they should and should not say. It might be kinda hypocritical from my side you'd say when they finally succumbed to the gamers review bombing. But you know what? These are their customers, they were in a bad position and they had to chose and I think they made the right choice, and I am more sympathetic to gamers who care about games than people trying to find everything problematic and chase down and shame the developers, yet this is like a sport to them and some of them wouldn't even bother to play the game. I know that because we are divided, some people will think they made the wrong choice and the right choice was the apology. Well, as I said, every opposing group thinks they are in the right side of history. I respect they have a different strong opinion and I will also take the liberty expressing mine.

Wednesday, 31 July 2019

Video games and bullying

I decided to open this post after reading and liking a specific tweet by Mark Kern. I have to admit that clicking a like was more of a knee jerk reaction, but giving it some thought later after I logged off from social media, I realised that there is a conflict in my mind with the idea that gaming, computers or other special interests were simply the main reason of why people got bullied in the past. Of course I still stand with my like as it has more to do with an objection to the cultural attitudes (I will expand later on this) rather than source of bullying, but I still have to expand on this and twitter is the worst media for that.

How I perceive the subject is of course informed by my own experiences of being bullied, so I want to say here that I might be ignorant on how big of a role someone else's focus on special interests played on that. Maybe a lot of the gamers replying on Mark's tweet were primarily targeted because of their hobbies and I just am not aware of it. But maybe there is more to it that we rarely see, while the gamer identity is just a distraction. In my case, I don't remember ever being bullied for my special interests exclusively, however at the time I wasn't very open about these things yet, as I was still trying to find myself, didn't have some kind of identity, wasn't expressing my obsession with one specific interest to make me visible for that. I always wondered why I was the target through my school years, even when I change schools and I thought it's a new start and it might be better this time. I think in my case it had to do with how more shy, reserved, neurotic, sensitive I was compared to my male peers. In every schoolyard, bullies will look for the weakest person. Because of my characteristics, I was simply the most obvious target.

It was only much later, from my 17 or a bit later when I went to the university, when I started finding myself and creating an identity. As my self-esteem had suffered enough from bullying and other things (now I believe, the higher neuroticism alone is enough to do this), also not feeling very confident or interested in the social life, I got highly obsessed with the idea of becoming a great coder, maybe as a panacea to cure my self-esteem, stop feeling worthless in life. I did have some natural inclination to mathematics and science of course and already got a bit of a taste through Basic programming in the family computer, the Amstrad CPC 6128. I didn't evolve too much then though, because of studying for school, exams to pass to the university, very restrictive parenting and all that. I rarely talked about computers in school, it was only at my university years that I talked obsessively to anyone about my special interest. So, that can be a reason why I can't personally identify that I was bullied in school because of computers, but only for the other reasons I mentioned.

Again, I don't doubt that for others gaming or other geeky interests could be the reason for being bullied. But I think that it's deeper than that. Do you believe that a person who would happen to have all the good characteristics, be more confident, strong and extroverted, yet happens to like video games would still be bullied for that? In fact, I do remember some of my classmates, few who bullied me and others that simply left me alone yet didn't receive the same bullying, discuss video games some times, not in a negative way. They caught me by surprise, one of my bullies even asked me "How come you never talk about video games? Don't you have any interests?" and then mentioned how much he loved this new game Wolfenstein 3D (which I hadn't played then, since I only had my Amstrad CPC), but because I was too slow and awkard to reply and the conversation changed hands, they never learned that day that I am familiar with video games too. Again, I was too shy, awkward, slow to respond, silent, an easy target for bullying. Even my bullies were into videogames (but maybe not too obsessed at least). There wasn't any negativity from my peers against gaming (but there was one on the media and from older people).

Why then all the nerd stereotypes? Why all the virgin neckbeard loser insults? Why is the bullying perceived to be more frequent against gamers? Is there something in video games that attract more people with weird personal characteristics, more shy and sensitive people, introverts, loners, also more autistic individuals? I can't put my finger on what that is, could be escapism, could be that regular people were too busy with the popular culture of the time, or simply some of the personal characteristics that will make you a target will also make you more passionate or obsessed with niche interests. And that means, many disenfranchised young people will have a gaming history. And only when gaming became mainstream and attracted the normies, only then we have seen all kinds of people, even several girls, join the rank. Now at first that sounds good, to have more people, even some girls who understand your hobby (my personal experience since my childhood till today was that most girls would primarily not be interested or be snob against the hobby, however males would be more positive and few of them really into it). But it leads to the situation that the most weird and awkward individuals would feel ostracised from the community they initially started as a way to escape or find similarly minded people who might have also suffered from bullying and low-self esteem. Especially if few of the normies who just found the hobby they would snob and ridicule back in the times, now want to have control and patronise them how the community should behave from now on. They would easily use the fact that those old gamers lacked social skills, were awkward and awful and they have to be corrected or go away. It's an insult to injury. The sentiment (to which is why I keep my like to Mark Kern's tweet) is better explained in some of these articles (here, here and here).

I think that special interests attracted certain kind of individuals with personal characteristics that would make them easily a target for bullies and not just because of their obsession with the hobby. Since individuals who happen to feel similarly about their social low status and lack of self-esteem, also happen to frequent more in these gaming spaces, the conclusion would be that gamers who are passionate about their hobby are all the same disenfranchised people who were bullied and maybe a certain identity might have been formed that us geeks are the ones who have been targeted because of our special interests. It doesn't help of course that there was something perpetuated in the culture about geeks being those socially awkward males who can't get laid, we had movies back in the 80s, 90s perpetuating the stereotype, maybe the whole hysteria in the media that computers and gaming will take away your social skills, make your more depressed, etc. While it could be the opposite effect that individuals with personal characteristics that make them not thrive in social life or the target of bullying, made them also be attracted to special interests of any kind. Of course that can be a vicious circle, a feedback loop where stereotypes fed into, creating identities, first the words 'geek', 'nerd' or 'dork' among others, used as a mockery by the culture and then taken and reversed as a proud title amongst the afflicted.

And it ironically takes an inverted loop to the beginning from "gamers are bullied" to simply "I bully you because you are simply a loser" if you look at some of the reactions on twitter to Mark's post, like joking about "shoving you in the locker", "you weren't bullied because of gaming, but because you are a loser" or simply have a look at this conclusion on the classic meme here (not advocated by the twitter poster btw, he is frustrated about that too as I am). See, people are not afraid to punch down the already disenfranchised, it's so easy to say shit about the people who were already bullied these days. Like "you deserve it for all the bullying, it was all your fault you idiot". But at the end of the day, some of us who happen to also like video games or coding or any other special interest, also had trouble at school with our peers, lack of self-esteem, high neuroticism, maybe too self-conscious that it hurts. We thought that we united under the gamer identity but some of the bullies are also gamers. There is one common thing. Nobody likes "losers". They are the most easy to punch down and the rest of society to agree that maybe there is a good reason they got punished. Maybe it's human nature. I made my peace with this depressive reality. Or maybe that reality might teach us to recognise it and have some empathy.

Being bullied just because we are gamers might be noise.

Wednesday, 25 July 2018

Tired. Next plans.

Long time to write here, have been skipping the last three Wednesdays, being very tired to do much, maybe still being in remission for few weeks. I lost my motivation, still fighting with it, I am excited for all the creative ideas I want to work on, but can't help it but feeling I always need to pressure myself. Nothing extraordinary, I am just too lazy to even do the basics. But maybe I need to relax for a long period now.

I don't even structuring well what I am trying to say. Anyway,. one thing I was planning has fallen back, to release my 4th youtube video. Something will have to change though, because I can't just focus on videos, even though I am excited about the idea but feel unmotivated in practice.

I will be on holidays in end of July, beginning of August and there is lot's of things in plan as I come back (even some real life nuisances) so I am really into thinking of just resting, doing things only when I feel like and get out of the Habitica mode for a while (doesn't work longterm). I do wonder how to fit some productivity in few of the days at least, will try to finish the 4th video inside August/September, decide how to proceed with Doom 3DO and then anything else 3rd party, random retro coding or other. I was normally planning to start my second secret grand plan but this will go away, hopefully I'll start by the end of the year. Maybe I'll just quit and start playing No Man's Sky Next for the incoming months :P

Nope, I know some of the lazy days I'd wish I could go back into creating stuff, I can't totally quit with gaming. It's just that I am still trying to find out how to drive this in a way that I can be content.

Thursday, 5 July 2018

More CPC stuff, but what's next?

It's time to write more news here from time to time (must have missed the last one, my motivation is dropping again for anything).

I diverted at the time with CPC coding. Which is inspiring after a long time. Fiddled with enough z80 assembly, trying to finish an intro for ReSeT CPC competition, not sure where going with that, but since I didn't have time for 4k, it ended into something smaller. I like the result although not sure how good it is for 1k. It looks more plain and stationary, however I like the effect. It was my attempt to rotate some 3d axes in order to use them for 3d objects on a grid, however time was short and what you see here is rotation of more than one 3d axes together, offsetted at different angles.

Later on, I was working a bit more on the Wolfenstein CPC, still haven't debugged the new method for raycasting, however it's closer to the one skipping rays, as I added a nice fraps FPS counter that now tells me, even the old good one was only 6-8fps, while I hope to achieve 10-12fps when making this one work. And maybe I'll rewrite parts of it in assembly for even more.

Not sure however when I'll go back to CPC, as I started the project I had left, trying to start working on my 4th tech video, this time about the CEL rendering of 3DO. I do hope to finish it by end of July, else I'll have my holidays on August and it will be delayed. But I don't want to rush and do a half job for this one. It will be more interesting than the others, showing/explaining the peculiar "quad" rasterizer of 3DO (which btw gave me an idea for a 3DO game or demo with special style, I am very excited about), the performance bottlenecks depending on texture size and maybe more, but I'd like to carefully explain things this time, cover them as I imagine would make for a great explanation.

I even thought of my 5th video I want to finish till December, on a different subject, but very interesting explanation on triangle vs quad affine mapping, things I noticed and my visual way to explain. There might be a period on August/September where I will stay off though and focus on other things without deadlines, real life or just relax.

I am tackling in my head with many plans I want to fill, maybe a bit of releasing my first 3DO Doom port, which I forgot, some other things I want to try on CPC, but how to plan all in my time so that not everything goes back and forgotten as usually.

Or I just want to relax for a bit. Once I relax, a fire burns for more coding and crazy stuff I wanna try. I can't even play a game these days, without somehow feeling that I'd rather spend that time in more creative endeavours. Which is good I guess that I cannot simply succumb to the laziness of gaming for long periods, but when I try to start working on those endeavours, I feel the struggle of procrastination again.

Ok, not sure the next week I'll be writing something here, but only from time to time..

Thursday, 21 June 2018

Adding more to the list, diverting.

There are few elements to the flow of my current projects.
I've totally forgotten my plans to work on my 4th youtube video (which I have to really get back to).
The last few days I have been very slow, started maybe getting tired or for other reasons. (maybe I need another pause).
I added a new project to my list. I was inspired between nostalgically rewatching a lot of old CPC demos and checking at ReSeT demoparty. Decided to start working on a tiny intro, maybe 1k.
Almost hasn't started. I had an idea of what effect I will do, then changing my mind the following days, but almost not even starting by clearing up the framework since my last Voxel1k. Hmm,. it seems like I have almost 4 years to do anything on CPC.

Anyway, so I guess I have to focus a bit on this as I registered on the site. Can't escape now, must make intro :)

And then I may be able to come back again to what's left. I need to be able to finish my 4th video before the end of July. And then what else? I will try to finish with the Doom 3DO ISO. Which I could already publish if I wanted, but I'll be giving it time as to develop few more things and see if I can optimize more before the first release.

There was a little project since last Wednesday in the CPC wolfenstein project too. I managed to replace the old raycasting algorithm with a better approach inspired by this paper. Almost, as there are some serious artifacts, mostly few bugs I have to solve. But it's ready in place, when the last bugs are found I can test and see if 1) it really alleviates the usual bugs in the corners of the wall blocks, 2) how much the speed improves (right now, I realized I do half the muls per ray, and also the algorithm is simpler for the compiler and for rewriting in assembly). I was also thinking of adding a timer during interrupts to coarsly compare speed (even though there is a tedious way in the debugger of winape32 to do this) or display fps. Not sure when I'll do this.

Wednesday, 13 June 2018

More things going on, slowly.

I am working on things here and there. Mainly the Doom 3DO port, although I'd like to start with my 4th youtube video too. I could release an ISO or binary and instructions soon, not sure, the main menu features are one, however I might still get more into and try to optimize few things.

Then I also started experimenting with some additional features, like thick map lines (almost pseudo-antialias, using the GPU but drawing a thick darker line and a thin brighter above, surprsingly works but more like cartoonish lines :) and a hack I am currently trying to make work that could possibly be used for water movement. I want to add more to the rendering, from alpha blended projectiles and maybe emitting particles to replacement for the sky (3d stars, maybe skybox, etc) but mostly experimental as I have fun and dreaming of how it could be enhanced. I know, I should be focusing on optimizing the engine first. Anyway, might post previews soon.

One thing I was trying too, is to see if I can compile Doom 3DO using gcc. But the original 3DO libs are binaries in another format, so there are linking conflicts. Would take some effort to do that so I left it. I thought as a more optimizing compiler than the old armcc, we'd have a chance for speed improvements even from inception.

Today, I remembered about my wolfenstein CPC. I first read about a better way to raycast that can solve some bugs and maybe be slightly better but surely sorter code that could make it easier to port to assembly. Then I went back to the old project, fought my time with codeblocks setup and sdcc to make it work (something got changed in my compiler settings and other shit). That's why I got frustrated as I lost time and did less that I wanted today. So many things to even do on that old engine. There are bugs to fix, for some reason I think the latest SDCC creates wrong z80 code but not sure, I need to check a lot of things to make sure it's not blowing up. I also prepared some code place to try the newer raycast way, who knows when now :P

I get these sudden inspirations, sometimes at work, sometimes on the road, I think of some effect or sudden idea and I want to go back at home to work with it (instead of my regular plans). Then, maybe when I am back it's too late and I lose motivation, or maybe I start working but something happens and disrupts me or something doesn't work on the compiler or other reasons. So, I hope I'll go back to the CPC engine as I was in the middle of things, but maybe not tomorrow as I have to focus on the 3DO Doom stuff and videos.

I also bought the domain and hosting for this new site: bugothecat.net
I will use it as a personal site and will also post the first release of Doom 3DO there.