Posted: Mon Apr 11, 2016 7:48 am Post subject: Development Log - Adventure in Rulon
AdmiralTofu (writing about Acronia) wrote:
I originally started the project three years ago. After five years of development, I had decided that Adventure in Rulon (my JRPG project) was way out of my scope as a programmer, and shelved it. It's not dead; it's been my pet project for literally 20 years now, so it's not going away any time soon. I just decided that I wasn't the programmer I wanted to be at that stage yet, and that the best thing to do was to work on a simpler project. "Make a platformer," I said.
Between school and work, I haven't done any real programming in about six months. It didn't help that I had basically coded myself into a corner with Acronia. Every time I would look at the mess (albeit a well-organized and cleanly-coded mess, if I say so myself) the code had become, the idea of trying to dive in and fix it all with what little free time I had available to me left me not wanting to touch it at all.
A lot of the problem I had with that game toward the end was the fact that I had tried to make it as generic as possible so it would be moddable. Well, the problem with that -- aside from the fact that it easily added two-plus years to the development time -- is that a generic framework makes for a generic game. At the end of the day, Acronia felt like, "Yeah, this is a decent Abuse clone, I guess," rather than the frenetic, action-packed gore-fest I originally conceived it as.
Just like Adventure in Rulon when I started Acronia, Acronia isn't dead. There are a lot of good ideas in there, and there's always room in the world for another hyper-violent platformer. I also fell in love with the characters and the story while I was developing it. (I even commissioned portraits of the characters, which I'll share on the Acronia devlog thread when I close it out soon.) But for now, it has served its original purpose: I'm a stronger programmer than ever, and I finally feel -- for the first time in my life -- that I have the skills, the drive, and the discipline to see my original and best vision to life.
I'm making a JRPG.
I've only been working on the new Adventure in Rulon for three weeks, and I already have a functional field engine with basic actor-on-tile collision. Sprite animation, tilesets, fonts, input, and dev console are all fully-functional. That three-weeks figure would actually be closer to a week and a half, but half of the development time so far was spent experimenting with SFML, then SDL, and finally settling on Allegro 5.
I've been able to get this far this fast for three reasons:
1. As mentioned before: I'm actually a decent programmer now. I'm more efficient; I make smarter coding and design choices. Just as an example: with Acronia, I had designed a very complex binary file format for saving all the game's data. I called it Bubble Wrap (*.brp). It was very similar to Doom's WAD format: it had a header and a directory, and all the game's assets could be stored in a single file. It would have made modding neat and clean, but I sank so much time into developing it that I'm embarrassed of myself. It also required dedicated editors, the development of which ate up even more time. With AiR, everything (where possible) is designed to be accessible to humans first and the computer second. Textures are plain ol' PNG files. Tilesets, sprite definitions, texture atlases, etc., are ANSI text, viewable and editable in Notepad. The idea is to crank out a game and not waste time developing a toolkit. And this isn't just for rapid development; I'm going to leave it that way in the final product. I'm no longer concerned with protecting the player from themselves, or protecting game content from the player. Once you give me your $15 (or whatever), the game is yours. Go nuts. Turn it into Ms. Pac-Man for all I care.
2. This is probably the most important part. I'm re-using a ton of code from Acronia. I'd say 80% of AiR's codebase so far is recycled wholesale, and a further 10% is copied but severely pared down to make it simpler and cleaner. The code that's in there now originally took two years to develop, and a further three years to refine. The bulk of the work on AiR so far has been to modify the under-the-hood stuff to use Allegro for everything instead of GLFW for input/raw OpenGL for graphics/SFML for sound/etc. The game's main() function, main loop, kernel, and in-house core library are all exactly the same, or even simplified. All I have to do is build a game on top of it.
3. Allegro 5 is awesome. I know it's gotten some flack ever since its initial release, but I was really sold on it when neither SFML nor SDL gave me exactly the results I was looking for. Allegro is fast, the API is nice and clean (for my purposes, anyway), and it's more flexible out of the box than SFML or SDL. It lets me get on with the work I'm supposed to be doing, while delivering the shiny pretty stuff I want. Plus, it kind of feels like I'm going back into my own past: the original version of AiR was written using Allegro 4 in FreeBASIC. (I'm using C++11 now, but after five years, it's as second-nature to me as FB was back in the day.) Using Allegro again feels like putting on an old, comfy jacket that you stuffed in the closet three winters ago and forgot how much you loved wearing it.
I'm really excited about this project. As I said earlier, I feel for the first time in my life that I can actually finish something, and that that something is going to be awesome. I just have to keep reminding myself that the last ten years haven't been a waste -- that it all built toward this.
I'm getting this devlog started early, rather than three years into the project as has been my pattern in the past. I want this to be an actual development diary rather than, "Hey, look at this mostly-finished shell that I've spent the last few years on and that I'm about to abandon!" Let's go on a journey together.
Edited by AdmiralTofu on Tue Apr 12, 2016 9:11 am; edited 1 time
Niunio Martinez Member Joined: 26 Nov 2013
Posted: Tue Apr 12, 2016 12:14 am Post subject: Re: Development Log - Adventure in Rulon
3. Allegro 5 is awesome. I know it's gotten some flack ever since its initial release, but I was really sold on it when neither SFML nor SDL gave me exactly the results I was looking for. Allegro is fast, the API is nice and clean (for my purposes, anyway), and it's more flexible out of the box than SFML or SDL. It lets me get on with the work I'm supposed to be doing, while delivering the shiny pretty stuff I want. Plus, it kind of feels like I'm going back into my own past: the original version of AiR was written using Allegro 4 in FreeBASIC. (I'm using C++11 now, but after five years, it's as second-nature to me as FB was back in the day.) It feels like putting on an old, comfy jacket that you stuffed in the closet three winters ago and forgot how much you loved wearing it.
Allegro 5 FTW!!! Yay!!! :D
The only thing I don't like is the C++11 part, but I forgive you just because I didn't finished the wrapper for Object Pascal yet (but I'm working on it, just follow the SVN). _________________ Under redaction...
Posted: Tue Apr 12, 2016 4:55 am Post subject: Re: Development Log - Adventure in Rulon
Niunio Martinez wrote:
Allegro 5 FTW!!! Yay!!! :D
Yeah, with Acronia, I abandoned Allegro in favor of my own C++ port of an OpenGL 2D library somebody had written for FB, but when (re-)starting AiR, I decided to see what some of the popular libraries were doing nowadays. Allegro 5 seemed even easier and more flexible than I remember 4 being, so I went with it.
Plus, it was already pre-built for MinGW, so I didn't have to build it myself -- always a win in my book!
I didn't finished the wrapper for Object Pascal yet (but I'm working on it, just follow the SVN).
:D I've never even touched Pascal, now that I think about it. Learning it might be a fun side project sometime soon, once I can carve out a little extra free time. _________________ Dev log - Adventure in Rulon Dev log - Acronia
While I'm waiting for a short YouTube video to upload, I thought I'd share a few examples of the plain-text file "formats" I was talking about.
Posting screenshots instead of plain text because the board's [code] tag is changing all my tabs to spaces.
(The game's parsers accept tabs and spaces as the same thing -- ignorable whitespace -- but I like to use tabs for human-readability)
Tileset definitions (click to embiggen)
The text file is generated by Nick Gravelyn's excellent and simple SpriteSheetPacker and is imported by the game as-is, without any hand-altering by me.
(If it seems like some of these coordinates overlap, you're right; they do. I put this text file together from several different atlases for the purpose of this screenshot. Aren't placeholder assets during development fun?)
On the world map, the view zooms in as you near a town, dungeon, or other exit point. The name also pops up. When you press the "confirm" button to enter the location (not implemented yet), the name will rise to the center of the screen, the view will fade to black (leaving just the name), and the view will slowly zoom in even further during the fade.
A little bit about the title, lifted directly from my design notes:
1.1.2. Working title
Adventure in Rulon has been the game's title ever since 1993, when I first conceived it as a little twelve-year-old daydreamer. That's not to say it will remain the title. There are a few problems with it:
It's kind of... well, the kind of thing a twelve-year-old would come up with.
It's too derivative of The Legend of Zelda.
It tells the audience nothing about the story, except that it takes place somewhere called "Rulon."
On a side note: Rulon is a planet, not a country. Grammatically, it would be Adventure on Rulon, which just sounds weird.
Nobody ever gets the name right. Almost always, they call it Adventures (plural) in Rulon, sometimes even substituting "of" for "in."
The only good alternative I've been able to come up with is The Story of Rulon. I don't like it. While it is better than what I have, and does at least give it a fantasy flavor, it's even more derivative of Zelda than the current title.
Hopefully a title will present itself as the story gets fleshed out more.
Sirocco Moderator Joined: 19 Aug 2005
Location: Not Finland
Posted: Wed Apr 13, 2016 10:56 am Post subject:
It's nice to be able to do things easily that were once extreme chores -- i.e. zooming and the like. Ironically, I've been bitching about wanting things to get easier, only to slip over to demoscene development where things are pretty much as difficult as possible. Lolwut.jpg. _________________ NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
It's nice to be able to do things easily that were once extreme chores -- i.e. zooming and the like.
The library is a huge help. I render the entire scene to a 1920x1080 bitmap, then dump that bitmap to the screen, scaled to the user's window. I don't worry about aspect ratios; if you're not 16:9, you get letter-/pillarboxed as appropriate.
For the zoom, I just tell Allegro to draw just the appropriate portion of the bitmap to the screen rather than the entire thing.
Obviously this means that if you're running the game natively at 1080p, things will get a little soft while zooming because your default, "zoomed out" view will already be 100% scale and you could be going as high as 200% scale during the zoom. But the zooms are so rare and so brief that I think it's fine. (Aside from the world map, the only times I'm planning to use it are if you trigger an action in a dungeon and it's outside your POV, the camera will briefly pan over to it and zoom in a bit, hold for a second or two, then return the camera to the player.)
Ironically, I've been bitching about wanting things to get easier, only to slip over to demoscene development where things are pretty much as difficult as possible. Lolwut.jpg.
It's got to be the constant thirst for The Next Challenge(tm). I know it well; if Acronia's development had gone on any longer, it would have turned into an operating system. _________________ Dev log - Adventure in Rulon Dev log - Acronia
Got the barest beginnings of a map editor going. Haven't gotten into the actual functionality yet because I spent most of today on under-the-hood stuff (including adding inline color to my text routines). I should be able to edit the tile map by the end of tomorrow.
After the Day Job, eating dinner when I got home, and studying for a test I have tomorrow, I spent the rest of the evening browsing the web and staring blankly at my screen. I decided it was time to copy the ol' Google Doc I was using for Acronia and start it off fresh for AiR.
If I strike one item off the list -- or even a sub-item -- then it's a good day. Multiple items are even better.
I want to see as few red items -- features that were cancelled altogether rather than finished -- as possible.
Diablo Contributor Joined: 19 Nov 2015
Posted: Tue Apr 19, 2016 7:18 am Post subject:
Rising from the raging fires of hell, I lorded over Dr. Webster, brandishing my gleaming pitchfork in my sinister hand, a bagful of souls in the other, and I cast upon him an inescapably malevolent gaze.
"Foul human," I bellowed, "long have I wearied of the interminable length of your standard dictionary." Trembling, the lexicographer fell from his chair, collapsing onto the ground with a grunt and a whimper. His shaky hands searched desperately for the cushion of his chair, and he unsettled back in as I continued my tirade.
"TODAY," I roared, "you will begin to terminate words from your dictionary."
The curator of alphabetic symbols chose a terrible opportunity for defiance. "No!" he cried, [i]"I will not betray my children!" He brazenly crossed his arms across his chest, scornfully raising his eyes to meet mine.
With a swiftness honed through millenia of routine, I raised my pitchfork into the skies, then brought it down into his insolent skull, immediately destroying the infidelic human that had crafted the dictionary. At this moment, his successor entered the office, and young Mr. Merriam shrieked in horror, horrified of the carnage he had just lain witness to. Frozen, he dropped to his knees and pleaded for his own life.
Yes, I would choose to let the apprentice survive, but I demanded that he follow through with the work that the late Dr. Webster had so imbocilically refused to commit. I demanded that Mr. Merriam begin striking out words from the standard dictionary.
In his terrified state, though, Mr. Merriam did not think in straight lines; his thoughts dashed in bizarre and haphazard directions, and his eyes searched up to mine for guidance. "Which words," he croaked, "should I queue for deletion? I am but a meager mortal, and I cannot make such decisions as these!"[/i]
I offered him no solace, instead placing upon him the monstrous shadow of my pitchfork's tines, eager to extract another soul for my late night snacking needs. Realizing the urgency of his predicament, young Mr. Merriam begin removing scores of words, including naming.
Edited by AdmiralTofu on Fri Apr 22, 2016 4:02 am; edited 1 time
Niunio Martinez Member Joined: 26 Nov 2013
Posted: Fri Apr 22, 2016 12:59 am Post subject:
Maybe that's why Allegro 5.2 re-introduces fixed-point numbers. They dropped out in 5.0 because "floating point is even faster than integers with new microprocessors". _________________ Under redaction...
Edited by AdmiralTofu on Sat Apr 23, 2016 7:05 am; edited 1 time
Sirocco Moderator Joined: 19 Aug 2005
Location: Not Finland
Posted: Fri Apr 22, 2016 5:27 pm Post subject:
Fun fact: I frequently abuse case rollover in my C code, but I always make sure the cases that roll over are at the very top of the switch, and documented with a "/* INTENTIONAL ROLLOVER */" or the like, because if my evil twin emerges from a rift, stabs me in the back, then some years later decides to keep working on my projects, I don't want to have come off looking like a dick ;) _________________ NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
Mondays are my long day at the Day Job, so I've decided to use them as my day off from gamedev. Gotta recharge those batteries, son.
Never one to just completely walk away from it, I have been playing some Wild Arms, and of course thinking about what exactly I'm going to work on once I get back into the cycle tomorrow. Dat TODO list ain't gonna complete itself.
I'll probably finish up the map format, and then if there's time, work on switching between maps. I'd like to be able to enter a town by Wednesday at the latest. _________________ Dev log - Adventure in Rulon Dev log - Acronia