Archive for March, 2009

Map editing underway

Monday, March 30th, 2009

So I implemented a better map editor that what I had yesterday. Effects, tiles, trainers, and warps all move around the map with ease, stay within its bounds and moves along the edge relative to where the mouse is if it can’t go where the mouse is. There is also an adjustable grid so that finding out where you are is easier. None of the map objects snaps to them yet, but I’ll get to that at some point. There is also the option to view the tiles as where they can be walked on. This allows viewing paths through the map to be a lot easier than trying to figure out what parts are available for movement and what parts are not. Tomorrow, I hope to be able to start either the shape editor or the world map editor.

Sigen status

Sunday, March 29th, 2009

So it’s been a while since I’ve written. In the meantime, I have gotten the plugin viewer to be much better. I also wrote a plugin for a Canvas using QGraphicsScene, which turned out to be very simple to do. I realized that since the server and client are completely separate, the server has to do collision detection. This allows the Canvas plugins only have to deal with drawing what they are told to draw and manage transformation plugins for the sprites. In addition, I wrote the base plugin factory for Clients and extended the API of Client to allow for message passing as well. Previously, Player (which subclasses Client) has some special handling which made it hard to do plugins from Client to Player. Eventually, I think Player will end up folding back into Client completely (well, minus the Team; the Arena or Overworld can just tag a Player together with a Team instead of having Player own a team), but I’m not sure quite yet at this point. It will most assuredly be less cluttered than it used to be. I’ll probably decide after writing some basic plugins which implement the Client interface what should be done.

I think that I’ve also figured out a way to implement the editing of the effect and warp areas. To simplify things, I’ll only do basic shapes (lines, rectangles, and ellipses) for now (though the way I’ll be doing it will allow for more complex shapes eventually). Since there is a way to group items in a QGraphicsScene, I can get an overall QPainterPath (which nicely represents the region of the map that the effect or warp is active on) for all of the simpler objects in the composite that make up the effect or warp area. In addition, I would like to make an editor for placing all of the main maps onto a world map and making the edges known to the game where two maps make a border. It would have to enforce a few things.

  • That all edges where the map is “open” (walkable) touch another map
  • That no two maps overlap (this is easier with QGraphicsScene collision detection)
  • Maps would have to have previews of the tiles inside of them as well as a way to view the collision masks for maps
  • A way to lock the position of the map

It sounds like a lot, but it shouldn’t be too bad. And with how I jump around on what I’m working on, I don’t know when I’ll get to either of these, but I think I’ll get to them sooner rather than later since I have to sort out what to do with Client.

I also have to decide what I want to do with Arena plugins as to drawing. The default plugins should gracefully handle any number of teams with any number of clients on each and any number of fighters per player. I don’t know how to approach the problem yet, so that’s also being put onto the drawing board with other stuff.

I have other things that still need to be done as well, such as Config saving its custom data and flags out to a file somehow. It will probably end up being a binary format since text could be more hassle than it’s worth (all save data should be stored on the server, so it’s not readily accessible in any case).

There is more I’m missing that I need to do yet, but I hope that it doesn’t delay things too much.

Plugin browser

Wednesday, March 25th, 2009

Homework sucks. MPI and debugging pthreads is a pain. I don’t really want to do it for a while, and it looks like there’s a lull in school work coming up, so I should be able to get more work on Sigen done. Since my last post I have gotten some things done, but not as much as I’d have liked, but I’ll take what I can get I guess.

I have an plugin browser working to some extent. It loads up plugins and displays information about them. I still have things to do like painting the current state of the item (hover and selected) due to the custom painting I do since I want it to be a little more than just a boring text list. I had lots of stupid little issues on my way getting to here. Forgetting to link libraries sent me on a wild goose chase for a while trying to figure out why my tags for exporting symbols weren’t working. One character making members into references makes non-constructor methods crash. Lots of dumb stuff. But, I’ll be less likely to do it in the future with any hope.

Anyways, I guess I’ll post an obligatory picture here.

Plugin browser

Plugin work

Saturday, March 21st, 2009

Until I get the map effect and warp editing sorted out, I’ve moved back to working on plugins. I added a simple Canvas interface and got a base plugin class for it complete. After looking at KGLEngine, it looks as though it won’t work in its current state. The engine being a singleton makes it impossible to work as a plugin. So for now, it’s going to be QGraphicsView.

I also started a skeleton for the battle application. Before I do too much on it, I want to get a class that loads up plugins for everything and offers an interface for it (similar to the “Add Widgets” dialog for Plasma). This would also link up with the Get Hot New Stuff protocol to allow for downloading of new plugins and so on. My usage for the dialog would be a bit more complex than the “Add Widgets” stuff (since the plugins can offer more than one actual class of a type), but the base display for an item would be nice at least. Unfortunately, the headers are not shipped, so it’s effectively a private API I can’t use. Besides being in kdebase-workspace which is a little higher up the dependency tree than I would like.

It’s pretty late and I guess I should call it a night.

Two steps back, one step forward…

Friday, March 20th, 2009

in a better direction. I got lots of work done today on Sigen, but less “works” than did yesterday. This is because I reworked how effects and warps can be represented on the map. Before, effects and warps could only be represented by rectangular areas. Although easy to edit, this makes “area” effects that work better as circles hard to create since it would require using many rectangles or a square. Not optimal. Now I am storing the shapes for the effects and warps as a path which can be arbitrary. However, this does not lend well to nice editing. QPainterPath is stored flattened, so this doesn’t work well. The editor for the shapes would need to be separate from the map editing. Not ideal for usage, but it’s more flexible which I prefer when choosing the two. Maybe only allowing simple shapes would work, but this would mean that effects that are more complex.

Anyways, the weekend looks packed with stuff to do, so I’ll have time to hopefully figure out what to do before I have time to do it.

Sigen distracts me

Thursday, March 19th, 2009

Well, I got more work done today on Sigen at the expense of homework which I’ll have to get up early to do. I view it as worth it even though professors may not since I’m learning more from Sigen than from homework anyways (lectures and catch-up reading are enough most times).

I finally got something together for the map editor in Sigmodr. I’m not that happy with it, but I’m not sure how else to do it as of right now. I also use stuff that bumps the minimum required version of Qt to 4.5.0 (setOpacity in QGraphicsItem), but it’s only aesthetic right now. I still need to ask for an initial tile for the sprites, allow changing them, and a few other quirks that would be nice to have working. Should be possible Friday afternoon as I do have stuff that I won’t have time in the morning for due at noon.

After this, I’ll look into getting the viewport API figured out since that’s next. I’m not really sure how to go about it though. The server/client barrier is a little weird for how I’ve written things so far (even though there’s nothing forcing local input) since the arena has to be represented in some way on the client side. Just not sure how it should be done yet. Maybe Arena ⇔ RemotePlayer ⇎ RemoteArena ⇔ Player will work (use UTF-8 to see the double arrows, the slash meaning the server/client barrier).

Anyways, time for some sleep so I have a chance at waking up in time to do the homework.

Sigen news

Wednesday, March 18th, 2009

This should be my first post on Fedora Planet. If this is your first post, it would probably be best to start from the first one.

So yesterday’s troubles have been fixed and it was all my fault. Forgot that mutable iterators in Qt prefer to be used with while loops rather than for loops.

Anyways, those troubles are in the past and I have made progress. Today I got quite a few things done. I fixed up the Arena plugin to be a little more sane. The plugins for Sigen will use KService and the arena plugin is already using it. I got the core class in sigscript and pretty much everything on top of it, Config, to be thread-safe. I also got the packaging to be split for a more fine-grained install.

The next step will be to write a simple way for scripts to draw to a widget that will also be a plugin. This will let the server offload the drawing to clients and also allow for different widgets for each operating system (QGraphicsScene for everything, KGLEngine for more advanced stuff, DirectX on Windows, Core Image on Mac, and so on). In addition, drawing to the widget will be able to use transforms on items in the widget. Now each widget will need its own set of transformers, but I still have time to make it nicer. The transformers will be plugins as well. Did I mention that Sigen is extensible?

I’ve stated a couple of times lately that I’d get to the to-do list that I made last week on break and I’ll do that now. It’s basically a brain dump right now, so don’t expect any structure to it.

Sigencore, the base library for the actual engine that handles the larger constructs of the game and flow control, needs to be made thread-safe. There are other plugins that need to be designed: the viewport and transformation plugins stated above, a player plugin, and a plugin to control tournaments. There will probably be more in the future, but this is all I’ve been able to come up with as of now. Of course, bridges for Kross will also be available for each plugin. I need to test a plugin loader which has yet to be written, but KService should make that easy. Arenas need to allow moves that are currently working to have “states” and allow other moves to interact with active moves. This would allow a water-based move to put out a fire or a wind-based move to make them stronger. I’m not quite sure how I’m going to do that yet. Documentation for both the API and Sigmodr are in dire need of well…existence. SVGs may be possible for images, but that would introduce inconsistencies all over the place with how images are handled as I see it, so it may not happen despite my wanting them to be preferred over raster images.

I’ll see what happens tomorrow since I’m basically off except for homework. Maybe I’ll have a basic plugin explorer done tomorrow. One thing that needs to be done is a simple Sigmod that I can use to test out the arenas. Sigmodr needs the testing and writing documentation for documentation is boring. It’s a lot easier to take my describing things to people and turn that into documentation. Any volunteers can join the #sigen channel on FreeNode and I’ll help whoever shows up with getting started.

Broken

Tuesday, March 17th, 2009

Things seem to have been broken today for Sigen. I’ve started writing the test for the Config class which serves as the base for pretty much everything up to sigencore. After some basic stuff, I start getting errors in Qt way down deep when converting to a different encoding or something. Which means it crashes on output of the strings as well. I don’t know what is causing my strings to become corrupt and tracking it down is proving quite resistant to fixing so far.

Also, I was working on getting kdebindings reworked to also ship C# and PHP bindings that have been asked for. RPM seems to think that files that are installed to the build directory are “unpackaged” despite not being anywhere that really exists (the build directory isn’t shipped). After fiddling with it, it appears to be an upstream mistake, so I’ll get that patched up tomorrow.

Busy day trying to catch up on things and yet I feel like I’ve only gotten an hour of work done due to stop-and-go problems.

Catch up

Monday, March 16th, 2009

I missed posting all last week mainly because of an inability to focus while I was at home for spring break. I’ve made a huge to-do list that I’d like to tackle, but I’m not sure how it’ll work out. I also have some restructuring to do with daily schedules and some loose ends I’d like to tie up for plans and whatnot. Sigen grew a long list of things that need to be done and decided on during the bus ride home, which I’ll give a post of its own later this week since I’d like to get to bed at a reasonable (college student) time here.

While at home, I usually end up doing things I never do here it seems. Watching TV, eating much worse, not getting any work done, etc. I did find out that apparently the folks at Redmond think that “Life without walls” is a clever slogan for themselves. As, I’m sure, others have pointed out that windows don’t really exist without walls and that it feels as though hitting walls is a daily routine in Windows land, it makes me feel as though that as a whole they are completely oblivious with their lack of so many things that I take for granted in KDE land that it’s almost laughable.

Commercials still annoy me. Always will I guess. Advertising is a hard problem that seems to be getting better. Radio ads seem to be among the worst still. I listen to my second-favorite radio station at home because the first has such bad commercials it’s not worth it. TV ads can be muted and still have cues when they’re over. The Internet is such a worse place when I use browsers without ad-blocking capabilities. It’s a basic necessity these days. I know that keeping sites up is hard to do for free, but there has to be a better way than intrusive ads that distract from the content of the site. If they showed up every X links or so, it would be better for me, but worse for many.

I did finish Broca’s Brain and started Island. I feel a little lost about the beginning of it, but it may be a result of my lack of focus during the last week.

Anyways, bed is beckoning and I’ll see what happens with the first day of classes after the break in a couple of hours.

“Rules”

Sunday, March 8th, 2009

So I missed last night’s post due to travel to get home for spring break and getting settled in for the little bit of time I’m here. During the trip, I was able to list out some things to do and decide for Sigen, but that’s for a later post. Tonight, I’d like to get some things down before I fall asleep due to it being a long day. I have thought about what I would like to happen with this little corner of the Internet though.

For myself, I don’t want to set any expectations because I’ll probably run out of time to live up to them, like trying to post every night. So for myself, I set nothing more than I will set on you, the reader. If you leave comments, be respectful. That’s it.

Simple really. However, some people just don’t get and probably never will. These people can go some other place. As such, I’ll only let people post after their first without review (I thin). If the first post is disrespectful, I’ll have no qualms about setting bans on IP and email address. Anyone who has a good track record will get a warning and then bans set up for time periods proportional to the disrespect (I am the judge).

So it should be simple to be able to continue to post here. Just re-read your post before submitting it and ask yourself if you would get worked up receiving it and you’ll be fine if you decide to delete or reword any that do.