Monday, October 21, 2013

[HobbyRPG] Dialogs!

Dialogs!

Anyway, the last week was basically trying to get the game running on the device since we wrote so much code since the last time we tested (which is like...the beginning of time when we had only like 2 files or something). The thing is that we code in Visual Studio because it's an awesome environment, but our android is setup to use GNU compiler (cocos2d-x has some script that sets up for us). The screwed up thing is that it relies on a Makefile, which means I have to manually indicate which files need to be compiled. Fortunately, after some googling, modifications and thanks to the linux 'find' function (big hint here!), we now that a script that searches for all .cpp files and include them into the Makefile!


Anyway, so far LUA was pretty much pain in the ass. I was constantly trying to convince myself what is the right way to this X and Y mostly because I have like zero experience working with scripting languages on top of a native language. I can potentially write my whole game in LUA if I really want to; that's how much power it has. The only thing that's stopping me is that C++ is still our native (hurhur) language it probably has better performance and memory management (well manual memory management). There are other minor reasons too like wanting to make full use of our IDE, increase performance, etc. This is still a game that runs frame-by-frame, so it just does not make sense to me to write update loops in LUA.

Still, as the game progresses, the stuff that needs to be data-driven starts coming in and that's causing a few decision problems. It comes to the point where attempting to create 'generic systems' need to have feasible and reasonable boundaries, which also means NOT making it too generic. It's normally not a problem, but because I have loads of RPGs to reference in my head, I keep trying to hit all their features. It's really hard. Just the inventory and item system (which I am currently working on next) is giving me a headache. I could easily write out a chain of inheritance in C++ like having a UsableItems derived from a base Items class and then chaining a Armor class out of UsableItems class, but this is really unproductive especially since I have LUA. I'm trying to derive some way to just use one nice Item class. There's just too many variables to consider if it works for the limited RAM in my head, so I'll just code it out and see how it turns out.

Once the inventory is done, hopefully we can get item shops and equipment in and we'll be ready to FINALLY get started on combat. This might take awhile though ^_^;;

2 comments: