Posted 8 hours ago by phu
Android, roguelikes, and sprites, oh my!
Posted 802 days ago by phu
Well, as it turns out (I’m sure everyone is surprised), I’m not sticking with the original vision for this project as an Android game. After playing a few games with similar controls to the one I intended, I finally accepted that it just doesn’t work well.
Posted 978 days ago by phu
Well, after having switched from C++ to Python, I’m now switching again… to Java!
Don’t panic. I’m only doing it because this current attempt will target Android.
Posted 1551 days ago by phu
As for the title, as I was going through my multiprocessing implementation, I hit a VERY frustrating issue. Long story short, it turns out you can’t start this particular type of shared memory controller in a file that’s imported by the invoked script — whether it’s created in an import or not, is start() method MUST be called from the script you actually RUN. Yeah, screwy. I filed a bug, though, so rock on!
Things that are now working:
- Input, graphics and networking are handled in separate threads
- Processes are spawned for and take input from any number of clients
- Movement around a map and between maps works
- Collision detection with map boundaries and impassible tiles works
Posted 1641 days ago by phu
I’m not happy with the way the rendering engine was unfolding, so I think a pretty major revamp is going to be in order; it’s hard to say how involved that will be, since it shouldn’t necessitate much or any reworking from the networking standpoint.
Posted 1692 days ago by phu
Specifically, the Berkeley DB bindings did not support multiple keys being associated with individual entries, which did not bode well for indexing, say, articles with multiple keywords. It took one string as an optional index. Berkeley is a very low-level data store; we chose it because it was (and probably still is) the most blazingly, ridiculously fast storage engine out there that also handles concurrent connections well.
Posted 1716 days ago by phu
So I’ve started a rendering ‘engine’ that’s pretty much just a set of wrapper classes; each one takes a certain game object (maps and panels right now, I think they’re generic enough that it won’t grow much beyond that), updates its internals with sprites as necessary, and provides update/draw methods (they’re extending pygame.sprite.Group for this purpose).
Posted 1716 days ago by phu
I think I may be to the point of taking a break on the really technical stuff and getting some rendering going. Making the client do something useful, at first anyway, is going to revolve around activating objects and then adding a chat interface; doing that on the console would probably end up making more work for me than it’d be worth, so I think the next thing I do will be getting basic rendering up and running.
Posted 1717 days ago by phu
As for the actual game, I had intended to start doing a bit of graphical work next… after reviewing the client stuff that’s already working, though, I think it’ll be a lot more useful to get communication between the client and server working first.
Posted 1748 days ago by phu
Something is wrong; someone has pulled a fast one on me, I swear, because switching my TCP server over from threading to processing (forking) was ridiculously simple.
Posted 1762 days ago by phu
The main goal here is to partially or completely eliminate the need for combat if a player doesn’t want that particular grind. If you love crafting and can manage to do it until your crafting level is through the roof, then I think your total stats should reflect it enough to enable you to take on other tasks — whether this means combat, another craft, or anything that will depend on your ‘level’ — without basically starting over.
Posted 1790 days ago by phu
I’m pretty sure I’m going to update the motion processing to handle it… I just don’t know how I’m going to handle it in the rendering engine. The real problem is how to handle things like doorways. If I allow two-tile-wide characters, I either have to make sure all movement happens in one-tile increments or (if movement increments are equal to the size of the character, which is what I intended to do), that all doorways are wide enough to accomodate all character sizes.
Posted 1796 days ago by phu
Why quit a decent job with good pay? They told me I’d have to work with Magento again… and I knew it was time to move on. If you’re a PHP programmer, STAY AWAY FROM MAGENTO. It’s bad enough to quit over.
Posted 1804 days ago by phu
It’s nothing major. In fact, it’s really freaking simple. However, since it fits perfectly into Django’s basic feature set, I figured I’d forego my usual, tried and true, boring as hell PHP-from-scratch approach and put Django to the task so I could enjoy the benefits of the free admin interface, simple flat pages, powerful generic views, and… well, Python, since Python rocks hardcore.
Posted 1805 days ago by phu
Also the moon left and the President of the United States of America just said he doesn’t like chocolate ice cream and my dog is going to run against him next year because they changed the rules for canines and called another election because Florida wanted a recount!
Posted 1808 days ago by phu
Nice! It took longer to get around to working on this bad boy again, but I put in a few hours today and managed to get adjacent maps associated with each other and teach the engine how to handle movement around and between them.
Posted 1811 days ago by phu
Thanks to the Queue class in processing (which I’m now using instead of multiprocessing… for no particular reason, other than it’s in Portage, and I have an aversion to using anything that isn’t in my package manager), my client is now happily passing user input to a queue which will contain the map and an arbitrary number of menus.
Posted 1811 days ago by phu
Well, turns out instead of simulating a queue with a manged list… I should have just been using a managed queue. Brilliant, huh? Yeah.
Posted 1812 days ago by phu
Turns out I can send and update objects and get them back with the changes intact, and I can send and update lists with the same kind of success… but I can’t send and update a list of objects, update the objects, and expect to get them back with their state updated.
Posted 1813 days ago by phu
Since I have not had the chance to touch the code (my wonderful girlfriend is in town over the weekend; it was a very good trade), I figure that as long as she was surfing her knitting blogs, I would regurgitate some old info, interspersed with new stuff, into one entry so it’s easily accessible.
Posted 1817 days ago by phu
The last couple days have not been conducive to RPG development; I may get some time in this weekend, but if not, definitely by the beginning of next week. Inter-map movement will be high on the list… I don’t recall how far I got with pushing user input to the command stack, but if that’s not done it will be next (and if it is, next comes subclassing for various menu implementations).
Posted 1820 days ago by phu
This is just a unit test to ensure that movement between map tiles is being handled correctly. Tiles you can walk on are labeled as ; tiles you can’t are marked as //. The tile the actor (player object) is on is marked with the number. This is a really simple way to make sure the map is only allowing the player to walk on the right tiles (earlier on it successfully keeps the player from walking off the map, which is good, but will be handled slightly differently for multiple maps).
Posted 1821 days ago by phu
After wrestling with a serialization issue, I realized I can’t keep a lock as an instance variable on an object I need to pass between processes; I should have figure that out sooner, but I had written it to work with threading, which doesn’t have this particular quirk.
Posted 1828 days ago by phu
I had written them in threads before; while that was fine and all, Python (the C implementation, anyway, which is the standard) has a global interpreter lock, meaning that even if you’re running multiple threads, only one can ever actually be executing at a time. Which really sucks if you want actual concurrency, since, you know, that doesn’t qualify at all.
Posted 1838 days ago by phu
I’ve switched from C++ to Python for all code and from straight SDL to Pygame for graphics. The increase in productivity per hour is awesome.
Posted 2453 days ago by phu
On Thursday I laid out a class structure for some of the game’s basic entities (players, NPC’s, enemies, and various interfaces and superclasses to keep everything flexible), and between last night and this morning I wrote up several of them as the beginnings of the server application.