The 'Arcane Magic' Random Number Generator
(Open Source. Just mention the 'Arcane Magic RNG' and my name in the credits and I'll be fine! If
you so choose to use it.)
The Arcane Magic RNG is first of all not a solution to get multiple random values per frame, and more
of a global state controller. Its basically an accident - where I ended up with a for my purposes
desirable result ... well ... basically: "randomly".
The foundation is a field of in my case 48 bytes - described as a union of bytes, shorts and ints -
though the ints don't matter in my code. To each datatype a counter is associated - and on startup
the first byte of the current time stamp is added to the active byte, and the subsequent 2 bytes are
xored with the active short. The counter is simply incremented.
In the next step, the first 4 ints are used to get an index value to get a dword from 4 random
bytes (byte_access[0]=int_flux[0] % 48;). This one is moded to get a "d20" value. This was done to
feed a chart showing how often which number rolled - and this is basically where the RNG already
functions, where a 'multiple numbers per frame' solution would involve some sidestepping obviously.
(Not there yet)
Now to the magic. It gets a little complicated though.
First the number that rolled the most is being recorded ("magic 20"). The deeper motivation is to
sidestep the classic 'dice logic' by a deeper layer of what is a common and a rare roll. To so get
to the "rare 20" I first introduced the "lucky 20". That is a simple value counting from 0 to 19,
one increment per frame. Hereby the "high roll" (the amount of times the magic 20 has dropped) is
used to calculate a factor (float lucky_roll=lucky_counter / (float) high_roll;), while the "Low
Bar" is initialized to 1 at the start and reset to 1 when the lucky 20 is reset to 0 - while the
recorded 'low roll' is set to be the rare 20.
Now, here's the important bit:
int lucky_counter = d20_chart[lucky_20];
int arcane_counter = d20_chart[rare_20];
...
if(lucky_roll < low_bar) {
low_bar = lucky_roll;
low_20 = lucky_20;
} else if(lucky_counter == arcane_counter) {}
Now, 'ARCANE_MAGIC' is 'true' when rare_20==arcane_20. The result is that most of the time
ARCANE_MAGIC is false, where, by evaluating that I ended up with a more elaborate plot for
the Arcane Magic state. Hereby I count the time each mode is active to retreive the "Arcane
Balance" - and usually that value is decreasing as time moves on. Randomly however Arcane
Magic triggers - and two values are retreived from it. The 'Arcane Flux' is the Arcane Balance
when entering "Normal Mode" divided by the Arcane Balance as prior to entering Arcane Mode;
and the "Arcane Wind" is that divided by the duration that Arcane Mode has been active ("Arcane
Charge") - and the motivation is to have a counterweight to the flux. Usually the Arcane Flux is
slightly above 1, ... and the wind ... well. Doesn't matter.
Every now and then you get to longer Arcane times - so, a spike in the flux. Sometimes its more
and other times less frequent. Well, its kindof random!
The thing though is that whenever I moved beyond that, the ... "Arcane Magic" somehow ... didn't
... "feel right" anymore. Anyway.
The general intention of the Arcane Magic is to influence global conditions that don't factor
into the gameplay too much. The Arcane Flux and Wind are thereby essentially "stubs" to
encourage further playing around - as for various purposes. However - it seems advisable to
not tie more relevant aspects of the game to the Arcane Magic. Simply put: Its supposed to be
an environmental feature and nonsense. (Much like how thinking about how it works exactly gives
me a headache!)
You can get the full code here: [
Arcane_RNG.cpp] - and you are
encouraged to tweak it to suit your purposes. Like, if you want any random value from it you'll
have to write the function yourself. I didn't get to that yet. A suggestion were to
extract the 48 byte part into a separate class as to have multiple of those present at one time.
What I would demand to remain unchanged is how the values are being retreived ... of course. You
are of course free to write your own too. (It is written for g++, so, you eventually have to
change a few things anyway).
Video Games and the Future
Video Games are important because of their Entertaining AND Educational values. Even when being
dumb - everything but good - they have an Entertaining AND Educational significance. But more.
Scientific evolution even. "But its just a Video game". No, its ... tech.
However - this is more like an apology from me. And based on it - well, I'll go forward.
I've written a bunch of stuff on games before - and so far ... ... . Well. There are a variety
of things I've had burning on my chest to share - yet whenever I was trying to I couldn't quite
say the things I wanted to ... like, instead of taking those five minutes to add the significance -
I couldn't or didn't and for the time thereafter didn't bother. Well, therefore I then feel
burdained by be thought of people who take it the wrong way ... and the recent Destiny 2 gameplay
premiere has brought this back to my attention - and yea. I also kindof wanted to wait for this to
write anything more about Destiny - as, it just seemed appropriate.
The premise of my apology is an understanding wherein I regard my general attitude as problematic.
I - I'm up on the ropes about it. You might find traces of me trying to battle my errors here and
there - like even here I can pull the excuse from my past pointing out that I meant to approach
all media as good/positive by default ... just to continue bashing on the things I didn't like.
Well, life! And ... well. It is that situation, taking everything as positive, is where I now
think I failed - for reasons however ... that I would say are excusable. Well, for once - being
just blindly positive about everything - can be thought of as bad - but on the other side: without
a struggle the good things come to stand out ... and yea, welcome to capitalism.
Kindof.
Its basically not a step forward ... its more like walking in circles. Uh ... ... well, whatever.
There certainly is no bulletproof point of defending any good or bad in a politically dominated/confused
society as ours. For that matter everything is potentially bad and dangerous for us in the long run,
and even short term. And this is the attitude that I can't get around. Obviously I'm there not concerned
about games per se - but rather of how social bondings and identity politics would cause a variety of
problems - much like the constantly "one upping" "attention whoring" ... the distraction, leading to a
stagnation by carelessness ... uhm, but ultimately those concerns won't matter ... obviously.
On another note however - there's an issue - and that is the next thing. Ideas. Ideas are a strange
thing; And I'm not sure where to put myself there. It starts with me and starting to really get into
programming. Long story short: I had impressions that I considered inspirational that I later found
in Final Fantasy XII. It isn't really gameplay, just a fraction of art direction, colors and a little
bit of atmosphere. I suppose nothing you would even recognize as anything from Final Fantasy XII.
Later I came to think of dungeons - and thinking about gameplay ... what I'd want or so ... I at some
point thought of something as a tube maze, well, like sewers maybe, whatever ... while I later saw
something similar in the early footage of a game called 'the Void' (by Capcom). Years went by and me
still sitting at the early stages of my code and still not yet having a really concise plan of the
gameplay I came to fancy various things - which when put into a game would be ... Final Fantasy XV,
exactly. And now that I've somehow "loosened my grip" on wanting to do something - impressions I get
go like: "Did you think of something like "that"" - like whatever backend Blizzard is using or
Universe Simulator 2. And for some reason it annoys the shit out of me or even makes me angry, but ...
whatever.
I suppose that Necropolis and No Mans sky would be the reverse situation. Where I have an idea and
someone else catches up on that. Just saying. ... uhm, I mean ... "I'm sorry! I'm really really sorry!".
The general idea to be portrayed here is more along the lines of saying that we don't ultimately own our
ideas.
I mean, we do own them. We have intellectual rights - sotospeak - or simply put: They occur within our
mind and our mind is where we are, what we are, what we got ... so we naturally move on with that and
do whatever we want to - and there is no reason that I know of that I would accept to not do it so.
So, Destiny 2. I once mentioned that Warframe would be ... quite along the lines of what I pictured for
what Destiny should be - but ... after playing a bit more Warframe I had to correct myself which I didn't
- because ... whatever. The thing is that at first sight Warframe had some sort of a real economy, in the
sense that events in the Solar System took place, ... saying - in essence - my idea would be that Destiny
might benefit from some "real time" - thing, I mean. Some 'consequences' to the players Patrolling or not
Patrolling. Something along the lines of an active battlefront - or events like: "We need so much of this
and that". And the devs could go along with it - forging expansions around the real ingame progress.
But possibly this idea is rather naive because ... gamers are gonna play the shit out of it and win ...
anyway ... no problem.
But now on to the core issue of this: Destiny 2 weapons and sub-classes. First of all: Yea - I'm
definitely positively impressed by what they came up with. No doubt. But ... I'm still underwhelmed
by it. However ... the thing is that I had ... "an" idea - carried by "a visual" ... thats basically -
I'm not sure. Circles instead of Diamond-shapes - superficially speaking - when looking at the subclasses
screen. Also the way they changed how weapon slots work. That all adds up into one thing - where, for
sake of argument lets just say that the idea itself is a node in space - belonging to no one - where the
ideas "we" (in this sense me vs. whoever is in charge of it at Bungie) 'have'/practically own are our
individual takes on that - saying: It is clear to me that the people at Bungie have their own design
concepts - which is why things are the way they are and not different; While - if I were in charge of a
few things the game would be just a different game. Not entirely different - but different on the
outlines. So, what do I do? Share my idea - on risk that I loose intellectual capital - or keep it to
myself on risk of ... - ... well - "fates twistings curling against me" or whatever?
There's another thing I have to mention here. Watching the live-stream, when it got to clans, I had a
super-amazing idea, based on the ideas that they had. And as I watched other live-streams analyzing the
premiere - there was one dude having the same idea. And a lot think that way I'm sure: They need a
reputation system of some kind. My idea is possibly deeper though. Whatever. The 'raw essence' of
progress is there. It isn't tied to me. Whatever the volume or scope or depth of 'my' ideas is - that is
in this regard my own "problem" or "perk" - its about me, my spirit, my connection to the divine, the
state of harmony or chaos within me - lots of things. Like - whatever we do obscures our mind. If you're
a game developer, chances are you're never going to be a 'pro gamer' because your mind revolves around
different things.
Astair. Yea - that is ... something. Pretty much - I so for instance assume that Capcom is really trying
hard to do the best they can to 'provoke' situations as the one known as "Moment 37". I mean, being somewhat
"high" on the idea that they have some level of control to creating the 'sandbox' for such moments to
occur. What I mean by "high" is ... more of a Zen level type of oppinion I have - saying: developping game
mechanics with a certain goal in mind isn't ... as effective when it gets to making a good game - once there
is a Level of inspiration that would 'do the magic trick', but gets discarded because it doesn't fit the
concept ... apparently.
Idea Warfare?
There is some group or entity - I fear/feel - that rather stick to the "there is no such thing as "the good
idea" - the only thing there is are 'well thought through ideas'". Like, pitching two ideas against each
other - which one is the better one? The one who can come up with more 'reasons' why his/her/its idea is
the best! But that is bullshit in my eyes!
And again Destiny swims in the flow as an anti-object, ... it just ... happens to be there so. But oppinions
can go apart here. Is the "attunement" system OK, or does it need more depth? I mean, within my ideas - the
one thing that would be different is that there are at least 'two' layers. There is the 'node' - and a set
of options. So is Destiny really ... conservative ... when it gets to class design in the sense that there is
a really 'controlled variety'. And still they failed (Sunbreaker anyone?). Kindof. Nothing that balancing can't
fix but I'm more old-school in that regard. If the balance is off in first place ... somethings fundamentally
wrong with the design. Kindof. I'm not perfect! So, ... comparing Starcraft to World of Warcraft for instance,
those two games are effectively polar opposites. Not due to genre - or, maybe due to genre, but I mean -
in terms of what is right and wrong to do. With WoW you have an MMORPG that is built on consistent classes with
specific abilities that all have to kindof interact and so certain things come out on top and ... you're
encouraged to make the best choices. OK. Starcraft 2 on the other end is more fluid. The 'right way' isn't
really obvious. And once a strategy evolved that is OP, balance changes can change that and what works and
what doesn't has to be eventually even fundamentally be re-evaluated. And what I earlier wrote about Capcom
does here I think also apply on Blizzard - coz - I feel like they did some missteps with Heart of the Swarm!
Whatever. I'm just trying to get some concepts pronounced here.
I mean ... clearly: Blizzard did a great job designing Starcraft. Its naturally tailored towards competitive
play - and Starcraft 2 is clearly based on how Starcraft 1s competitive scene had evolved. Like Street Fighter.
And yea ... rights and wrongs ... time goes on!
Back to Destiny - I would simply try to make everything as modular as it gets. And I primarily am talking
weapons. And at the very least have some 'loadouts' screen. Which ... so far never really worked out well in
any game I played so far! "Just sayin'". So - on that end ... I can talk all the way I want - in the end I
suppose I have to keep my thoughts to myself and show folks how its done ... in-sha-allah - or however you
write that out (if god wills).
What the Destiny 2 reputation System would however certainly need - in my oppinion - is an indicator for from
how many sources the reputation comes. Thinking of it like farming reputation in fractions within an MMORPG.
Encouraging players to be generally good people - and to have some gain out of that. (Every system can and
possibly will be exploited - and whatever ... sigh ... idea politics?)
Well, easily enough: Once people close the gap between themselves and God - I'm no longer a part of the
equasion - and I have to deal with being a sore looser eventually. Thats just how it works! If you really got
something - you work on it - or you fail it. I there have my own ways. I have no urge to make my ideas work
for anyone. Once folks think they know stuff better than me - well - I'm not gonna denie that possibility!
Except ... at the very least when it gets to my own stuff.
Here's a ... little bit to chew on: When I started to get into programming, using QBasic, I was really really
- ... we could say ... pathetic. I first had to see how something stupidly moronically simple had to be done
before I could do it - like - the discovery of 2 Dimensional arrays. Yea ... "duh". But MoA is different. There
certainly are a few things I saw here and there - but rather than seeing 'how' it is done - I saw 'that'
something was done and had my own take on it. And from all the stuff I've been reading about programming and
game development - nothing felt like it enriched me in any way, shape or form - so I eventually began
ignoring any sort of programming related information - except I really need to know a few specific things,
like, which interrupt does what or "whats that functions name again?". Obviously!
In the end - I don't find the way back to the heart of my apology. The idea was: Be productive with your
criticism. Yea - where my mind is just too ... troubled. I always see the contra, and then the story is
over for me. Which makes me change how I think about it - arguing that being productive with your criticism
is good amongst friends - but otherwise: Just be a douchebag, thats totally alright!
After all - a douche is a hygiene item - and once something needs a ... "thorough cleaning" ... you are
obligated to say stuff: THE FURTH AWAKENZ SUCKS!