Interview with Weiqi Wang: Squaring the circle of science-based fantasy storytelling

Sign up for Scientific Inquirer’s Steady State Newsletter for the week’s top stories, exclusive interviews, and weekly giveaways. Plenty of value added but without the tax.

Weiqi Wang is the author of a fantasy series, Code of Rainbow. What sticks out about his writing is the way  in which it melds the real with the imagined. In this case, Wang has incorporated scientific elements as a backbone to Code of Rainbow’s narrative. (You can read an author-selected excerpt here.) He set aside some time to discuss his work with SCINQ.


Can we start with some background? What kind of scientific research are you involved with?

When I was studying in Oxford, my PhD project is about stem cell data analysis. When I worked for Stanford as a data scientist, I participated in many different immunology projects, varying from allergy to cancer.

How did you get into creative writing?

Well, I’m not sure “how” exactly, but I think my desire of creative writing has been something that flows in my vessel. I started writing fairy tales since I was in primary school. In high school I wrote an urban fantasy. In college I wrote a number of different short stories online, but all of those were not officially published and they were written in Chinese. I started to write Code of Rainbow series when I was in Oxford, and this time it’s in English. But back then it’s tricky to find a publisher and I didn’t have time for it, until years later when I was in USA, self-publishing had become popular.

Where did the inspiration for the series come from? Did you initially envision it as a trilogy? How long did it take to write?

The inspiration came from the experiences that I gained from travelling the world, but it also included some childhood experiences before I ever travelled. I think I just love imagining things since always, so in my brain I have had quite some storage of things that I imagined, and it’s time to put it into words.

This series is not a trilogy – it’s going to have 7+ books, according to my outline. The first round of writing didn’t take long, but the refining process took years. The first book took the longest because it’s just like everything else, that the beginning is usually the hardest. And a particular reason was that it’s my first fantasy book in English, so there are lots of things to refine and polish (grammar, writing style, culture gap etc.).

What is the book about?

It’s hard to summarize the storyline because it’s quite comprehensive, and it’s an enormous magic world that I’m building in Code of Rainbow series. But maybe I should say this: this series is a mix of magic fantasy with sci-fi. The magic in this world is backed up by scientific theories, which the readers will realize as the story goes on.

The main character is a boy wizard with a pair of special eyes – he sees “magic elements” in this world, which is the source and resource of magic. As he grows up, he bit by bit obtains the knowledge on how the world/universe is formed, why everything has become what it is, what is the true face of time, space, life, fate, etc. As that goes, a series of scientific knowledge and theories will come into play, including relativity theory, quantum physics, statistics, biology, etc. So, this series starts like a “mainstream” magic fantasy, but later on it will become a “hardcore” sci-fi story.


Can you explain how you incorporated real world science with the fantasy elements in your series?

It’s pretty much summarized in the last question, in a very brief way. The incorporation process has to take time because it’s quite a challenge.

If we think about it, the concept of “magic” originated from the observation of something that we can not explain, something deemed supernatural, which does not mean it’s not scientific. As a typical example, there’s a real phenomenon in our real world called “ball lightning”, which is extremely rare and not well-explained even to date, , but it’s no more than a normal spell in magic world. This exemplifies my point here: magic is just a way of calling novel things, and the novel thing may be scientifically valid.

So, an important thing to keep in mind is that our current state of science is not even close to perfection. There are lots of observations in astronomy that violated our classic scientific laws, but they are just there, as real as the laptop that you are using. So the things that don’t make scientific sense could just be because our science is under developed. The term “magic” could be referring to those ones as well.

Can you compare writing fiction with doing scientific research? How are they similar? How do they differ?

They are very different. I would say that, other than the fact that they are both about writing, there’s hardly any similarity. Scientific articles appreciate rigorous and standard vocabulary and article structure, and try to simplify the way that they state things. Fictions are on the other hand – most readers and editors appreciate literary talents, rich and bright colors in writing, unique author voices, etc.


What is next for you?

To carry on with this series, and develop games and animations, and movies if possible, from it. Two mobile games and a card game are in the development process, and I need to raise some funding for all these projects.

Finally, can you provide some context for the excerpt you chose for us?

In the world of Code of Rainbow, there are seven basic types of magic, each with a representing color (as the color code of the “rainbow”). The main character, Soarame, is a wizard capable of three types of magic: Wind, Water and Lightning. He was fortunate to obtain a mysterious magimal (magic-gifted animal) egg, which gave birth to a cute kitten-like magimal named Snower. Soarame then started his adventure with Snower and his friends, to explore this enormous magic world with countless secrets behind the scene.

As that went, Soarame’s magic power kept improving, which enabled him to discover new findings about the world and its history – the history that highlighted a grant ancient war between mankind and dragons; the history that involved countless breeds of magimals playing their roles since thousands of years ago (some of which are even more powerful than dragons); the history that the entire dragon clan had been locked up on an isolated continent but never wanted to give up their ambition to rule the world.

It also enabled Soarame to achieve a deeper understanding about the magic system, and realize that there are more types of magic than the seven basic ones, along with lots of other hidden truth that could only be revealed upon enough magic power plus coincidences. Soarame had both his good and bad luck to have survived a series of crisis and coincidences, and the discoveries he made so far were intriguing enough to drive him forward in his adventure. The excerpt was at the point when he had just graduated from the magic school he attended, and ready to embrace the real world outside the campus!

The first three books from Code of Rainbow can be downloaded here. For more information, visit


Words matter. Images matter. The Scientific Inquirer needs your support. Help us pay our contributors for their hard work. Visit our Patreon page and discover ways that you can make a difference.

Leave a Reply

%d bloggers like this: