Full-on Android development and direction change
Posted 507 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.
Pretty big update. Again.
Posted 682 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.
Submitting a bug is... KIND of like contributing... right?
Posted 1256 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:
Client
- Input, graphics and networking are handled in separate threads
Server
- Processes are spawned for and take input from any number of clients
General
- Movement around a map and between maps works
- Collision detection with map boundaries and impassible tiles works
tags: client, graphics, movement, multiprocessing, server
I don't know if anyone follows this blog...
Posted 1345 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.
tags: rendering
Rock on, I'm an open source contributor!
Posted 1396 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.
tags: python
Rendering woes
Posted 1420 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).
tags: client, processing, python, rendering, synchronization
Last night's progress
Posted 1421 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.
tags: client, graphics, maps, menus, server
Back at it! Pydoc, processing and client-server communication.
Posted 1422 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.
tags: git, ipc, processing, pydoc, server
Threading to processing on the server... FAR too easy.
Posted 1452 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.
tags: architecture, server
Diversions and leveling discussion (was: Argh!)
Posted 1466 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.
tags: crafting, leveling, python, skills
Pondering multi-tile actors.
Posted 1494 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.
tags: client, maps, movement, rendering
Further apologies...
Posted 1500 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.
Off topic: Django and deployment
Posted 1509 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.
It's done, hur hur hur!
Posted 1509 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!
Inter-map movement!
Posted 1513 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.
Freaking brilliant.
Posted 1515 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.
tags: client, processing, queue
Oops.
Posted 1516 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.
tags: maps, menus, queue, synchronization
Multiproc woes
Posted 1516 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.
tags: architecture, multiprocessing, synchronization
Tools and environment
Posted 1518 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.
tags: ec2, multiprocessing, python, scaling
Welcome to Textpattern!
Posted 1521 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).
tags: menus, stack, textpattern
Woohoo! Map movement!
Posted 1524 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).
Multiprocess command input
Posted 1525 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.
tags: architecture, client, multiprocessing, python, synchronization
Multiprocessing is a go!
Posted 1532 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.
tags: client, multiprocessing, python
Switching to Python and other intriguing developments
Posted 1542 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.
tags: client, pygame, python, server
Preliminary C++ coding has begun!
Posted 2157 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.
tags: c++
