flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > game Goto page 1, 2 Next |
Author |
|
xpeter 07 Apr 2009, 22:12
Hi,
update version of puzzle game is done. The same rules as the old version. You can type your name now. Once you have written your name, press the return key ! With the Back Space key you can delete your name again, if it would incorrect written. best regards Peter
Last edited by xpeter on 15 Apr 2009, 17:40; edited 2 times in total |
|||||||||||||||||||||
07 Apr 2009, 22:12 |
|
LocoDelAssembly 07 Apr 2009, 22:44
I liked it very much Petty I can't play it for more time now
Would be possible for you to upload the source code too? Thanks and welcome |
|||
07 Apr 2009, 22:44 |
|
vid 08 Apr 2009, 00:03
Looks nice, just a little slow action, and window placement should be in the middle of screen.
Nothing beats Supaplex, though... |
|||
08 Apr 2009, 00:03 |
|
rCX 08 Apr 2009, 01:38
Great work. It's a little difficult but fun
|
|||
08 Apr 2009, 01:38 |
|
Picnic 08 Apr 2009, 15:16
Looks very nice game xpeter congratulations.
Unfortunately it runs very slow on my machine and i can't enjoy it. |
|||
08 Apr 2009, 15:16 |
|
Madis731 08 Apr 2009, 17:32
On my machine its right in the middle of the screen. I've got 2003 Server, what have you got, vid?
The process runs too high I think. I wish to see the main loop, I guess there are no sleeps/waits there. I'm very glad to see someone FINISH a project. I am famous for starting many, but not finishing any Sounds like a moto |
|||
08 Apr 2009, 17:32 |
|
xpeter 08 Apr 2009, 18:01
Hi ,
the puzzle game has a delay from 16 msec's. it runs very fine here on my computer ! [AMD ATHLON 300+]. i must still work on a adjustable framerate routine. if all was done with my work, i will send the game with high score table again to the forum! best regards peter |
|||
08 Apr 2009, 18:01 |
|
Coddy41 09 Apr 2009, 00:02
Cool
|
|||
09 Apr 2009, 00:02 |
|
SFeLi 09 Apr 2009, 12:18
xpeter, is it possible to get rid of GdiTransparentBlt making it work in 98?
|
|||
09 Apr 2009, 12:18 |
|
xpeter 09 Apr 2009, 16:24
Hi SFeli,
that's not possible. |
|||
09 Apr 2009, 16:24 |
|
LocoDelAssembly 09 Apr 2009, 19:22
It is actually, but it is not straightforward.
http://web.archive.org/web/20080105000448/http://msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_transblt.asp I have used the "black source method" and worked. I'll paste some of the code but not all since I plan to do so when I finish it (I'm not currently working on it now but I'll do in the future). Code: ; Bitmaps.asm robotBitmap BITMAPINFOHEADER sizeof.BITMAPINFOHEADER,\ ; DWORD biSize ROBOT_SIZE,\ ; LONG biWidth -9*ROBOT_SIZE,\ ; LONG biHeight 1,\ ; WORD biPlanes 8,\ ; WORD biBitCount BI_RGB,\ ; DWORD biCompression 0,\ ; DWORD biSizeImage 0,\ ; LONG biXPelsPerMeter 0,\ ; LONG biYPelsPerMeter 4,\ ; DWORD biClrUsed 0 ; DWORD biClrImportant db 255,255,255,0 db 0, 0, 255, 0 db 0, 0, 192, 0 db 0, 0, 96, 0 db 0, 0, 0, 0 align 4 robotBitmap.bits: ;;;; NORTH db 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\ 4, 2, 2, 4, 4, 4, 4, 4, 4, 2, 2, 4,\ 4, 3, 3, 1, 4, 4, 4, 4, 1, 3, 3, 4,\ 4, 2, 2, 1, 4, 4, 4, 4, 1, 2, 2, 4,\ 4, 3, 3, 1, 4, 4, 4, 4, 1, 3, 3, 4,\ 4, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4,\ 4, 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 4,\ 4, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4,\ 4, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4,\ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ;;;; MASK db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\ 0, 4, 4, 0, 0, 0, 0, 0, 0, 4, 4,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 4, 4, 4, 0, 0,\ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 Code: ; city.asm enterRobot:; EBX = Robot invoke CreateCompatibleDC, [globals.windowDC] mov [ebx+CityRobot.backBuffer], eax test eax, eax jz leonardoThreadProc.fail CBM_INIT = 4 invoke CreateDIBitmap, [globals.windowDC],\ robotBitmap,\ CBM_INIT,\ robotBitmap.bits,\ robotBitmap,\ DIB_RGB_COLORS test eax, eax jz leonardoThreadProc.fail invoke SelectObject, [ebx+CityRobot.backBuffer], eax test eax, eax jz leonardoThreadProc.fail mov [ebx+CityRobot.x], 0 mov [ebx+CityRobot.y], 0 call saveCity call paintRobot ret paintRobot:; EBX = Robot push esi movzx esi, [ebx+CityRobot.orientation] imul esi, ROBOT_SIZE*2 invoke BitBlt, [globals.backBufferDC], [ebx+CityRobot.x], [ebx+CityRobot.y], ROBOT_SIZE, ROBOT_SIZE,\ [ebx+CityRobot.backBuffer], 0, addr esi + ROBOT_SIZE, SRCAND invoke BitBlt, [globals.backBufferDC], [ebx+CityRobot.x], [ebx+CityRobot.y], ROBOT_SIZE, ROBOT_SIZE,\ [ebx+CityRobot.backBuffer], 0, esi, SRCPAINT pop esi ret And of course also exists the chance of just using a DIBSection and do all the work yourself. |
|||
09 Apr 2009, 19:22 |
|
xpeter 09 Apr 2009, 20:21
Hi LocoDelAssembly,
a bitmap creating in such manner is unusable for me. i have 400 bitmaps a. 32x32 ! what are you thinking when i am ready therewith ? your showing methode is no solution for a game ! i think, when your robot bitmap has an animation, let's say, sixteen phases then your pleasure will fall into a deep cellar ! best regards peter |
|||
09 Apr 2009, 20:21 |
|
LocoDelAssembly 09 Apr 2009, 20:46
It would be as simple as having two sets of bitmaps, those that are colorful and those that are just black and white.
My code was just to show how to blit, but you are not forced to have the bitmaps the same way I do, I posted just to show the color and monochrome mask thing. In the link I posted you'll see a method that can construct the masks from your bitmaps, I haven't used that because my bitmaps were too simple and I haven't got those bitmaps generated with Paint or whatever, just that assembly file. |
|||
09 Apr 2009, 20:46 |
|
xpeter 09 Apr 2009, 22:03
yes i know,
it was only a reflection about the kind of making bitmaps. sorry, for the misunderstanding. |
|||
09 Apr 2009, 22:03 |
|
xpeter 15 Apr 2009, 18:11
Hi,
new entry here! Peter |
|||
15 Apr 2009, 18:11 |
|
rCX 17 Apr 2009, 02:26
@xpeter
Thanks, this new version works much better on my XP system. The hourglass would always visible in the older version. @Loco hmm a city with robots sounds fun. I'm looking forward to its release! |
|||
17 Apr 2009, 02:26 |
|
LocoDelAssembly 17 Apr 2009, 03:12
I think I'll kill your expectations right now.
As you can see the graphics wont gonna be a big thing, the only improvement will be a different color for each robot, but not much else. Also not that it wont be a game neither, it is supposed to be an educative tool but I'll tell details later. (This is not Heap, this thread is for discussing xpeter's game )
|
||||||||||
17 Apr 2009, 03:12 |
|
revolution 17 Apr 2009, 03:16
LocoDelAssembly wrote: I think I'll kill your expectations right now. |
|||
17 Apr 2009, 03:16 |
|
AnonyZhang 19 Mar 2010, 14:05
It seems that it can't exit normally. but it's really good.
I'm a chinese, i want to make friends with you. I use the google e-mail usually, I've installed Gtalk on my computer. so i invite you all... |
|||
19 Mar 2010, 14:05 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.