flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
xpeter
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 |
|||||||||||||||||||||
![]() |
|
LocoDelAssembly
I liked it very much
![]() ![]() Would be possible for you to upload the source code too? Thanks and welcome ![]() |
|||
![]() |
|
vid
Looks nice, just a little slow action, and window placement should be in the middle of screen.
Nothing beats Supaplex, though... |
|||
![]() |
|
rCX
Great work. It's a little difficult but fun
![]() |
|||
![]() |
|
Picnic
Looks very nice game xpeter congratulations.
Unfortunately it runs very slow on my machine and i can't enjoy it. |
|||
![]() |
|
Madis731
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 ![]() ![]() |
|||
![]() |
|
xpeter
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 |
|||
![]() |
|
Coddy41
Cool
![]() |
|||
![]() |
|
SFeLi
xpeter, is it possible to get rid of GdiTransparentBlt making it work in 98?
|
|||
![]() |
|
xpeter
Hi SFeli,
that's not possible. |
|||
![]() |
|
LocoDelAssembly
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,\ ; D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4,\ 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4,\ 4, 4, 4, 4, 4, 4, 1, 1, 1, 4, 4, 4,\ 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4,\ 4, 4, 2, 3, 2, 3, 2, 3, 2, 3, 4, 4,\ 4, 4, 2, 3, 2, 3, 2, 3, 2, 3, 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, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0,\ 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 0, 4, 4, 4, 4, 4, 4, 0, 0, 0,\ 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0,\ 0, 0, 4, 4, 4, 4, 4, 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. |
|||
![]() |
|
xpeter
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 |
|||
![]() |
|
LocoDelAssembly
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. |
|||
![]() |
|
xpeter
yes i know,
it was only a reflection about the kind of making bitmaps. sorry, for the misunderstanding. |
|||
![]() |
|
xpeter
Hi,
new entry here! Peter |
|||
![]() |
|
rCX
@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! |
|||
![]() |
|
LocoDelAssembly
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 ![]()
|
||||||||||
![]() |
|
revolution
LocoDelAssembly wrote: I think I'll kill your expectations right now. |
|||
![]() |
|
AnonyZhang
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... |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.