I am currently working on a port of WAtomic (http://watomic.sourceforge.net/). I'm using the same levels and graphics. Check out a screenshot:
The core game is basically done. You can download it here: http://members.cox.net/msikora2/AtomicBeta.rar
I included LUAPlayer v 0.11 as well, because with later versions it does not work correctly (it is too slow and it doesn't blit transparent images). And that is my question - why are my transparent images not displayed and why is the slowdown so bad (I am displaying only 6 sprites at a time)? Also, does sb have a source of LUAPlayer v 0.11, so I can release a standalone version?
I would also appreciate any suggestions concerning the gameplay, layout, etc. Right now, the player can access any of the 83 levels (that's how WAtomic/KAtomic works), but I'm thinking, it would be more rewarding for the player to work his way to the higher levels, and each level would have a time or number of moves limit (or both), that would have to met in order to advance.
Plans for later versions:
-changes in gameplay
-much more extensive menu (including player profiles, options, etc.)
-custom bitmap fonts
-possibly improved graphics and backgrounds
-sound
-music
-UNDO function
-compatibility with newer versions of LUAPlayer
-...
Please, give me your suggestions, I'd love to release a really polished and enjoyable game.
Note to webmasters: PLEASE don't release this game on general PSP websites yet, this is only a beta and I'm planning to make major changes in the final version, which is coming soon. I'm posting it here to only get suggestions from the LUA developing community.
Atomic for PSP (beta)
Moderators: Shine, Insert_witty_name
Re: Atomic for PSP (beta)
Nice game. I have no problems with Lua Player 0.15. But this is a good example for using timer based blits. If the game is getting more complicated, you can't be sure to do everything within 1/60 second, including game logic etc. For your game I don't know, why it is so slow, perhaps you should buffer a bit more or count your number of blits again (your code looks a bit long winded, so I didn't analyze it in detail), but these are the changes for rewriting it to a timer based animation (works with Lua Player 0.15) :
The full source code: http://www.frank-buss.de/tmp/atomic.lua
Code: Select all
$ diff -u index.lua index2.lua
--- index.lua 2005-12-03 09:46:50.720753600 +0100
+++ index2.lua 2005-12-03 20:40:25.515625000 +0100
@@ -6,7 +6,7 @@
-animeSpeed=4.5 --Speed in pixels per screen refresh, number should divide 18 (e.g. 4.5: 4.5*4=18)
+animeSpeed=1/3 --Speed in pixels per millisecond, can be every value
CenterX=240
CenterY=136
@@ -1598,10 +1598,10 @@
if items.animate~=nil then
- items.animateProgress=items.animateProgress+animeSpeed
local val=items[items.animate].val
+ local progress = items.animateProgress:time() * animeSpeed
- if items.animateProgress>=(items.animateLen*18) then
+ if progress>=items.animateLen*18 then
local x=items[items.animate].x-1
local y=items[items.animate].y-1
@@ -1618,19 +1618,19 @@
local y=items.oldy-1
if items.animateDir=="up" then
- aBuffer:blit (18*x,(18*y)-items.animateProgress,level.atoms[val])
+ aBuffer:blit (18*x,(18*y)-progress,level.atoms[val])
end
if items.animateDir=="down" then
- aBuffer:blit (18*x,(18*y)+items.animateProgress,level.atoms[val])
+ aBuffer:blit (18*x,(18*y)+progress,level.atoms[val])
end
if items.animateDir=="left" then
- aBuffer:blit ((18*x)-items.animateProgress,18*y,level.atoms[val])
+ aBuffer:blit ((18*x)-progress,18*y,level.atoms[val])
end
if items.animateDir=="right" then
- aBuffer:blit ((18*x)+items.animateProgress,18*y,level.atoms[val])
+ aBuffer:blit ((18*x)+progress,18*y,level.atoms[val])
end
end
@@ -1817,7 +1817,8 @@
items[i].y=y
pointer.x=x
pointer.y=y
- items.animateProgress=0
+ items.animateProgress=Timer.new()
+ items.animateProgress:start()
end
--FieldBlit () --DEBUG CODE