Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "game theory"
-
In the spirit of true randomness, I like to speculate about aliens. What’s your favorite theory about them? Anything’s fair game: whether they actually exist, methods of propulsion, origins, exobiology, exopolitics, eyewitness reports by credible reporters (pilots, military, air traffic controllers, high-profile political leaders, etc.) whether abductions are real and, if so, why they do it, etc. If you’ve had an encounter, I’d love to hear about it.18
-
Buffer usage for simple file operation in python.
What the code "should" do, was using I think open or write a stream with a specific buffer size.
Buffer size should be specific, as it was a stream of a multiple gigabyte file over a direct interlink network connection.
Which should have speed things up tremendously, due to fewer syscalls and the machine having beefy resources for a large buffer.
So far the theory.
In practical, the devs made one very very very very very very very very stupid error.
They used dicts for configurations... With extremely bad naming.
configuration = {}
buffer_size = configuration.get("buffering", int(DEFAULT_BUFFERING))
You might immediately guess what has happened here.
DEFAULT_BUFFERING was set to true, evaluating to 1.
Yeah. Writing in 1 byte size chunks results in enormous speed deficiency, as the system is basically bombing itself with syscalls per nanoseconds.
Kinda obvious when you look at it in the raw pure form.
But I guess you can imagine how configuration actually looked....
Wild. Pretty wild. It was the main dict, hard coded, I think 200 entries plus and of course it looked like my toilet after having an spicy food evening and eating too much....
What's even worse is that none made the connection to the buffer size.
This simple and trivial thing entertained us for 2-3 weeks because *drumrolls please* none of the devs tested with large files.
So as usual there was the deployment and then "the sudden miraculous it works totally slow, must be admin / it fault" game.
At some time it landed then on my desk as pretty much everyone who had to deal with it was confused and angry, for understandable reasons (blame game).
It took me and the admin / devs then a few days to track it down, as we really started at the entirely wrong end of the problem, the network...
So much joy for such a stupid thing.18 -
So, I'm still not certain if it's actually a bug or merely my lack of experience, but I've been working on a 2D platformer game (using only C++ and SDL2) for roughly 2 years now (on and off; sometimes off for months) and I'm extremely embarrassed about this, but for the life of me, I cannot seem to get the player character's movement and collision physics working properly. It's driving me absolutely insane.
I've read articles and tutorials, referenced books, and posted about it in game development communities (e.g., gamedev.com, Discord servers, etc.), but even though the fundamental structure and explanations made sense, getting the code to work has been unsuccessful, albeit not completely so, but if I get one thing working, another thing breaks. It feels like I'm trying to repair a vase that fell off of a skyscraper and turned to dust on the street below.
I've always been a very tech savvy person with a fiery passion for programming, electronics and game/software/embedded/web development, but to be honest, having such a difficult time with things like this that — in theory, at least — seem like trivial bumps in the road have made me feel like I'm never going to be successful in this field. But regardless of the depressing thoughts of worthlessness, my passion doesn't let me stop trying. Who knows, maybe it'll have to remain just a hobby. 😕4 -
I know I haven't been responding to a lot of you lately. I've been busy helping neighbors and my community, doing MAAAAAATH, working on my car, and moving a shit ton of scrap and lumber.
I've been thinking about getting a motorcycle. Fuck, maybe I'm experiencing a midlife crisis, but early.
Been busy doing some design work as well for the game, and arrived at something that I'm satisfied with enough that I might demo it.
I'm also looking for a job, and I think I might give up programming as a career path and persue welding or trucking or something considering theres basically zero opportunities for it unless you went to college.
It's good to have hobbys anyway. And who wants to turn their hobby into a job right?
Anyway, thats whats been going on with me.
Completely unrelated, but heres a really fantastic introduction to the basics of type theory:
https://wscp.dev/posts/tech/...2 -
*leaning back in the story chair*
One night, a long time ago, I was playing computer games with my closest friends through the night. We would meet for a whole weekend extended through some holiday to excessively celebrate our collaborative and competitive gaming skills. In other words we would definitely kick our asses all the time. Laughing at each other for every kill we made and game we won. Crying for every kill received and game lost. A great fun that was.
Sleep level through the first 48 hours was around 0 hours. After some fresh air I thought it would be a very good idea to sit down, taking the time to eventually change all my accounts passwords including the password safe master password. Of course I also had to generate a new key file. You can't be too serious about security these days.
One additional 48 hours, including 13 hours of sleep, some good rounds Call of Duty, Counter Strike and Crashday plus an insane Star Wars Marathon in between later...
I woke up. A tiereing but fun weekend was over again. After I got the usual cereals for breakfast I set down to work on one of my theory magic decks. I opened the browser, navigated to the Web page and opened my password manager. I type in the password as usual.
Error: incorrect password.
I retry about 20 times. Each time getting more and more terrified.
WTF? Did I change my password or what?...
Fuck.
Ffuck fuck fuck FUCKK.
I've reset and now forgotten my master password. I completely lost memory of that moment. I'm screwed.
---
Disclaimer: sure it's in my brain, but it's still data right?
I remembered the situation but until today I can't remember which password I set.
Fun fact. I also could not remember the contents of episode 6 by the time we started the movie although I'd seen the movie about 10 - 15 times up to that point. Just brain afk. -
Im a software developer, and make games as hobby and sometimes as actual job. Recently I started looking into game design, through my work I can can do a study for free.
The main thing I would like to learn is Character development and using GDD's
Would you recommend doing such a course or is the quality of these things way to low to actually be of use?
Is there reading material I should read?
I do own a digital copy of "A theory of fun" already which Im gonna read the coming days.5 -
Holy shit man...
I know its supposed to be hard but I cant ignore how much I want to give up right now.
I've been learning JS for months now, doing daily algorithm challenges, going strong on my freecodecamp dev map and still, I feel like I might no be cut out for this.
It's been more than a week now trying to implement a minimax algorithm into my tic tac toe game. I can't, for the life of me its just getting more frustrating by the day and its driving me crazy! How the fuck am I supposed to ever get a junior webdev job if I can't do something as simple as this!, And I keep reading and reading the theory but I cant implement it into my code! It just makes me want to quit (again)!
I really need to work on my attitude...1 -
The overwhelming code smell when you finally got a chance to do a quarterly project-level code review as a team lead.
It's my fault for feeling like they are teaming up against me, and I don't know how to fix it.8 -
Don’t have much to do right before Xmas, so I started learning game theory. Jeez, it’s so easy to create dictatorship in voting🤔
-
Fun story
tl;dr; analog FTW!
so we've just had a nice game. A few teams internationally gathered together in the aws gameDay. We had aws accounts set up [one per team] and our goal was to maintain our t2.Micros to deal with incoming load. The higher the latency - the less points we get, the more 5xx - the more points we lose. The more infra we have, the more points we pay for it.
So we are quite new in aws, most of us know aws only in theory. And that's the best part!
So at first we had some steady, mild load incoming. But then bursts came up and we went offline. It's obvious we needed an lb w/ autoscaling. Lb was allright, we did set it up and got back online. We also created an autoscaling group and set it up.
Now what we couldn't figure out is how the f* do we make that group scale automatically, as a response to traffic! So we did what every sane person would do - we monitored LB's stats and changed autoscaling group's config manually 😁
needless to say we won the game w/ 23k points. 2nd place had 9k.
That was fun!3 -
!rant
I see a lot of people complain about uni degrees and stuff because they don't learn how to code etc. Is this really the standard?
I mean I'm only in fourth semester bachelor and had coding knowledge before starting uni. But we had basic to intermediate java in the first two semester, now learning how to write secure code and OS-Level stuff in C++, we had a module with practical Assembly coding all while still learning all the theory.
At the end of the first semester we had to write a terminal game in Java. I mean of course that's not "real experience" but if you dive in you definitely learn the basics you need to get started in real life.
Or am I wrong completely / just in a weird uni?6 -
Me teaching to myself because the school I've been to so far either hired bad teachers ("You know how to add ints together ? Alright let's make a rally game in C++"), dudes that were only here for the money or dudes that didn't have time to go in details so it was exclusively theory1
-
Computer games is always been a on a great demand. As demand increases, production also increases. Gaming industry has been on a rise since the 19th century. The first computer game "Space Wars" in 1962 gained a large success. Since then, the evolution in the gaming industry is thrilling. Currently, we have access to many immersive games. With the introduction of AR and VR, the gaming industry is going to take a great burst in business. Don't you believe after decade the games would be so advanced that it would be so much life like. According to the predictions, after a hundred years, games would be vastly different from what we play today, realistic feature would be a sidekick for them. A time will come when the games would reach a singularity where the characters would have consciousness. Isn't that like our real world, as if we are the characters in a advanced game of some advanced beings. What if it is true? Scientists are doing a intensive research on this field to find a clue, whether we are in a game or not. This is the so called "Simulation Theory". Some clues in relation to this would be worth noting. The flower are following a series to have their petals. To be precise Fibonacci series is the base to the no of petals in a flower. (Fibonacci Series: 1 1 2 3 5 8 13 21 34 55.....) Flowers would either have 3 or 5 or 8 petals, but no flower is having a number of petal which is not following this series. Isn't it interesting, there is no brain in flower, even then how could a flower decide, how many petals it will contain? Sometimes, it feels like there is some kind of computer code is responsible for this. We will discuss about it furthur.15
-
Previously, I half-assedly theorized that, given a timeline on which I'd store state mutations, with each mutation being an action taken ingame by either the player or computer, I could feasibly construct a somewhat generative narrative engine.
Basis: the system reads the current state, builds [some structure] holding possible choices, and prompts the player to take an action from those choices. The action modifies the state, and the loop begins anew, save that now it's the system "prompting itself", so to speak.
Utterly barebones and abstract as it may be, it was useful to build this concept in my head as it gave me a way to reason about what I wanted to build. But there were two problems which I had to grapple with:
- What would [some structure] even be?
- How would the computer make choices based on an instance of [some structure]?
I found myself striking the philosopher pose for long hours on the toilet, deeply pondering these questions which I couldn't help but merge into one due to the shared incognita; silly brain wanted trees but I kept figuring out that's not going to work as the relationships between symbols are sometimes but not always hierarchical. Shhh, silly brain, it's not trees.
So what is the answer?
Well, can you guess it?
Graphs, of course it's fucking graphs. Specifically, a state transition graph. It was right in my face the whole time and I couldn't see it. Well, close enough.
It's ideal as the system in question is a finite state machine with strong emphasis on finite -- the whole point is narrowing down choices, which now that I think about it, can also come down to another graph. Let me explain.
A 'symbol' or rather SIGIL is an individual in-game effect. To this FSM, it's an instruction. Sigils are used to compose actions, which you can think of as an encapsulation of some function, or better yet, an *undoable transaction* which causes some alteration in the game world.
But to form a narrative from a sequence of such transactions, and to allow the system to respond to them coherently, relationships need to be established between sigils in a manner that can be reasoned about in code. You may not realize this yet but this is both a language processing and text generation problem, so fuck me.
However, we have a big advantage in that we are not dealing with *natural* language, that is to say, each sigil is a structure from which we can extract valuable information on the nature of the state transformation applied.
This allows us to find relationships between sigils programmatically: two words are related if some comparison between the underlying structure -- and the transformation it describes -- holds true. Therefore, if we take the sigils that compose the last transformation in the timeline, fetch relationships for said sigils according to a given criteria, then eliminate all immediate relationships that are not shared between all members of the group, we end up with a new one that can be utilized as starting point to construct a reply.
More elimination of possibilities would have to be performed as this reply is constructed [*], but the point is that because the context (timeline) is itself made of previous transforms, the system *could* make such a reply coherent, or at the very least internally consistent.
Well... in the world of half-assed theory. I don't know whether I'm stupid, insane, both, pad for alignment, or this is an actual breakthrough. Maybe none of the above.
Anyway, it's another way to mentally model the problem which is very useful. New challenge would be the text generation part, extremely high chance of gibberish within existing vision; need more potty-pondering.
[*]: I'll break it into bits OK.
0. Determine intention. That's right, the reply isn't actually _fully_ generated, it's just making variations on a template. So pick a template depending on who is taking a turn and replying to who (think companion relationship score bullshit)
1. Sort the new group according to the number of connections the constituent sigils had to the context from which they were extracted, higher first.
2. Pop from the sorted group (least connections). If there are other nodes left in the group, and it doesn't connect back to any of the other nodes (sigils) up to a certain distance, then discard it and repeat. Else keep going.
2. Unshift from the sorted group (most connections). If can traverse up to another sigil in the same group, then go for it. Else derive search criteria from current context (including intention), so as to look for another sigil to concatenate. Some form of weighting would be needed here, need to think about that.
3. Decide when to stop. Probably some chance, as in the more sigils you have, the lower the chance a new one will be added maybe. Need to think about this too.
4. Send transform, loop begins anew.
And that's it. So alright brb I'm going to take a dump on the Agora.14 -
I'm getting gooder in music than i ever expected.
I feel like I spent years studying part of music in isolation (the basic first, guitar and a bit of piano, singing, then reading / writing score, then engineering for techno, the junglist way of playing with the drum break, the rythmic and theory behind it all, not to mention advanced guitar techniques).
And now it's all coming together and I feel fluent. It's a great feeling. Not to brag coz there are some absolute gods out there who would school me, but I feel at that point of video game when it's getting harder to get XP but real shit are ON.3