Thursday, October 19, 2006
Read an interesting article on sitepoint, its old in internet time, dating back to july of 2006.
It brings up the idea in dynamic languages on what one should do in the case of errors and how some dynamic languages handle it. Perl and PHP ignore the error and keep going, silently corrupting data while Python and Ruby halt execution and spit out an error message.
I decided to do the same test code in Lua, translating the ruby into Lua.
Its nice to see that it falls along the same lines as Ruby and Python and spits out an error message then halting.
names = {
{ first = "Bob", given = "Smith"},
{ given = "Lukas"},
{ first = "Mary", given ="Doe"},
};
function printName(name)
print("Name is " .. name.first .. " " .. name.given)
end
for x,y in pairs(names) do
printName(y)
end
and the runtime output is;
C:lua5.1>lua5.1.exe x.lua
Name is Bob Smith
lua5.1.exe: x.lua:9: attempt to concatenate field 'first' (a nil value)
stack traceback:
x.lua:9: in function 'printName'
x.lua:13: in main chunk
[C]: ?
Lua unfortunatly (imo) likes to co-erce things into strings and numbers when it can without explicitly being told to do so. lua
Posted by
Stu on 10/19 at 09:42 AM
Permalink to this post.
Filed Under :
Development •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Wednesday, October 18, 2006
The main map now draws correctly, with the player centered on screen! basic scrolling (as long as you stay in the current segment.)
Need to add code to scroll the segments and load in new segments into the buffer.
Posted by
Stu on 10/18 at 06:51 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Friday, October 13, 2006
So I am testing my game on the gp2x and wondering why its quitting all the time....
only the SDK has the X+Y button enumerations reversed! ack..
fix. recompile..... wooo it goes all the way through to the map now! sweeeeeet.
boy did it piss me off tho esch.
Posted by
Stu on 10/13 at 07:42 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Thursday, October 12, 2006
So now I can see my game on the actual gp2x screen… I’m going to reduce the font size _again_..
We went from big, to small to really small.. now I’m doing super-small
I will also downgrade the psp from small to real-small..
currently;
pc - large
psp - small
gp2x - really small
future
pc - large
psp - really small
gp2x - super small
At least now I have a physical device to work with and I can see how things look on its lcd without having to guess…
Posted by
Stu on 10/12 at 08:48 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Got my gp2x yesterday. Had to mangle my build instructions to get a cross compile working but I have it!!
So far it shows title screen, goes into main menu and dies. Bad thing is that it does not output its stderr.txt logfile that SDL on windows produces. I think I need to specifically open and map to stderr in this case.
It was kind of exciting to see my logo and such come up on the screen first go!
Posted by
Stu on 10/12 at 08:02 AM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Monday, October 09, 2006
Story boxes now work. Those clickfests that print text on the screen that your supposed to read but nobody does. Yes those things.
Posted by
Stu on 10/09 at 09:20 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Sunday, October 08, 2006
Ordered my gp2x last night while liksang had a 50$ discount going on them.
Also have my map displaying on screen! Now I realise I need to have the bordering segments in memory for it to work, so thats what I am trying to implement today..
also want to implement scrolling around map etc.. not sure how far I will get today..
Posted by
Stu on 10/08 at 02:04 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Sunday, October 01, 2006
Character generation is done ‘enough’ to get me up to playing the game. Now I need to work on some map loading.
I have 64 map segments (8x8). each segment has 32x32 tiles (the overland map is 256x256) for 65536 tiles. Each segment is 1kb.
For the time being I will do a little basic re-engineering to load only the currently occupied segment into memory, I am not yet going to worry about handling the immediate 9 segments around the current one.
Its mostly there to put a test dump of the map onscreen which is nice.
Posted by
Stu on 10/01 at 08:32 PM
Permalink to this post.
Filed Under :
Computers •
Development •
Fishguts •
Comments are closed
There are no comments on this entry.
Linked To by (0) blogs. Get a
Trackbacks link here
Page 1 of 1 pages