Saturday, April 28, 2007
Between ‘work work’ today I added back in GP2X support on the new open2x toolchain.
Had to do some hacking to get everything to build on amd64 and work on the 32bit arm (some of the script bytecode was not being saved/loaded and correctly sized).
It was nice to see the new tile graphics running on the GP2X
I altered my original button layout to be a bit more GP2X friendly. Clocked it down to 133 and its running just fine. 100mhz seemed a bit slow btu that could have been my delay’s to give clock ticks back to the system being too long.
The map scrolling works very nicely too, (currently there are no diagonal movements so it only ever has to load 3 segments at once), with each segment at 127bytes and the largest at 300 bytes (obviously compressed), this makes loads pretty quick, enough not to make the system stutter anyway. New map loads are a bit more involved since each map has a tileset etc and you need the initial 9 segments (unless its a town which might not have 9 segments to start with).
I took some pics of the game running on the GP2X since I thought it would be nicer than some really tiny 320x240 pics but the gp2x screen keeps reflecting back on the camera even when no flash is used, so screenshots will have to wait..
Also drew a new player character, which is much improved over my original white stick figure.
Oh… I also animated the shallow water + water tiles and frame limited it to 10fps, but I will test out on the GP2X to see if I can get it at 25fps nice and smooth. Mostly I want to work out a nice FPS rate vs clock rate, since I want to keep the game clocked low (around 133mhz) to lessen battery drainage, since an CRPG is supposed to be played for long periods…
Which is a nice segue into save states. I’m not doing the console thing where you only get to save at certain points, you will be allowed to save anywhere on the overland map but not in towns or dungeons. There will be only 1 save slot tho (at present).
Ive also been thinking about the transact screen. Since when you transact with someone it replaces the map screen you in affect stop time, I will have the game eat X time for each question asked etc, not asking questions is like sitting on the stats screen. I may dynamically clock those screens down to 100mhz or so and pump it back up for map screens.
I just about abandoned by KISS principal for the first game and went with a more ultima reagent magic system but abandoned that idea, maybe for the sequel. I need to keep a simple magic system (aka some preset spells).
Also did a tweak to tile + font blitting. Because I am using 24x24 tiles, they don’t quite fill to 32x240, so I’ve nudged the horizontal offset and for psp, nudged the vertical offset and it all looks good
I still need to do the LOS, and as I keep saying, it should be easy I just have to drop my code in from my roguelike.
Posted by
Stu on 04/28 at 06:12 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Wednesday, April 25, 2007
A few weeks back I changed SDLRL/CNC over to use a facing los. The game has always been using facing internally but never made it known externally. Now you can only see in front of you (in any of the 8 directions) which makes game play a bit interesting since you cant see behind you in the LOS to see whats sneaking up on you as your sneaking up on something else.
Im debating if I will keep it but the more I play the more I like it. Its certanly made a big difference to gameplay style for such a minor change.
Right now you get less than a full 180 cone, its probably like 160 or 175 (its hard to approximate with ascii).. Anything less becomes very restrictive, too restrictive for gameplay really… Im still tweaking the diagonals, which are giving less than what I want but…
Got a few more bugs to fix before an 0.2 release comes about…
Posted by
Stu on 04/25 at 08:07 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Cracks and Crevices •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Monday, April 23, 2007
Mmm events now fire inside the scripts. A little abstracting and some cleanup and its all working very very nicely!
This weeks todo list if I have time;
- LOS
- Better player sprite (currently its a plain old white stick figure)
- Animate water tiles
My largest all at once memory usage is still at 376kb! I think thats quite good for the current state of play.
Posted by
Stu on 04/23 at 09:06 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Sunday, April 22, 2007
Got my main stick figure temporarily running around on screen, but my next problem is that scripts are single fire, they load, exec and stop. Right now I need to somehow tie the events in the script so it does not fall out of memory after execution.
blah.
Hopefully it wont be too difficult, I just have to abstract out switching from one map to another (which event wise is already taken care of).
Posted by
Stu on 04/22 at 06:20 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Saturday, April 21, 2007
Well back in February I got some disk images that had
- Hulk version TI/128.2
- Spiderman version TI/001.0
- Buckaroo Banzai version TI/229.1
- Sorcerer of Claymorgeu Castle version TI/127.4
These have been converted with the Tex-Comp editor, so I’m not 100% sure if Scott wrote them or if someone converted the TRS80 game files (they would have needed knowledge of the TRS80 format back then)..
Anyway, I now am required to test them against Bunyon… more news later.
Posted by
Stu on 04/21 at 08:46 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Bunyon / ScottCom •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
It was so beaut out tonight I grabbed all my seeds and headed for the garden.
- small area of corn (about 3ft by 5ft)
- block of october beans (3ft by 4ft)
- block of soya beans (3ft by 4ft)
- half a row of leeks (prolly about 8ft)
- half a row of tomatoes (not the good ones since they all died grrr).. about 8ft i think.
Saturday or Sunday I’ll do my flat of orange bell peppers
fingers crossed we dont get any more frosts or snow and the blighters might survive…
Now I just need to keep my eye out for the bloody groundhog…
my 16ft row of potatoes hasnt popped up yet.. mmm.
lets also hope the deer stay out of the garden too… Now if joy would just let me get that franchi 20gauge shotgun… i could play some sporting clays and take care of the ground hog and deer…
I have 3 planter boxes to put on the deck which will have
- parsley
- spearmint
- peppermint
- basil
- rosemary
we also have sugarsnap peas growing on the trellis of the deck
some watermelon out the front (hasnt popped up yet so I think that may be a loss).
I still have green beans and carrots to put in the ground but green beans will need support and thats some messing to do to get it to hold/stay up…
I also need to make more homemade yoghurt today
busy bsuy busy
Posted by
Stu on 04/21 at 11:24 AM
Permalink to this post.
Filed Under :
Gardening •
Commented on by (0) people. Read or Post
Comments Here
Monday, April 16, 2007
Ive got my scripts calling other scripts so I separated out my globals code to make it much more easily replaceable, and my loader now looks first for an external file then loads the packaged version as backup. This way I can drop in a patch script or replace a specific graphic or script etc.
Ive also changed its external pathing, this way on say GP2X, the executable can be in the root of the SD card, making game navigation much easier.
Right now, loading up and running scripts, its using only 370kb max memory with debugging on which is good considering thats navigating around the entire world map with scripts and such. I’m sure there is a little waste in there somewhere, but I was quite surprised at its minimal consumption.
My todo for the next few weeks, time depending…
- Convert my octagonal LOS code from my roguelike (nice because its already integer based, no floats here!)
- Draw some enemy sprits (at least 2 or 3 frames each).
- Animate water (Since they are cyclical tiles, I’m just going to move them down two rows of pixels and do it easy)
- Have my sprite walk around on the map obeying walk/nowalk tiles (links to LOS code, and by proxy by doing LOS I get this free)
Since I am trying to keep memory down I’ve added some script commands making map loading re-entrant, so when each map loads it will call to load a specific tileset.
I’m debating if I will have my town maps drawn in ascii and loaded by the controlling town script, or if the town script will load a bitmap image and deal with it like the main map. The downside to loading ascii via script is I will need a new set of scroll/draw routines apart from the main handler. The downside to having a bitmap like the overworld is I’d be forced into having my maps an arbitrary size of 32x32 chunks (which I can offset easily).
I’m leaning more for reusing my overworld code and making bitmap images of chunks for each town even tho I like seeing the townmap inside the script.
Posted by
Stu on 04/16 at 08:23 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (3) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Thursday, April 12, 2007
I really badly want to like D. I also really badly want to use it and play with it. Right now its 32bit and x86 only (gnu-d is still quite well b0rked in this regard).
So I was looking over the release notes for D from Digital Mars after I saw a release announcement and one line stood out like a sore thumb.
Added std.string.isEmail() and std.string.isURL()
Hello bloat, Come on down!
Yes Digital Mars have already started to screw up the ‘standard library’ with useless bloat. Really, if I need a function to tell me if a string is an email address or not, and I cant write a dumb regexp for it, I shouldnt be programming. isEmail and isURL are not the kind of functions that need to be in the standard library. Whats next? math.isRomanNumeral()? std.string.isBibleVerse()?
I look forward to seeing what other bloat will be added in the next point release.
Posted by
Stu on 04/12 at 11:59 AM
Permalink to this post.
Filed Under :
Development •
Commented on by (0) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Wednesday, April 11, 2007
Brave New Traveler has a post up about your 5 funniest travel photos with you in them or taken by you…
here is mine…
Hiking the Appalachian trail in a kilt, requires some river crossings… The water COLD and I had nothing on under the kilt, and even hitched it up to cross (this river got deeper than the photo shows).
Did I say it got cold and there are parts of the body that dont like the cold???
Mmm I shot an entire bottle of Lagavulin 16yo whisky.. Lagavulin is probably the second most smokiest whisky you can get. I dont remember this night at all.
We stayed in a ‘not the best’ neighborhood in London. Someone firebombed the car opposite our place and the first thought is ‘Grab the camera!’
I love this photo for the expression on the guys face in the front row, on the right. This was a sevens tournament at Twickenham with the kiwi teams Hakka.
All the others guys are like ‘GRRRRRRR’ and he is all ‘Oops something ran down my leg!’
The “free” washing machine at the backpacker hostel that’s magically stuck on ‘super hot’ turns all your whites to blue! Wait, did my denim jeans shrink too? doh!
Posted by
Stu on 04/11 at 08:15 AM
Permalink to this post.
Filed Under :
Life •
Commented on by (2) people. Read or Post
Comments Here
Linked To by (0) blogs. Get a
Trackbacks link here
Monday, April 09, 2007
So bazaar has been working fine for me (0.15) and I can push to my host via sftp and all is sweet… Only I cant push from work, no ssh/sftp ports open.. :(
Which begs the question, to which I am debating…
Do I payup my subversion hosting (which I had expressly for just usinb SVN since my host doesnt run svn server)… or do I convert all my svn to bzr? and pay one less hosting fee?
I think I will archve my svn repo and just migrate to bzr. It would be nice to convert my repo with svn2bzr, my because my svn host restricted me to 1 repo, all my projects are in there by directory, rather than 1 project per directory, and I dont really want to convert everything into 1 huge bzr repo.
I should be able to pass in the bottom level project and have svn2bzr pull only that out to a new repo, so I guess I can do some testing tonight and see whats what…
Posted by
Stu on 04/09 at 10:48 AM
Permalink to this post.
Filed Under :
Development •
Commented on by (0) people. Read or Post
Comments Here
Friday, April 06, 2007
I have been converting my roguelike state system over into Fishguts. All game state is internally in C code. Any state in the lua scripts is local and destroyed on each script close/open. All memory is addressed via handles, so I’m not dealing with pointers.
Saving and Loading state is eachived by dumping the memory manager, which is nothing but a list of ID’s and memory blocks. All memory is addressed via its ID.
short lived objects can be put into lua userdata and get GC’d nicely
copy ~/svn/sdlrl/trunk/memhandle.[ch] .
done!
Posted by
Stu on 04/06 at 01:50 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (0) people. Read or Post
Comments Here
Been working over the talk tree. Apparently Ultima 4 had each character have only two things they could say, and each location had a limit of the number of characters. Each keyword you typed was also restricted to 4 characters. (Its like a bad Scott Adams verb noun parser).
I think the smallest memory constraint I have to deal with is the GP32 has 8mb ram which should be plenty.
| Machine | Ram |
| GP32 | 8 |
| GP2X | 64 |
| PSP | 32 |
| DS | 4 |
| PC | n.a |
I dont plan on supporting the DS, and PC’s today have more ram than the game needs.
Anyway, I’m getting side tracked. I dont need to squeeze bytes in the same manner as some of these old games did (but I do need to be conservative). Realisticly it wouldnt have cost much more space wise to add some extra dialogue into U4.
The conversations will be keyword triggered. You (T)alk/Transact with a character, and they will say something. Internally these sentences have flagged words that get enabled in your dictionary. eg:
If Gumby says “I was once friends with Pokey”, Pokey might be a keyword. Until he says this sentence the Pokey keyword wont be activated, and if you ask about it it will returnfalse.
eg:
local talk_GUMBY = {
name = "Gumby",
sex = "it",
greet = "Hi I'm Gumby. Lets be friends!"
keys = { 1 } -- 1 for friends
data = {
{
key = { 1 } -- 1 = word for "friends",
good_result = "I once had a friend called Pokey",
good_keys = { 2 } -- 2 = word for pokey
},
{
key = { 2, 3 }, -- 2 = pokey, 3 = hate
good_result = "Yep, I hate pokey now.",
bad_result = "Who? I dont know, but I'd love a lemonade, fries or icecream",
bad_keys = { 4, 5, 6 } -- 4=lemonade, 5=fries, 6=icecream
},
{
key = { 4, 5, 6 }, -- any of 4, 5, or 6
good_result = "Mmmm " .. GetTransactionWord() .. ". That would taste great right now.",
bad_result = "No thanks, I'm not interested in " .. GetTransactionWord() .. ""
}
}
}
The above is a contrived example of my talk data structure. Keys are keywords that are boolean on or off. When you first talk to Gumby, he will issue his ‘greet’ and the system will activate the keyword for friends. When you ask Gumby about ‘friends’, he will give you his pokey keyword. If you ask about pokey before you ask about friends, Gumby will pretend he does not know Pokey anf give you a different track on icecream or fries or lemonade. If you ask about lemonade.
Every action can have a good response with good keys or a bad response with bad keys.
Before the lua code generate is run it looks like this
char "Gumby", "it"
greet "Hi I'm Gumby. Lets be |friends|!"
key "friends"
give "I once had a friend called |Pokey|"
key "pokey", "hate"
give "Yep, I hate pokey now."
bad "Who? I dont know, but I'd love a |lemonade|, |fries| or |icecream|"
key "lemonade", "fries", "icecream"
give "Mmmm %1. That would taste great right now."
bad "No thanks, I'm not interested in %1"
Code Generation is good. Lua’s global string table is good, since there is only ever 1 copy of a string in memory, so no memory is wasted on duplicate string space. I could even optmise the codegen more to pullout the most frequently used words but that would be minor minor space savings at a cost of increased code size, plus scripts are localised, the script for Town X is only loaded when you are inside Town X.
One change to my codegen I would like to make is to allow for synonyms so this;
bad "Who? I dont know, but I'd love a |lemonade|, |fries| or |icecream|"
would become this
bad "Who? I dont know, but I'd love a |lemonade(soda,pepsi)|, |fries(chips,frenchfries)| or |icecream|"
giving synonyms (well extra keywords) to lemondate (soda and pepsi) and chips and frenchfries to fries.
This would auto expand keywords in the line
key "lemonade", "fries", "icecream"
to
key "lemonade", "soda","pepsi", "fries", "chips", "frenchfries", "icecream"
the knock on would be
bad_keys = { 4, 5, 6 } -- 4=lemonade, 5=fries, 6=icecream
being converted to
bad_keys = { 4, 5, 6, 7, 8, 9, 10 } -- 4=lemonade, 5=soda, 6=pepsi, 7=fries, 8=chips, 9=frenchfries, 10=icecream
This would cover 2 bug scenarios (keywords that are never given) and 2, keywords that are given across towns (global keywords). There will be a lot of keywords that are global but some most definatly shouldn’t be. I may prefix globals, so I can trap any that become globals that shouldnt be......
Posted by
Stu on 04/06 at 11:54 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Commented on by (0) people. Read or Post
Comments Here
Wednesday, April 04, 2007
With all the talk lately of bazaar-ng, I thought I’d take a look. I use svn all the time at home but I thought I would take a look at bzr.
Seems pretty nice, so I did a test and tried to push to my server… I can ssh and sftp fine into my server but bzr kept giving me permission denied. I went on with sftp and created the directory, chmod 0777 and still permission denied…
argh. whats going on… so I spent several hours repeating the same trick..
when I sftp in, I’m by default in my homedir…
bzr seems to put me in the root! so sftp://blah/dir was looking for /dir.. NOT ~/dir! doh…
so when I realised that I just threw in a ~ and it all worked ok… now its a shame my work blocks port 22 :(
It does seem a bzr push is a lot slower than a svn commit for a completly new repository.
I just need to learn a little workflow.
I’m used to doing
svn up
blah
svn ci -m “blah”
(I also love the fact I can sftp push to my host and not pay extra hosting fee’s like I currently do with svn!)
Posted by
Stu on 04/04 at 09:42 PM
Permalink to this post.
Filed Under :
Development •
Commented on by (0) people. Read or Post
Comments Here
I’ve been doing some minor alterations on Fishguts for the GP2X, I’ve changed a lot of my design and goals, and in doing so have gutted out all non-pc support, but don’t fear, GP2X + PSP support will be added back in.
I want to work to get a nice basic CRPG going (Its going to be very Ultima II + Ultima III style), this greatly simplifies combat (I envision Fishguts II to go party mode).
I’ve got some more code tools written in the process. I’m doing a lot of prebuilt data now, rather than have a cellular automata create random dungeons all the time, I’ve take that processing out and I am going to build a collection of about 256 random maps (256 of small maps, 256 medium, 256 large, 256 narrow+long, 256 short+wide), with my encoding + compression they are tiny, but it takes the pain out of the CA construction then doing flood fill testing for connectivity from entrance and exit.
I also have some tree conversation data in my scripts that my conversation and map compiler will turn into nice valid precompiled lua code.
This stops short circuiting and going from A to Z and asking about X, since unless someone tells you about X, Z will feign ignorance about said topic.
Take for example, digging for exotics in Ultima III, once you know where they are, you can always dig even if you have not talked to the people who have give you the clues to the location.
By ripping out the GP2X code I will get a good PC interface, then I can do a separate GP2X/PSP interface. Right now its a GP2X interface on a PC which does not work well/intuitively.
I need to work on some more tile graphics first, I’m going to add some more varied things (bridges, etc) and some other stuff. I’m thinking of going back to black backed tiles so there is a more uniform look to the maps than have water an entire blue tile, that makes everything very blocky/chunky and squarely defined.. This means redoing all my tiles.
Posted by
Stu on 04/04 at 02:31 PM
Permalink to this post.
Filed Under :
Computer Gaming •
Development •
Commented on by (0) people. Read or Post
Comments Here
So the garden has been tilled, and cleaned up. Potatoes are ready to go in the ground but we are supposed to get freezing rain on Saturday :( so I cant plant them yet.
We put the edge bricks down last night, now Joy just needs to get some of that black material that stops weeds and then we throw mulch down, and the front garden will be all nice and done!
Posted by
Stu on 04/04 at 02:12 PM
Permalink to this post.
Filed Under :
Life •
Gardening •
Commented on by (0) people. Read or Post
Comments Here