Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Problem with click response....  (Read 6329 times)

0 Members and 1 Guest are viewing this topic.

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Problem with click response....
« on: September 29, 2013, 01:15:50 AM »

I am having issue getting the click response to work correcly. I have got the grid coordination of the mouse based on the dots 100% accurate using the X Hard and X mouse combination. Simply I have this code done like this below:

HX = X Mouse - X Hard (S,0)
HY = Y Mouse - Y hard (S,0)

The above code I get 100% accurate result of the mouse coordinate with the grid of the board. So when I move the mouse to the right and left I get the correct coordinate...now the intention is that when the user clicks on the dot, it causes a Bell 80 sound and then causes that dot to flash by changing the Ink to 3 color. Then the user cannot click anywhere else on the board because he have to click the second dot adjacent to the first click either right, left, up or down.

Now that problem is solved as well..but the problem I have is the responsive of the first click and then the responsive of the second click...sometimes I spend like 5 minutes click around the dot or on top of the dot and it does not work...other times I click on another dot on the board and it works but as soon as I click on it and then click on the second dot beside the first dot...it switches back to me clicking on the second dot twice forcing me to click on another dot adjacent to it instead of giving the user choice to click anywhere on the board. That is one problem. Other problem is that I cannot click anywhere on the dot freely on the board because some are response to the mouse click while other dots are not responsive to the mouse click at all...I am not so sure what to do about it.

Remember this project is for me to learn the scope of programming and getting my hand on practice..so this is the chance to see where I went wrong. I will post the code down below all of it...so you guys can try it out on your end:

Code: [Select]
Dim board(250, 175)
dim twoplotteddotsx(1)
dim twoplotteddotsy(1)
Ink 2
Screen Open 0, 320, 200, 16, Lowres
Colour 1, 0
Ink 2: Box 0,0 to 280, 190
For i=0 to 250 step 8
   for x = 0 to 175 step 8
       plot I+16, X+16, 2
       Board(I, 0)=I+16: Board(0,X)=X+16
   next x
next i

repeat
   hx=x mouse-x hard(s,0)
   hy=y mouse-y hard(s,0)

  if highlightthisdotx=0 and highlightthisdoty=0
     if joy(0)=16 and nowready=0
        if (HX>=16 and HY>=16) and (HY<=264 and HY<=175)
            if hx=board(hx,0)-16) and hy=board(0,hy)-16)
                    highlightthisdotx=hx:highlightthisdoty=hy
                    highlightthisdot[highlighthisdotx, highlightthisdoty,1]
                    twoplotteddotsx(0)=highlighthisdotx:twoplotteddots(0)=highlighthisdoty
                    bell 80
                    nowready=1
            end if
else if (hx<16 and hy<16) and(hy>264 and hy>180)
    ink 2
    text 90,198,"?INVALID ACTION!"
    wait 30
    text 90, 198,"                          "
end if
end if
else if joy(0)=16 and nowready=1
secondhighlighthisdotx=hx:secondhighlightthisdoty=hy
if secondhighlightthisdotx=highlightthisdotx+8 and secondhighlightthisdoty=highlightthisdoty and joy(0)=16
   highlightthisdot[secondhighlightthisdotx, secondhighlightthisdoty,1]:bell 75
   highlightthisdotx=0:highlightthisdoty=0:wait 1:nowready=0
else if secondhighlightthisdotx=highlightthisdotdotx-8 and secondhighlightthisdoty=highlightthisdoty and joy(0)=16
    highlightthisdot[secondhighlightthisdotx, secondhighlightthisdoty,1]:bell 75
   highlightthisdotx=0:highlightthisdoty=0:wait 1:nowready=0
else if secondhighlightthisdotx=highlightthisdotdotx and secondhighlightthisdoty=highlightthisdoty+8 and joy(0)=16
    highlightthisdot[secondhighlightthisdotx, secondhighlightthisdoty,1]:bell 75
   highlightthisdotx=0:highlightthisdoty=0:wait 1:nowready=0
else if secondhighlightthisdotx=highlightthisdotdotx and secondhighlightthisdoty=highlightthisdoty-8 and joy(0)=16
    highlightthisdot[secondhighlightthisdotx, secondhighlightthisdoty,1]:bell 75
   highlightthisdotx=0:highlightthisdoty=0:wait 1:nowready=0
end if
until joy(1)=16

procedure highlightthisdot[x,y,gothrough]
if gothrough=1
  plot x,y, 3
end if
gothrough=0
end proc

Sorry if there is any mistake in the code in AMOS side but I may have made some typo typing it here. Anyways, it should be working 100% if you type it in your end...I am having hard time getting the mouse responsive correctly when I click on the dots...I want the response to be smooth sailing and fast. I do not want it that I have to spend 20 minutes clicking on a dot and it does not work...or sometimes it works or other times it does not work or when I click it triggers twice forcing me to click on an adjacent dot instead of anywhere on the board and sometimes the adjacent works or not works.

I also want maybe this works faster and smoother to make the loop synch with the PAL mode in the Amiga (hack or not hack) and I do not care if the game refuses to run on NTSC Amiga that is not my concern...I want to implement this into my game and any future game in AMOS...can you guys help me on this?? Please...I need to fix the mouse response and get my games to synch on the lines of the TV screen in PAL mode...

thanks.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #1 on: September 30, 2013, 06:43:55 AM »

I think I am solving it..now the refresh rate (I think) synch with the screen and the click is almost instant. I tried it in NTSC mode and the game just freezes in black screen, in PAL mode and the game works 100%. I am happy!!  :D :D :D ;D ;D ;D. As soon as I am finished the game 50% where you can play against a human I will release a demo here just to get input in the matter...when the game is finished I will upgrade it with good appealing graphics and there will be a very smart computer AI to play against.
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Problem with click response....
« Reply #2 on: October 02, 2013, 07:26:37 AM »

Yep.  One gets into the habit of putting a Wait Vbl (for games) or Multi Wait (for 'productivity' apps) in input loops.  Otherwise the cpu processing the code doesn't give anything much of a chance to react to keyboard, mouse or joystick.  It's easy to forget that the Amiga was one of the first (successful!) multi tasking machines available to the public.  And all processes need a share or they don't get a look in.  I used to get great amusement from trying to run multiple processes on early WIntel boxes and watching them crash ;D .
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #3 on: October 02, 2013, 04:14:51 PM »

Maybe so......but the problem I have is regardless of Multi Wait or Wait Vbl the mouse responsive is still slow...very time consuming I might say.

Have you taken the code I have send you here in the forum and entered in your end and see what I am talking about? Perhaps you can shed some idea of why even after Wait Vbl or Multi Wait it is still very slow in mouse response?

Thanks in advance.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #4 on: October 02, 2013, 07:15:36 PM »

I discovered my problem. The problem I have is that the mouse pointer have to be in an exact certain point in the dot to take effect..that if it moves a little to the left and right there is a problem..and sometimes I have to refresh it by moving the mouse a round little bit then going back to the same exact point in the dot before the click takes effect. That to me is a problem.  Is there a demo of some sort where the mouse is clicked on a blob and that takes effect and triggers the event instead of me doing arrays and grids and having the mouse x, y on a certain point in the grid and blah blah blah....this is getting to be messy.

I have discovered another problem..when I Load Iff "image",0 that is 16 colors and the dots are on top of that image now the colors of the dots and lines are merged with the background image..what used to be a red, blue line no longer red or blue. But instead they are orange, and yellow similar to the color of the background image...if I use Ink and change any other color the color does not change..same orange and yellow color. 
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Problem with click response....
« Reply #5 on: October 03, 2013, 05:50:04 AM »

OK, here's a quick prototype that does what you need without the need for that huge array (175k !).  It uses the screen's pixels to do the work of the array instead.

I've used yellow to represent the background.  You wanted to use an IFF pic for the background so just make sure it doesn't use colours 0 thru 2.  Your original screen was 16 colours, I've expanded that to 32 so you should be able to adjust your picture's colours clear of the one used here.  Another way to do it is just use the original first 16 colours in the picture's palette and use colour numbers from 16 upwards for the ones that I've used (I knew I should have made the colour numbers variables  ;D ).

I've also made the dots bigger to make them easier to hit with the mouse and put a 1 pixel border around them to make them stand out from the background (and your picture):
Code: [Select]
'
'   These need to be global as they're referenced within
'   a couple of procedures:
'
'   Flag indicating a valid hit:
Global FH
'   Countdown timer for the "Invalid Action!" display:
Global DC

'   Hide everything until we've finished drawing:
Auto View Off
Screen Open 0,320,200,32,Lowres
Curs Off
Flash Off
Colour 0,$0
Colour 1,$FFF
Colour 2,$F00
'   This colour represents your background IFF pic, just don't use colours
'   0 thru 2 in the picture!
Colour 3,$FF0
Cls 0
Ink 1
'   Centres your rectangular play area:
XO=(320-256)/2

Box XO+0,0 To XO+255,167
'   This bar represents your background pic:
Ink 3
Bar XO+1,1 To XO+254,166

For X=0 To 31
   For Y=0 To 20
      X1=X*8+4+XO
      Y1=Y*8+4
      Ink 1
      Bar X1-1,Y1-1 To X1+1,Y1+1
      Ink 0
      Box X1-2,Y1-2 To X1+2,Y1+2
   Next Y
Next X
Auto View On
Screen Show 0
'   There MUST be a Wait Vbl before you use Limit Mouse!
Wait Vbl
Limit Mouse X Hard(XO+0),Y Hard(0) To X Hard(XO+255),Y Hard(167)
Paper 0
Pen 1
Ink 2
DC=-1
FD=True : Rem Flag for First Dot hit
Repeat
   Wait Vbl
   If DC=0
      Locate 10,23
      Print Chr$(7);
      Dec DC
   Else If DC>0
      Dec DC
   End If
   MC=Mouse Click

   If MC=%1 : Rem left mouse click
      X=X Screen(X Mouse)
      Y=Y Screen(Y Mouse)
      CP=Point(X,Y)
      If CP=1
         FH=False
         If FD
            '   First dot to be hit, so no fancy checks needed:
            Bell 80
            Paint X,Y,2
            FH=True
            FD=False
         Else
            X1=X-8
            Y1=Y
            If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            If Not FH
               X1=X
               Y1=Y-8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X+8
               Y1=Y
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X
               Y1=Y+8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               '   Right colour but no adjacent hit dots:
               Proc _MISS
            End If
         End If
      Else If CP=2
         '  Dot already hit
         Proc _MISS
      End If
   End If
   '
   '   Simple right-click to exit for this demo:
   '
Until MC=%10

Procedure _CHECK_HIT[X,Y,X1,Y1]
   '
   '   Check if the dot at X1,Y1 has been hit
   '   If it has, we're OK to set the one at X,Y
   If Point(X1,Y1)=2
      Bell 80
      Paint X,Y,2
      '  Set the hit flag to indicate no more checking is necessary
      '  Without this, you'd get a trill of bells!
      FH=True
   End If
End Proc

Procedure _MISS
   '   Chr$(7) clears to end of line
   Locate 10,23
   Print "Invalid Action!";Chr$(7);
   DC=50 : Rem Set the Countdown Timer for 1 second
   Boom
End Proc

Edit

If you have trouble copying the code to an Amiga, I've attached it as an *.asc file (zipped) as well.

Take note of the comments in the source.  In AMOS, there are some things that have to be done in the correct order or they don't work properly  ;) .

Hope this gives you something to work with.  Let me know if you need any more help.  It may take a while to reply as I'm in the middle of negotiating a house move, so be patient  8) .
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #6 on: October 03, 2013, 07:07:30 PM »

Bug report:There are couple of bugs in the code. One bug I can select the border of the screen and it becomes all red and now I am in trouble...second problem when I select a single dot in the screen I cannot select the right dot, I can select up, down, left but not right and sometimes right works and sometimes right does not work at all!

Learning questions: This code 100 times better than mine and the response is great thank you! I just have couple of questions I want to ask about the code for learning purposes...the code in the loop statement...

What is the function right underneath the Wait Vbl right here:

Code: [Select]
  If DC=0
      Locate 10,23
      Print Chr$(7);
      Dec DC
   Else If DC>0
      Dec DC
   End If

I do not understand what the command keyword Dec mean and what it does exactly...

The other part of the code right underneath If MC=%1
Code: [Select]
   X=X Screen(X Mouse)
      Y=Y Screen(Y Mouse)

What is the purpose of this code?

For the CP, FH and FD part of the code I do NOT understand exactly what they mean and represent....second ...in this part of the code:

Code: [Select]
If CP=1
         FH=False
         If FD
            '   First dot to be hit, so no fancy checks needed:
            Bell 80
            Paint X,Y,2
            FH=True
            FD=False

How did you guarantee that FH would not be false again after you set it to true when CP=1? Wouldn't CP always equal to 1 when you do the click? Then wouldn't FH will always equal to false? So what is the point of setting it to true when CP will equal to 1 when you press the mouse button?

Another point you said CP=Point(X,Y), right? Does that mean when the mouse is hitting a dot or a box or a line the CP will equal to 1 and if it hits nothing it will equal to nothing or zero? If that is the case wouldn't that be a risk I will click on a border of the screen and not the dot on the screen and it will think I clicked on a dot and cause a problem? But curious is that what it means? How does the program knows with just one line of code CP=Point(X,Y) that when I hit on a dot it means the mouse have collided on that dot?

Another part of the program I am confused about is below this code

Code: [Select]
          X1=X-8
            Y1=Y
            If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            If Not FH
               X1=X
               Y1=Y-8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X+8
               Y1=Y
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X
               Y1=Y+8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If

Is the above line of code designed to check if a dot is adjacent to the second dot and if it is go ahead and put a dot there adjacent to that dot? It is a genius and much polished method of code than the way I have being doing it. Can you please explain how it works for me so I can learn in the future to do a better coding style and equation? Another question I want to ask you...why in every If statement you have you made them all If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If  instead of some of them Y1 >0 or Y1<0 or X1 <0 or X1>0?

Oh one more final question! Right now at the beginning I can select any dot anywhere in the board but ones I place that dot...all other dots must be adjacent to the preceding dot and so on. That is a problem because the point of the dot game is that there are two players, each player have a single turn. On turn 1 player places two dots (correctly) then a line is formed between these two dots. Next you have turn 2 which is player two..in player two he or she can place dots anywhere in the board then the next dot must be adjacent to that dot that he or she placed in the board. Then it automatically forms a line. It goes back to turn 1 again for player 1 and allows that player to place a single dot anywhere in the board and then again the next dot adjacent to that dot he or she placed and repeat. Of course there are rules where the player cannot place form the same line again as before...say for example here:

O1  O2  O3
O4  O5  O6
O7  O8  O9

If player one places a dot on O1 and a dot on O4 then a line is formed...if player two places a dot O3 and a dot O6 a line is formed. If player 1 again places a dot on O1 he cannot place another dot on O4 because a line is already formed..he must place a dot on O2 to form a line there. Now in the example above, he can NO LONGER BE ALLOWED to select O1 anymore because it is already used for O1 to O4 and O1 to O2. Now he must select O2..but he cannot select O1 anymore because a line is formed between O1 and O2 he must now from O2 to select either O5 or O3.

Is that something I can do without the array you removed? I do not need any array at all in this game I am making right? Going back to the original question concerning the turns...can that be done by simply resetting CP again to 1 and having Turn variable as well? Or what advice you have (psuedo code) to accomplish this?



« Last Edit: October 03, 2013, 07:20:11 PM by xboxisfinished »
Logged

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Problem with click response....
« Reply #7 on: October 04, 2013, 04:21:56 AM »

Phew!  A couple of questions!  ;D

Apologies for the couple of bugs.  I added the code to centre the play area horizontally and missed updating the boundary checks.  Updated code attached.

First things first.  If you haven't already got them, grab these downloads:
     AMOS Pro User Guide 1st Edition
     AMOS Public Domain Release 2

AMOS is not an easy language to just jump into.  I strongly recommend reading and working through the Basics section of the AMOS Pro User Guide.  There's also the Tutorials section in your installation.

For any instructions you don't understand, just highlight it in the editor and click on the [H] icon (or press the [Help] key if it's an Amiga or the [F5] key if it's WINUAE running on a PC).  That will bring up the help for that instruction.  They're brief but usually give you the info you need.  The User Guide also has an index to the instructions at the very end.

I'm assuming you're using AMOS Pro V2.0.  If not you can download it here
     AMOS Pro V1.0
     AMOS Pro V2.0 Update

A warning though.  The AMOS development team rushed out the final release of AMOS (Pro V2.0) and there are some mistakes and errors in both the Help Files and the original User Guide.  We're gradually working towards a redevelopment of AMOS Pro with the few bugs fixed and the documentation fixed.  As you can imagine, this is a very big task for spare time work.  So it's taking a while...

Okay, having got that out of the way.

Quote
What is the function right underneath the Wait Vbl right here:


Code: [Select]
  If DC=0
      Locate 10,23
      Print Chr$(7);
      Dec DC
   Else If DC>0
      Dec DC
   End If

I do not understand what the command keyword Dec mean and what it does exactly...
The Repeat ... Until loop executes once every 1/50th of a second (every 1/60th for an NTSC machine).  So this code just counts down the DC variable.  When it reaches zero, it clears the "Invalid Action!" message by printing Chr$(7) which clear to end-of-line.  The variable is set to a value of 50 (1 second) when the message is first displayed.

The Dec instruction subtracts 1 from a variable.  Its partner Inc adds 1.  You'll also come across Add variable, expression which does just what it says, it adds the result of expression to the variable.  These instructions are much faster than using the usual X=X-1 types of expression.

Quote
The other part of the code right underneath If MC=%1

Code: [Select]
   X=X Screen(X Mouse)
      Y=Y Screen(Y Mouse)

What is the purpose of this code?
The mouse coordinates are in hardware coordinate units.  The X Screen() and Y Screen() functions convert these to screen coordinates.  The code following uses instructions that recognise screen coordinates.  So the mouse coordinates must be converted before you can use them.

Quote
For the CP, FH and FD part of the code I do NOT understand exactly what they mean and represent....second ...in this part of the code:


Code: [Select]
 If CP=1
         FH=False
         If FD
            '   First dot to be hit, so no fancy checks needed:
            Bell 80
            Paint X,Y,2
            FH=True
            FD=False

How did you guarantee that FH would not be false again after you set it to true when CP=1? Wouldn't CP always equal to 1 when you do the click? Then wouldn't FH will always equal to false? So what is the point of setting it to true when CP will equal to 1 when you press the mouse button?
CP is the colour of the pixel given by Point(X,Y).  Used to check what the user has just clicked on.

FH is a flag used to indicate that a hit has been processed.  Without it, the hit check code would be repeated up to four times, once for the each adjacent dot check, each time making a bell sound!  Once a hit has been checked as okay, FH is set to True so that the other adjacent dot checks can be skipped to avoid this.

FD is a flag to indicate that nothing has happened yet.  So it it's True, no checks are necessary for adjacent dots (which is what the comment tells you!).  When that first dot has been hit, FD is set to False so that the adjacent dots checks are done instead.

Quote
Another part of the program I am confused about is below this code


Code: [Select]
          X1=X-8
            Y1=Y
            If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            If Not FH
               X1=X
               Y1=Y-8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X+8
               Y1=Y
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If
            If Not FH
               X1=X
               Y1=Y+8
               If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If
            End If

Is the above line of code designed to check if a dot is adjacent to the second dot and if it is go ahead and put a dot there adjacent to that dot? It is a genius and much polished method of code than the way I have being doing it. Can you please explain how it works for me so I can learn in the future to do a better coding style and equation? Another question I want to ask you...why in every If statement you have you made them all If X1>0 : Proc _CHECK_HIT[X,Y,X1,Y1] : End If  instead of some of them Y1 >0 or Y1<0 or X1 <0 or X1>0?

Sorry, I goofed on these lines after I'd added the XO variable to centre the play area.  The correct code is in the attached file.  It's supposed to just check that the pixel we're checking is within the play area (and within the screen area!).

From you final comments, I can now see what sort of game you're trying to write.  It would be better to go back to your original concept of using arrays to hold the playing area so you can make the necessary checks for a two-player game.  It gets complicated at that point  ;D but you'll work it out.  Just dimension the arrays as (31,20) not as an array for every dot on the screen!  Each element in an integer array takes up 4 bytes.  So 32 x 21 x 4 = 2,604 bytes (all arrays in AMOS Basic start at element 0).  Your original array would have taken up over 175,000 bytes!  Always be careful declaring two-dimensional arrays as they can quickly consume vast amounts of memory.

I'm not going to write the game for you as I'm up to my neck in re-writing AMOS Pro and its documentation.  The sample code was just to get you headed in the right direction.  But don't let that stop you asking questions.  The replies may be a while in coming, but they will come  8) .  But try spending a while working through the User Guide first.  It explains a lot that would take me ages to tell you on the forum.
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #8 on: October 04, 2013, 01:26:40 PM »

Thank you so much! You have being helped me a lot actually :) Really my only serious project is to develop an MMORPG game for the Amiga classic (only) system and be compatible with all the Amiga models. But I have to start from below before I go up...if I cannot make a simple dot game how can I make something more complex. If I cannot make an easy AI how can I make monsters in a MMORPG game...so I am starting with dot games, then doing tic tac toe, then other board games and when every new game becomes easier and easier and I get better and better in programming style and optimization I will work may up with a more complex games, until I make a good arcade game, then shoot up game..then it becomes more complex. Then I will make an adventure game, etc, etc.

When I release some like 10 to 20 games with each game becomes more complex as I go by...then I will start working on more simple online game..and so forth.

Now the only question I have...is does AMOS provide support for online and internet? Can I make an online game using AMOS? If not...would you be providing an extension in the future for that?
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #9 on: October 04, 2013, 06:43:25 PM »

I have attached the game to try out my solution for the lines between two dots? Of course this is just the beginning alpha but here we go :)

What do you think so far? Not for the dotted on the board or the mouse response because that is your work..but with four arrays of just one index boardx1(0), boardy1(0) and with one line...only one line of code I get to draw the line when two dots are with each other..I want your opinion on that.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Problem with click response....
« Reply #10 on: October 06, 2013, 04:44:24 AM »

I have one question to ask. In Blitz Basic 2 you can use something like this

NewType MyTypeName
    stuff here
End NewType

Then you can have an array of that type...which by the way is a very powerful feature. Is this something possible with AMOS?
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Problem with click response....
« Reply #11 on: October 07, 2013, 04:02:46 PM »

See the chapter on Banks.  I've replied in another thread.
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022