Recent Posts

Pages: [1] 2 3 ... 10
1
MasmBasic & the RichMasm IDE / Re: my 100% Assembly game development
« Last post by felipe on Today at 07:22:50 AM »
From the same file (stuff.inc):

Code: [Select]
mUnroll9lines MACRO
; 9 lines combo
      invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
invoke TextOut, hBufferDC, 0, ebx, [map.mapLinePtr + edi * 4], cWIDTH       ; prints to buffer   <== find a register
      add ebx, 10
      add edi, 1
endm

Unless you want to use the CF it would be better to use INC edi (just a suggestion).   :icon14:
Btw if you don't want more suggestion from me i can shut up with no problem.  :greensml:
2
MasmBasic & the RichMasm IDE / Re: my 100% Assembly game development
« Last post by felipe on Today at 06:59:04 AM »
I found this macro in one include file (stuff.inc) of the version 814:

Code: [Select]
RGB macro red,green,blue
           xor eax,eax
           shl eax,8
           mov ah,green
           mov al,red
endm

Check that, is not well defined (only a suggestion btw  :icon_mrgreen:).

 :icon14:
3
MasmBasic & the RichMasm IDE / Re: my 100% Assembly game development
« Last post by felipe on Today at 06:30:32 AM »

New version attached. Collision detection: Now bullets kill you, and crashing onto enemies kill you too...


This version crashed, in an espectacular way, in my system (The whole system collapsed by a moment).  :biggrin:
Maybe because i was using youtube too and listening music? Maybe too little RAM in the pc for it?  :redface:
It happened after a little time i started to play.  :icon_exclaim:

But looks nice!  :icon14: I guess it will be good to a big game like this to include some basic setting's detection in the pc of the players to see if they can play (requirements to play) and also to adjust the window to the screen. I actually use a netbook and the window don't fit too well in the screen.
Thanks for sharing some code  :t, i will check it and i will try the new version that you attached too.  :icon14:
4
The Campus / Re: Download a file from the internet
« Last post by aw27 on Today at 04:29:59 AM »
Quote
The learning curve will be steep
Every kid can learn VB Net in a few hours.  :icon14:
I like to know a bit of every programming language, but am not into those that try to do everything for me.
BTW, I found that Sleep is System.Threading.Thread.CurrentThread.Sleep
On the other end you can hang a Forms application with long sleeps. What I use to do in other programming languages is a small sleep followed by an instruction to pump the waiting messages. This is probably doEvents in VB Net.
5
The Campus / Re: Download a file from the internet
« Last post by jj2007 on Today at 04:10:32 AM »
Quote
Btw that doesn't look like good programming practice. Shouldn't there be at least a Sleep(1) inside?
Yeah, but I could not remember how to say Sleep in VBNet-ish.  :lol:

The learning curve will be steep, but you are still young, so we are all optimistic :icon14:
I will start programming in pure VB.Net  in 2018 :badgrin:

P.S.: Just tested my download snippet in Win10 home, it builds & works like a charm. Normal user account, it doesn't even warn me - I am always impressed how easy it is to download stuff in Windows. No wonder people catch viruses :badgrin:
6
The Campus / Re: Download a file from the internet
« Last post by aw27 on Today at 04:04:13 AM »
Quote
Btw that doesn't look like good programming practice. Shouldn't there be at least a Sleep(1) inside?
Yeah, but I could not remember how to say Sleep in VBNet-ish.  :lol:

7
Hello
Recently I found a problem with the "invoke" error detection algorithm. It seems that when passing subregisters, something went wrong, like in the following test case:


Code: [Select]
.xmm
option casemap:none
option dotname     
option frame:auto   
option win64:8     
option stackbase:rsp




.code


Test1 proc Arg1:QWORD, Arg2: QWORD
    mov r10, Arg1
    mov r11, Arg2
    ret
Test1 endp


start proc uses rbx
    invoke Test1, rdx, rcx
    invoke Test1, rdx, ecx
    invoke Test1, edx, rcx
    invoke Test1, edx, ecx
    ret
start endp


end start


Compiling this code should throw an error on each invoke line, but it doesn't.


Regards, Biterider

8
The Campus / Re: Download a file from the internet
« Last post by jj2007 on Today at 03:27:31 AM »
Quote
Then it gets stuck and hangs at 100% cpu load. Fortunately, it can be killed with Task Manager :icon_mrgreen:
@JJ
1- Imports System.Diagnostics is a default imported namespace in my VS 2017 installation and I swear that it is the first time I use VB.Net in 2017 and I have not changed anything.

Me swear, too, that I have not changed anything :biggrin:

Quote
2. If it gets stuck is because you are trying to make a Forms Application and my example is for a Console application.
       While stillDownloading
        End While
will not make a console app get stuck because Client_DownloadProgressChanged comes from a different thread and the download is asynch.

Console output:
Code: [Select]
0 %
0 %
100 %
Download completed

Doesn't look like a "Forms Application", whatever that is 8)

Btw that doesn't look like good programming practice. Shouldn't there be at least a Sleep(1) inside?
Code: [Select]
        While stillDownloading
        End While
9
The Colosseum / Re: Great news...
« Last post by hutch-- on Today at 02:10:13 AM »
Van,

Sheer necessity will make him a better cook, I am a truly lousy cook (my main experience is with an oxy torch welding) but if you want to eat, you learn how to make things you can eat. I am lucky here as a I have a stone age stomach that does not like anything fancy so I only need to produce simple things.
10
The Campus / Re: Download a file from the internet
« Last post by aw27 on Today at 02:00:30 AM »
Quote
Then it gets stuck and hangs at 100% cpu load. Fortunately, it can be killed with Task Manager :icon_mrgreen:
@JJ
1- Imports System.Diagnostics is a default imported namespace in my VS 2017 installation and I swear that it is the first time I use VB.Net in 2017 and I have not changed anything.

2. If it gets stuck is because you are trying to make a Forms Application and my example is for a Console application.
       While stillDownloading
        End While
will not make a console app get stuck because Client_DownloadProgressChanged comes from a different thread and the download is asynch.

 
Pages: [1] 2 3 ... 10