DEV Community

Cover image for Developing A Game Engine with Perl
Shawn Holland
Shawn Holland

Posted on • Updated on

Developing A Game Engine with Perl

Perl? What... really?

To most in the know, coding a game engine with Perl would be a surprise. I've certainly been asked, "Why Perl?". You see, unlike C++, C#, Java and others, which are well established languages in game engine design, Perl is not (well) known for it's role in the development of games. Especially not as a game engine language. You are much more likely to see Perl managing the network infrastructure for the gaming industry then you are to see it powering your favourite video games.

So why use Perl then?

Because It's what I know. It's that simple. I've spent many years using Perl to solve many problems throughout my career. I've been fortunate to write Perl code that interacts with a wide variety of hardware, Linux servers and network services. But never a game engine. So I answer "Why Perl?" with "Why not Perl?"

Why design another game engine? Why not just use an existing engine to make games?

I had to ask myself these questions early on. You see, I've always wanted to create games and for most of my life I've been tinkering with other peoples game code.

Do you remember Gorillas? The QuickBASIC game that came installed on Dos back in the early 90's. I sure do. That was one of the first memories I have opening up and messing around with game code.

What about Bulletin Board Systems? The Internet before the Internet, using 16 colour ANSI graphics with a 80x25 "Pixel" resolution. That's OK if you've never heard of a BBS. Or ANSI graphics. But for me, that was my first introduction to hosting a game server, and also where I wrote my first online game. I got to see people logging onto my server and playing my door game for the first time. They are called door games for BBS systems, don't ask me why. I coded it in QuickBASIC (pre Perl days for me) and it ran on my Renegade BBS I was running my own multi-node dial-up BBS with 14.4Kbps modems. That's right, online gaming at 14.4 kbit/s. Can you imagine the ping times!

One of the things about me is that I prefer to do things myself if I can. This extends into my programming life as well. So fast forward many years later, me still tinkering in various game code / modding along the way, using Perl extensively in my career, I came to the conclusion that I was just gonna do it. I was going to make my own game (engine). But I didn't go to school for it and have little to no actual knowledge in this field. Sure I've written lots of Perl code, but I don't know much more than a casual hobbyist at best when it comes to writing a game. Buuuut.... I DO know how to code in Perl, I DO know a little bit about ANSI Graphics and I DO know about telnet. That's the Language, The graphics (and audio, ANSI codes can be used for producing sounds) and I can make it online play for Windows, Mac and Linux using SyncTERM as the telnet ANSI client and Linux OpenSUSE as the server.

And that's where it all begins.

I know just enough to get started. So I did, and I've made great progress, but I still have much much more to do. Which is why I decided to create a blog, to share what I learn along the way as I journey for the first time in making ANSI Game Engine

>>Watch the first trailer here<<

If you have any suggestions or comments please share constructively. Also please visit our social media pages for lots of fun videos and pictures showing the game engine in action.

ANSI Game Engine on Instagram
ANSI Game Engine on Facebook

Next >> Part 2 - Mouse Input

Cheers!
Shawn

Discussion (0)