Recently in Pocketcity Category

Slow composition

| No Comments
I have a set of hand written pages of the next 20-30 features to implement/changes to make to pocketcity in order to make it 1. better and 2. more easy to port. One of the things I'm planning on doing is moving the water pipes underground. This will change things quite a bit.
I'm considering getting a new laptop (again) and I've reached the point where the hardware that's available is reaching what I want. It needs dual-core processor; I'm not getting another uni-processor machine again. Acer have dual core centrino models, with a decent graphics card. The only problems are the DVD drive and the video card. It's a DVD-RAM drive. It won't region free! it's the same problem as the Ferraris. I don't want to re-code all the non region-2 discs I have. That would be a pain in the ass. The video card isn't supported in Linux either, which is another annoyance. I hope that ATI release a driver for the X1000 family soon.
Alternatives are Alienware and their Aurora m7700, which has an athlon processor. Has a more supported graphics card, but it's about twice as expensive as the Acer. Then there's the Widow PC laptop. Still the price tag problem.
Until I get a new laptop, I'll have to be happy with the one I have. It's an early generation centrino, so I've only got a/b wireless, and an integrated GPU. It works well for what I'm doing (programming, watching movies, occasional game).
Shame that Dell haven't caught up on dual core for the gaming laptop.
Well it seems to be a problem for me - I'd love to get more work done on Pocketcity, but these bloody episodes of CSI on UK Living (I used to work there) are distracting me horribly until really late at night.

Notebook

| No Comments
Tonight is the night to consider changing the simulation routines. Currently they are very hard loops being performed to issue the water and power around the map. It's guaranteed to work correctly, but it's awfully slow when the map becomes densely populated.
Ermmm, it's about midnight, I'm watching 'Lost In Translation'. I don't think I'm going to get much more musings done tonight.

Release, Complaints

Ok, I released the latest Pocketcity. It was just languishing.
Now on to the complaints, and how can I fix them.
1) I originally downloaded what was the "stable" version .17, and I had color. After running into some of the snags that I will mention below, I decided first to dowload the update which warned that it would have bugs. Well, I lost the color. I have a Tungsten T3 running on Palm OS 5.2.1. Actually, the color shows when I view the map, but the city is now in black and white. I tried deleting the game and re-loading the first "stable" .17, and I still have B&W. Patch available?
I don't think this exists in the 0.17 release version, it sounds like the user uploaded one of the -bw tilesets.
2) The tax rate doesn't seem to have any impact on the rate of development. I tested raising it and lowering it to see if population, factory growth, and commercial growth would (as they should) be stimulated when lower... no connection it seems. Here's one way to have a big bank account... raise the tax rate sky high! They won't move out! :)
True, the tax isn't influencing people. I still have to get the feedback loops working properly.
3) It doesn't seem to matter how many Military, Police, or Fire Stations I build... I can only have one unit deployed to fight monsters. 3a) I kept trying to get more units deployed because fighting them doesn't seem to kill them any faster than just letting them run their damage unchecked. I thought if I could deploy more than one tank, I could stop them. I also tried deploying one tank, and one police car... still no apparent effect except that they seem to sometimes divert course.
Unfortunately you need to surround the monster/fire to nullify it. I need to change them to area effect items.
4) Deploying a firefighting unit seems the surest way for the fire to spread. Instead, I learned to pause the game and bulldoze all around the fire and just let it burn out. Early attempts to use the fire fighting unit ended in exponential spread of fire.
Same problem as 3, it's not an area effect item.
5) Rate of development slows down a lot if I try to build a seperate "colony" further down the river. When the game starts, it's really cool to see it grow. I expected that adding the same config. a little further down or even accross from the river would yeild a similar rate of development. It seems as they are all tied in to a reduced growth rate once population hits a certain level.
This is the distribution algorithm acting up again. I'll have to re-work it to make it deal with this situation a little better.
6) Looking for ways to stimulate population growth. As indicated in item #2, Tax rate doesn't seem to stimulate. I tried trees and water, and no apparent stimulus there. Roads are a must, but after that, I haven't seen increased paces of development from the addition of PD's either. Thought more would move in with better police presence, etc...
Problems with feedback circuit.
[Listening to: Love Will Not Die - Deine Lakaien - (4:49)]

Today's bug

1120599 - Visor Prism Startup Crash
Based on the fact sheet from Palm one, we have the following details about a visor: it runs palmos 3.5.2, has a 16bit display, and when we start up pocketcity it crashes.
Well it doesn't seem to happen with the developer roms I have, which makes things a bit difficult.

More Bug repairs

Ok,
large numbers of the screen location/scaling bugs have been removed from the game - I was getting confused as to what elements were being kept in native coordinates and what were being kept in logical coordinates - the Palm platform doesn't make this terribly easy - for example if you want small text you need to cheat. It's easier to do things when you don't have to scale, but them's the breaks.
The next focus is on getting the 'nix port to work correctly with the new save-game format. Once that's been accomplished I'll work on getting the desires coded.

Desires...

With every cycle of zone development/reduction:
- if we don't have enough for commercial || industrial increase
the desires of residential

Normalize the desires every cycle?

Industrial | Commercial:-
need = (residential_value -
(commercial_value + industrial_value))

Residential:-
need = months * months / 35 + 30 - residential_value

Commercial:-
need = (industrial_value * 2 / 3) - commercial_value

I need to *visualize* this

Default Desire levels:
Evaluation 0 [it's normalized from -32000 -> +32000 ]
Residential 500
Industrial 250
Commercial 0

Scale goes from -512 to +512

Every time we try to promote and don't have enough of other elements to allow it to grow we should increment the desire level, every time it can grow we decrease the desire level. a +-512 scale should be sufficient.
I need to come up with a good layout for the desires - horizontal colored bars should be good.

beaming seems to work

Well, I seem to be able to send cities between different instances of the simulator. My next effort is sending them between real devices (mixed mode is the real trick).
It works when the applications are open, closed, rinning and non-running.

beaming - first draft is in

I've just commited the first draft of the beaming code. I need to test it, but I'm too tired to try it out tonight.

beaming

I've started work on beaming. Doesn't look too hard (famous last words).

packbits

I only need to save 2 of 8 bits from the world flags, so a small amount of compression is in order. The easiest thing to do is simply remove the other bits from the fields as it's put into the savegame database. turns a 10k structure into a 2.5k.

Wobbly scrolling - in progress

I'm still trying to fix the wobbly scrolling. There's got to be some way of doing this simply.

Ok, I'm checking the keystate with the KeyCurrentState() call while scrolling, it seems to keep the animation in check.

I've just got the minor problem of flickering in the minimap now (high resolution).

Potential Fixes:

  • Don't ever paint 'under' the minimap

  • Lose the minimap (not really an option)



Removing the paint-under for the minimap is an awkward one. For basic screen painting this requires preening the tiles that the minimap uses from the draw loop. The scrolling leads to an awkward problem. Previously the algorithm copied the entire screen up/down/left/right depending on the motion (memory prohibits a back-buffer).

In the interim, I'm allowing the toggling of the minimap in the configuration screen.

Minimap rendering correctly

Ok,
the rendering of the minimap correctly on scrolling works correctly. Now I have to fix the scrolling being sluggish.

The problem is that there is no key-up event on the palm.

Memory footprint has been reduced - I checked the code that was being generated and shrunk quite a few functions, and moved some functions to different sections as they were being called either once per execution, or very rarely. Not that anyone would really care about things like this except little old me.

tungsten problems still

Well, i tried with pilrc 3.2 and no luck.

Strange things on T3's

That's Palm Tungsten T3's - Turns out that whatever way the version of pilrc I am using does the resources, it is screwing up the contents of the string lists. From what I can tell it looks to be an alignment problem with the strings.
I'll get a later version of pilrc and try with that.

Power Consumption

It looks like the power consumption on 0.16 of Pocketcity is very high. I'm going to have to figure out why that is and work out how to reduce it. Someone complained about having used up 3/4 of their battery life after an hour, which is not good.

It's an M130 and doing a quick google shows me that it should have a typical battery life of 4 hours.

Translations

I just received an offer to translate the Pocketcity into Catalan; which I appreciate. He's mentioned that he'd like to have the .po files which tells me that I'm probably doing the translation of the application all wrong.

Currently I'm using the lang attribute of the .rcp files to split up all the separate languages that are used, and I realize that I could miss strings using this method. I have found that during testing I have missed strings so the ould is a bit of a misnomer.

Testing

This is the first test entry for the blog

Ok,

We have the X position:
- getMapXPos()

this is a fraction of the overall display:

(getMapXPos() / getMapWidth())
multiply by the width of the display.

Making sure to order them such that there is never a zero value
for the multiplication.

More palm5/6 woes

the high resolution support for the PalmOS5 is driving me nuts.

little new pieces of the API seem to appear every now and again that make older code stop working. The testing matrix looks like:

  • pre palmos 3.5 device
  • palmos 3.5 device
    • grey
    • color
  • palmos 4 device
    • grey
    • color
  • palmos 5 device (simulator)
    • 320x320 resolution
  • palmos 5.?? device (simulator)
    • collapsible display, reorientable display
    • 1, 1.5 and 2x resolution
  • palmos 6 device (simulator)
    • all the 5.?? matrix
It's quite a trek to make sure that it works in all the devices. I need to codify the testing matrix.

The distribution algorithm results in some silly output. There are times
where zones that are adjacent to power plants have no power.

I need to flag power shortages as well.

It looks like wasps find me sweet...

Font?

I need to use a smaller font for the default pocketcity UI. The 16x16 tiles
are using too much space.

Need to get the scroll bars working (and not lying).

Simulation routine seems more stable

It looks like I've got the simulation routine back under control.
For a while there all I had was downgrades happening. Turns out that
there was a sign error in one of the conditional statements making it
always terminate.

I still need to implement the linear vs. random zone thing for low occupancy.

Bad randomness in the system.

Fix the repaint rate for the linux game (use an offscreen pixmap). It bites
at the moment when I fullscreen the game (slow, juddery).

Lovely day at the office

I'm sitting at the trian station waiting for the dart home. It's been a long
day in the office. I arrived at just before 10am.

Things that happened today: I nearly fainted on the train coming into the
office. That cost me 1/2 an hour waiting for missing trains.

I got 2.6.3 working on my laptop. It just simply refused to boot. I forgot
to translate the modules.conf file into the modprobe.conf file. Aargh!

I've been getting it working under vmware too, I needed to build the vmhgfs
module. Rewrote the Makefile to be a 2.6 modules makefile. One fix in the
driver.c file (add a #define for NODEV) and it built and installed fine.

The only problem is that getting the interface status i.e. link up/down isn't
working so the ifup script wasn't assigning them IP addresses. A couple of
fixes to that (remove the link test) and it all worked perfectly. I should
probably fix the link test to work correctly, that way I can take the laptop
on the road again.

That's just about all the work related stuff I'm allowed to talk about the
rest is hush hush.

shells

dear god, I can't believe I ever managed to live without the z shell. It
is just screams 'feeping creature'. The filename completion is simply scary
the globbing is something from god.

Moo!

Build bugs

For some reason the building of the overlay zones on rail wasn't working.

Turns out that the code was missing. This looks like a CVS dodginess thing
in relation to the date/times.

Fixed. Now on to the scrolling problem.

I still can't reproduce it dadblast it.

river is missing at the top edge

The river is missing at the top edge of the graph. I've obviously got an
off-by-one error that's doing this.

I fixed it in the CreateFullRiver routine by specifying
k >= 0, instead of k > 0

Transparency

Transparency and GdkPixmaps.

Do I need to create a transparency mask for each of the map overlay types?
it seems as though I do.

Problems with 1.5 resolution display

1. Toolbar has too many icons. Need to make this customizable or else
split the toolbar into multiple choices (possible, bit difficult).

Text is not at the correct bottom of the display, and is not horizontally
at the correct location either.


13.28 -
- Fixed the text.

Support is now coded in to deal with multi-resolution displays. It can
handle single, sony high resolution and palm OS 5 high resolution displays.

More work is needed for 1.5 resolution displays. I will examine what is
needed to get them to work today.

Icons and rearranging them

Having spent a long time rearranging the tiles, I've still not added in any
of the elements that are animated. It's simply too much like rasterbating
for my liking.

The first plan is to export the current 256 color tile set out to both the
4 color and the 2 color for the palm devices (which is really irritating).

The 256 color icons export without any effort, it's just that the other
ones need to be color-reduced to make sure that the look OK.

http://www.palmattitude.org/logiciels/liste_logiciels.php?id_type=3&titre=Logiciels%20du%20type%3A%20Hacks

http://www.freewarepalm.com/utilities/keyclickhack.shtml

documenting the code.

Sitting on the sofa, tapping on the laptop putting documentation into the
game. Boy is it fun, as at the same time I'm watching the wonderful Kate &
Leopold. someone somewhere must be impugning my masculinity as a result of
this, but I really find it enjoyable.

I'm placing doxygen documentation into the application to make it easier to
navigate the source code. It is helping me keep up with the code.

The next objective is to improve the simulation so there is a better
relationship between the three primary zones. This will allow us to develop
the desire graphs.

Virtual key characters

Problems with the virtual key character mappings and buttons in the
Palm Simulator witht the virtual silk screen. They don't have a calculator
button, so we're in trouble with the 'Menu Popup' button being interpreted
as the Calclator Button.

The question is that under this system, when we're displaying the toolbar do
we need the extra build list popup?

Character list with 320x480 screen:
btn: 0 char: 00000110 - vchrKeyboardAlpha
btn: 1 char: 00000111 - vchrKeyboardNumeric
btn: 2 char: 00000108 - vchrLaunch
btn: 3 char: 00000105 - vchrMenu
btn: 4 char: 0000010A - vchrFind

Other Modes:
btn: 0 char: 00000110
btn: 1 char: 00000111
btn: 2 char: 00000108
btn: 3 char: 00000105
btn: 4 char: 0000010B - vchrCalc
btn: 5 char: 0000010A

The vchrMenu item is being interpreted (do'h)

Just to make it more fun, I got the palm SDK and it's got:
Double Density
btn: 0 char: 0000050D - undefined
btn: 1 char: 0000050E - ditto
btn: 2 char: 0000050F - ditto
btn: 3 char: 00000510 - ditto
btn: 4 char: 00000511 - ditto
btn: 5 char: 00000512 - ditto

on a Tungsten T3

Zire 71 helps here as it has:-
btn: 4 char: 00000108 - vchrLaunch
btn: 5 char: 00000105 - vchrFind
btn: 6 char: 0000010B - vchrCalc | (when set to go to calc)
btn: 7 char: 0000010A - vchrFind

Otherwise:
btn: 0 char: 00000110 - al
btn: 1 char: 00000111 - num
btn: 2 char: 00000500 - clock
btn: 3 char: 00000502 - bright
btn: 4 char: 00000108 Launch
btn: 5 char: 00000105 find
btn: 6 char: 0000010B calc (?)
btn: 7 char: 0000010A find

About this Archive

This page is a archive of recent entries in the Pocketcity category.

C/C++ is the previous category.

Find recent content on the main index or look in the archives to find all content.