Mouse Problems

Started by BooBoo, March 29, 2010, 08:52:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BooBoo

Hi - Basicly the movement of the mouse is restricted -especially on the Left and Botton of the Screen I want to be able to move the Mouse Pointer to Very edge of the screen.

The demo I uploaded shows this -that the mouse is restricted.

Any help appreciated :)


BooBoo

Doh! found it "Limit Mouse"

Ok with Big! Thanks! to Hungery Horace I finaly made my first Map editor
I never thought Amos would be suitable for makeing a Map Editor but after seeing Horace's NZS editor beta it realy proved it could.

Now to do some scrolling tests with game Maps instead of just letters I wonder How amos will cope.

skateblind

Do you want smooth pixel scrolling or tile scrolling? If you manage to get pixel scrolling working smoothly, then please let me know how.  ;D
What are you looking at?

Hungry Horace

what game you reading maps for BooBoo?

and did i give you the NZS Editor source? If not, do you want it?
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


BooBoo

#4
Hi - Yeah what options do we have when it comes to scrolling?
I can get quite smooth scrolling using offset but thats very limited? -1024 I think

Thanks Horace I dont think I have the source -Ive pretty much copied the style of yours cos I liked it, I hope this is cool?
I wont mind having a PEEK at your source, did you use Offset to scroll the sceen?

The MAP editor was just a general one - not for any paricular game, just a test realy.

But Thanks for the ideas and the Amos help with Hex Reading/Writing :)

Ok heres a little Tile scroll - Bit choppy - no denying that any ideas to improve? Maybe just a better Loop would help
On my real Amiga A1200/030 it does look OK Honest ;) But on WinUae its quite abit worse
Or it might run to fast ;D

Anyways let me have your ideas
http://rapidshare.com/files/369645948/Scroll.zip.html


:Press Up/Arrow key for small speed increase - Press Space Bar to seen the hole screen.
Still couldnt get attachments working.

BooBoo

#5
Ive just been doing some testing and I seem to get MUCH!! smoother scrolling if I run FBlit first???

SamuraiCrow

Amos doesn't have the most efficient blitting routines.  That's one of the reasons why Sidewinder and I started making a clone of Amos.  (It's still months away but the tools to customize it are coming along nicely.)

FBlit uses the CPU to do the blitting but it ties up the Fast RAM bus so other stuff running at the same time will get blocked out.  You don't want your game code to adversely influence the speed of blitting, after all.  I'd recommend not using FBlit with your scrolling code.  It might do better for displaying BOBs though.

BooBoo

#7
I guess there is something in it - Fblit doesnt change the scrolling but the Bobs shimer when scolling, FBlit gets rid of this
Well the Tiles are going to be BoBs or Icons both drawn with the blitter - Dont know what other choice there is.

A better compiler would probably help - but Of course im using Amos Creater maybe if I compiled with Pro -This issue might be addressed better.

SamuraiCrow

Icons are faster than BOBs even though they are both blitter based.  The way that BOBs are drawn is not very efficient though, which would lead me to suggest using computed sprites under AmosPro is the quickest solution.  Other than that, you don't have many options.

Hungry Horace

Quote from: BooBoo on March 29, 2010, 07:00:39 PM
I can get quite smooth scrolling using offset but thats very limited? -1024 I think

there are ways to code using offset but not to dray all of the screen (so effectively you only draw screen-size + invisible buffer

I'm not great at that kind of code though.

QuoteThanks Horace I dont think I have the source -Ive pretty much copied the style of yours cos I liked it, I hope this is cool?
I wont mind having a PEEK at your source, did you use Offset to scroll the sceen?

The MAP editor was just a general one - not for any paricular game, just a test realy.

i did use offset myself, but it was within the 1024 limit. have a look at the upload for you on UA.

QuoteBut Thanks for the ideas and the Amos help with Hex Reading/Writing :)

no probs.

Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


BooBoo

Quote from: SamuraiCrow on March 30, 2010, 02:58:16 PM
Icons are faster than BOBs even though they are both blitter based.  The way that BOBs are drawn is not very efficient though, which would lead me to suggest using computed sprites under AmosPro is the quickest solution.  Other than that, you don't have many options.

Ok ill give icons a try

Heres a slightly different one I Think is a bit soomther.
http://rapidshare.com/files/370074571/SCROLL2.zip.html

Maybe using less vibrant colours might help aLittle.


Quote from: Hungry Horace on March 30, 2010, 06:47:33 PM
there are ways to code using offset but not to dray all of the screen (so effectively you only draw screen-size + invisible buffer

I'm not great at that kind of code though.

def scroll might be better in a game? - although you could use offset Maybe switching between screens to get around the 1024 limit and like you say limit the screen size.
Quote from: Hungry Horace
i did use offset myself, but it was within the 1024 limit. have a look at the upload for you on UA.

Cheers for that, Same here in the above demo I just cut and pasted a few 1024 maps together - I hope the tiles I used dont offend you to much  ;)

So much for my mouse problem ;D

SamuraiCrow

The basic idea of scrolling with offset in 8-directions is to allocate a screen that is 2 screen widths + 3 tile widths across and 2 screen heights and 3 tile heights tall.  When you scroll to the right, draw the tiles to the left of the screen offset as well as to the right offset.  The idea is to have an identical screen on the left side of the screen buffer by the time you've scrolled all of the way to the right so you can shift to the left image and continue indefinitely.  The same process applies to the vertical scrolling.

BooBoo

Right ive used 2 screens swithing - scrolling using offset to the right swithcing screens when reaching the 1024 limit - The scrolling is much better -Once compiled it even even runs way to fast, so ill have to sort out some timing issues.

Lonewolf10


Hi all,

Does anyone know how you can work out the exact position of the workbench mouse pointer? I need the X and Y coordinates for something I am working on. I have looked at the Amiga RKRM: Hardware Edition and know how the mouse data works, but that doesn't mean I can find out the exact position of the workbench mouse pointer - it just means I can create my own pointer, which wouldn't be in the exact same place as the workbench one!

The mouse data is stored in 4 registers, 2 for each mouse. The movement data is stored in 2 bytes - 1 for horizontal movement and one for vertical. When say the X value reaches 255 is then "rolls" to 0 (you subtract one from the other to find the direction of movement) and then continues to 255 before rolling to 0 again. So you can see the problem I have :(

Can anyone help?


Regards,
Lonewolf10


SamuraiCrow

Normally, if you need the position of the pointer within a window there is some sort of IDCMP-related structure that will indicate the mouse position but only when it's over your window.  As for Workbench, I don't know if you can access Workbench's data from inside Amos that easily.