Hello ambitious programmers and RPG enthusiasts,
I am typing this from my phone. There may be grammar errors and a lack of content. I will retype this soon.
Too Big of a Dream
When I've started iOS programming (which was a couple of years ago), I was over-ambitious and wanted to create a seemingly impossible RPG game which was well over my ability as a novice programmer. I searched online for tips to no avail, because iOS RPG open-source projects was scarce then. So I started making my own. I made some progress, but my inner conscious told me this could be more efficient and modularized, so I scrapped those classes and started again. Yet, my conscious told me the code is not following a proper code design and started yet again. This cycle repeated for two years and end product was a disaster! It wasn't the product I dreamt of! I threw the entire game down the drain, and forgot about completely.
Ever since that day, I have created smaller games that have helped my sense of cohesion. Now, my ambition to create a full-fledge RPG is renewed. I have learned two things since: 1) Learn to complete smaller projects first before tackling your big idea 2) Break down your big idea into smaller parts.
My Next Idea
I plan on making a Free-To-Use RPG Engine for all cocos2D users. YES, that's right! F-R-E-E. I want to give something back to the amazing community. But this is one big project, and to do that, I plan to reach out to the community for help. My idea to tackle this is to break down the components for any RPG. Because I'm on a phone, I will only type up what I am working here. When I return to my computer, I will update on all the components I have planned and worked on.
CBTextBox - An intelligent RPG Textbox that are found in all RPG games
In any RPG game, there has to be some sort of dialogue that needs to be said, or instructions that needs to be shown. Therefore, I will tackle the most simple but crucial element to any RPG first.
- Automatically break a string to multiple lines determined by iVar width (Ex @"Hello there! This is a test string." to @"Hello there! This\nis a test string!")
- Break lines into pages
- Can color text (only if original font is white)
- Have entering text animation, exiting text animation, idle text animation (Stored in a block, so most CCActions will work)
- Have idle icon (to indicate that the entire page is shown)
- Read PLIST, string, dictionary to store in internal dictionary
- Have profile picture, name tag, and pointer (to indicate who is talking)
- Vertical and horizontal alignment and padding
- Modify most properties while typing text (Ex. Talking slow then talking fast during mid dialogue)
- Supports voice dialogues
- Supports typewriter SFX
- More features are planned, but this is all (I can think of on top of my head) that I have programmed
Now, let's talk about the structure of the classes. An RPG is a huge field, and I can confidently say that this kit will not cover even a fraction of what most RPG games do. But it is my goal to kickstart the development of RPG games, so I have tried my best to modularize my code to a reasonable degree, but I wish to ask the community for further feedback.
CBTextbox's features currently span over three classes: CBTypeLabel (inherited from CCLabelBMFont), CBMultiPage (inherited from CBNode), and CBTextbox (inherited from CBMultiPage). I have decided that CBTypeLabel should be responsible for changing the opacity of each character for the typewriter effect and for any animation. From there, if the user wants to break down a string into pages, they he/she would use CBMultiPage. If the user wants a text box, CBTextBox has the name tag, profile picture, pointer, and background sprite to make it a full fledge RPG text box.
So what do you think of the starter kit so far? Any suggestions? Something I can improve on? Remember, I just typed this on a phone, but I will update this post frequently once I get back to my computer.