Jump to content

Universal ScreenMate 4 + Editor


madflame991
 Share

Recommended Posts

@james3mg

While 1
    If $marhi = 0 Then
        If GUIGetMsg()=-8 Then
            $tmpMarioWin=WinGetPos($win_mario)
            $mario_x=$tmpMarioWin[0]
            $mario_y=$tmpMarioWin[1]
            EndIf
............................

didn't helped me because GUIGetMsg()=-8 grabs the message only once a complete cycle...

however, I had the best results yet with:

GUISetOnEvent($GUI_EVENT_PRIMARYUP, 'DragHim')
Func DragHim()
    $mario_x = MouseGetPos(0)
    $mario_y = MouseGetPos(1)
    WinMove($win_mario,-1,$mario_x,$mario_y)
EndFunc

the only problem with this is that if you pick mario up when he's walking/jumping he flickers a bit when you release him. I can't find an explanation for that...

EDIT: I MADE IT! FINALLY!

this is the modified DragHim function, the only modified part is in bold:

Func DragHim()
    If $grab = 0 Then
        Opt('GUIOnEventMode',0)
        $dll = DllOpen('user32.dll')
        $grab = 1
        $mpos = MouseGetPos()
        $dragdistx = $mpos[0] - $mario_x
        $dragdisty = $mpos[1] - $mario_y
        Sleep(100)
        [b]While _IsPressed('01', $dll)
            WinMove($win_mario,'',MouseGetPos(0)-$dragdistx,MouseGetPos(1)-$dragdisty)
        WEnd[/b]
        $mario_x = MouseGetPos(0)-$dragdistx
        $mario_y = MouseGetPos(1)-$dragdisty
        DllClose($dll)
        Opt('GUIOnEventMode',1)
    EndIf
    $grab = 0
EndFunc

I'll make an update as soon as I can. thx again :)

Edited by madflame991
Link to comment
Share on other sites

  • Replies 76
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Very nicely done!

I obviously didn't dissect your code enough to find the correct place to put the condition. The GUIGetMsg() would have to be further down in the loop- somewhere that it would get called more frequently (or possibly, the same calls in several places- each of the 'mood' loops?). But you've hit on absolutely the most logical way of doing it using GUISetOnEvent. Stupid me, I got stumped with that method because I fell into the same trap I warned you about- I was looking at GUICtrlSetOnEvent() rather than GUISetOnEvent and couldn't remember how to grab only one event type, like you can when setting an OnEvent for the GUI as a whole :)

Sorry one 'little' suggestion blossomed into this whole mess, but I do think that the drag will be more intuitive now. Can't wait to see the new version! ...and I've still got to try out the editor.

Edit: I'm curious as to why you call the DLL to move the window, instead of just using WinMove(), offset by the position of the cursor in the window when the drag begins?

Edited by james3mg
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

@james

don't worry, I bet that I wouldn't have done it without someone urging me :)

I need that DLL for _IsPressed, it says in the example file that I need it... (to be honest I dunno how _IsPressed works...)

I noticed that when most people see a screenmate they try to pick it up and drag it, and thay get dissapointed if they can't do that... Maybe I'll be able to make the screenmate more interactive...

I'll publish the next version in about two weeks from now if nothing bad happends

Thx for your contribution on the project

cheers!

Link to comment
Share on other sites

My comments/observations on the editor:

First, my usual disclaimer: I'm doing this to be helpful, because you asked for it :) . Please take nothing personally- it's quite an impressive little suite you're developing here.

This is really nice, and eventually will be a quick-n-easy, intuitive way for people to make characters! I look forward to the fully functional version! I'm impressed with all the options you've given and the layout in general...it's much clearer than I was expecting it to be when you were first talking about this.

Especially, kudos for the 'custom animations'- brilliant of you to forsee that there are going to be custom animations the user may want to use, depending on the character. This looks really logically done, too.

Now on to the not-so-fun stuff:

Show-stopping bugs:

-Since this is replacing files in a "Program Files" subdirectory, it HAS to have #requireadmin at the top of the script (esp. in Vista, but in XP too). Otherwise it says it saved, but there's absolutely nothing changed in the chars directory. You might want some error handling in there- it should have caught this problem when it couldn't copy the files and given an error instead of a success message.

-I can't provide my projectile images- it's expecting an image the size of my character, rather than an image the size of my projectile.

-When I try and use my newly-saved character in the main program, it throws "Line -1: Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded." and closes as soon as I press Apply.

User-friendliness issues with existing functionality/layout:

General tab:

-The character name field includes the phrase "character name: " before the character name by default. I assume this shouldn't be the case?

-It's not a big deal, but I keep putting the right idle picture in the left idle frame, and vice versa. It might be logical to have the right frame on the right, and the left frame on the left.

Moods tab:

-It's hard to know what numbers to put in here- maybe up/down controls with min/max set would be helpful? I assumed that the numbers should total 100, but maybe I'm wrong? Is each field on a scale of 1-10 and the total is meaningless?

-The controls should be created in the logical order here so that when the user tabs through them, the cursor moves down the columns rather than across the rows. For example, pressing tab when you're in the Action 1 field should take you to Action 2, not Action 5.

Walking/Jumping tab:

-It would be helpful for the user to know the units they're giving. I assume that 'distance between frames' is in pixels and that 'delay between frames' is in ms, but could that be noted?

-If 'delay between frames' is measured in ms, I think the field needs to be wider. If I put in 150 for the delay, I can't see the whole number.

-The field labeled 'returning' doesn't make much sense- should they be labeled "Start jump" and "End jump" or "Jumping" and "Landing" instead?

-If I've correctly interpreted what 'returning' means, it should probably be AFTER (to the right of) the "Jumping" field.

Throwing tab:

-You correctly use the term "projectile" everywhere else in your program- "Distance between" and "Delay between" should probably use "projectiles" instead of "flames" as well.

Wish list/suggestions for additional functionality:

General comments:

-Some defaults to give the first-timer a place to start would be nice. Either fill in some logical numbers when it's first launched where you can or note a typical range in parenthesis by the label.

-It would also be nice if I could go back and correct the character/projectile size after the character was created, but not required.

General tab:

-Could you include a maximum jump height field so heavier characters (Bowser) doesn't jump as lightly as smaller characters (Mario)?

Throwing tab:

-I'd like to have the ability to provide a different sequence of projectile images depending on if the characters 'shoots' it to the left or to the right. I know this one requires large modifications of the original program, however, not just the editor.

Quotes tabs:

-This is quite extensive- nice job! However, that's potentially its own pitfall- too many options. Would it be possible to have a button like "Use for all" that would copy the current mood's quotes to all the available moods? Especially in the "Special Quotes" section, that would be helpful for those who don't want to come up with quite that many quotes or copy and paste several fields into five different moods.

-I'm not sure what should go into the "Hours" area- do I have to have something for EVERY hour of the day? This is somewhere that a default value would come in handy.

Global buttons:

-When I hadn't provided all the pictures required, it just told me "Check the data submitted again" when I clicked save. It would be nice to either have more details provided so I know what I missed, or (even better) have it just provide blank images for those that I missed, so I could save it halfway through the process, for instance. That way, it's possible to "Save early, save often".

-I understand why the help isn't present yet, but maybe just a message like "Not available in beta version" would assure the user that their installation isn't corrupt and just giving an empty message box.

Thanks for all your work on this crazy-cool program! I look forward to your updates!

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

First, my usual disclaimer: I'm doing this to be helpful, because you asked for it :)

Thx again for the 3 page review :( and sorry it took so long for me to reply

It's strange why you get that error when you try to save a character... I don't, and it's strange why you can't access the help files... I saw that my screenmate won't even start on some computers because of the same error in line -1. The only thing that I can do about it is to debug and to recheck the code. The other problems are easier to fix...

I read the full article over 3 times and understood your suggestions and they seem ok to me. I'll make sure that the update will make the editor more user-friendly and with lesser bugs. Thanks :D

Link to comment
Share on other sites

  • 4 months later...

Sorry it took so long for a new release of the Universal ScreenMate

2 new characters have been added, support for PNG images and more documentation regarding the editor are the main changes since the last version; see first post for more details and have fun with the screenmate!

Feedback would be appreciated

Oh, and you might like this too (a puzzle game): http://www.autoitscript.com/forum/index.ph...93&hl=cogut I really dunno why it doesn't have any replies...

Link to comment
Share on other sites

Hey buddy- good to see an update!

This is getting pretty developed! Nice job...

I didn't do an exhaustive walkthrough of the program this time- I'm pretty darn busy, but a heads-up on a few issues I thought you might want to be aware of. Thanks for picking up some of my requests from before- I'd still like to see the others picked up (and a zip rather than install routine), but you're the programmer, so it's your call! :) (obviously). Most of these are just minor consistency issues; all the show-stoppers I could find have been resolved:

-The "blob" mate is the default when the program is loaded, but when I go into "configure", BigMario is listed as current.

-The title of the "Configure" GUI is still Mario Screen Mate :P

-I can't seem to drag the mate at all anymore >_<

Editor:

-In the first screen of the editor program (where you set the name, size, etc), the directory address is longer than the GUI is wide and doesn't wrap, nor does the GUI allow me to expand it...maybe fixing one of these two conditions or setting a tooltip on the text would work better?

-Is there a reason the characters are limited in size? No biggie, but I couldn't give this a really good test because the only appropriate pictures I had laying around were in the ~120px high range

-In the main editor GUI (with all the tabs), the directory is listed, but this time is wrapped prematurely and the second line is partially obstructed by the tabs.

-I'd like to be able to browse network drives for pictures...

-When browsing for pictures, it lists "Image files (*.png)"...shouldn't it be "Image files (*.jpg, *.gif, *.bmp, *.png)" instead? I have to manually type in *.* in the file box to see my .jpg files! :idiot:

As you can see from the above list, there's not much left to comment on- the mark of software that's been well- and throughly worked over, designed and written! I want to make sure that nobody reading any of my comments thinks that they're any reason to not try this out- it's an amazing example of what you can do with AutoIt, and a fun little program besides!

Thanks again!

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

+ added: 2 new characters: a robot that looks a little like wall-e...

Pretty sure that's R.O.B.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

Hey cool!

You used my Luigi style >_<

Posted Image

:)

AlmarM

EDIT:

Link:

http://www.autoitscript.com/forum/index.ph...st&p=474389

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

@alienware and Minikori

I get the mate to be pickable somehow... and I found the robot in a nifty fun game called "Super Mario Wars" - you should play it!

@AlmarM

yes it is! you gave me the idea to make the screenmate skinnable! thx!

@james

-The "blob" mate is the default when the program is loaded, but when I go into "configure", BigMario is listed as current. -The title of the "Configure" GUI is still Mario Screen Mate :P

Will fix that!

-I can't seem to drag the mate at all anymore >_<

ahm... it took me a while to make the previous version dragable; now the mate is not based on GUICtrlSetImage, it's using GDIPlus to change frames... I vague idea on how to make it work, but I can't promise anything

-Is there a reason the characters are limited in size?

I haven't tested how it behaves with images that big... I will test it and eventually allow big images, but after the user is warned about losing memory or CPU power

-When browsing for pictures, it lists "Image files (*.png)"...shouldn't it be "Image files (*.jpg, *.gif, *.bmp, *.png)" instead? I have to manually type in *.* in the file box to see my .jpg files! :idiot:

The reason why I made the update is because I wanted people to have access to PNG images because of their Alpha Channel - Without it, the blob or any round character would have had a very ugly border; I haven't tested other image formats like bmp/jpg (bmps are very large and jpgs use lossy compression and they both lack transparency)

It's an amazing example of what you can do with AutoIt, and a fun little program besides!

I agree! AutoIt is the best and capable user-friendly programming enviroment. The people who built it are just wonderful

The next update will be coming in about two months. I will fix it, thanks for the buglists/wishlists

Thanks again!

Thank you as well :) Edited by madflame991
Link to comment
Share on other sites

@AlmarM

yes it is! you gave me the idea to make the screenmate skinnable! thx!

Np :)

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

If I got a snes mario sprite, who would be interested?

I'm sorry I didn't reply on time... I don't check this post often because I tought it was buried...

Thx for offering a screenmate... to be honest I don't enjoy the idea of getting sprites from classic 8bit games - I did that with mario because it was at first just a proof of concept and I think nintendo won't mind... I can't have more nintendo heroes delivered with the screenmate software, sorry

There's some good news also: A new version with 7 more characters is available for download... see first post!

Link to comment
Share on other sites

  • 3 months later...

Just curious... I'm pretty confident since some of the Higher level posters have already taken a look at it, that it's not a virus or anything... But I was just curious... I've done a lot of suspicious things in my scripts... Pack Multiple exe's, access the internet, use various ports for connections, mod the registry... and my EXE's are never detected as anything... I always scan with other AV's as well to make sure the people running my scripts aren't going to get virus warnings...

So my questions is... Why is this program picked off by NOD32 as a "Trojen.Packer" and none of my crazy ass, suspicious, scripts are?

Just to clarify... I'm not asking IF this is a virus... I'm asking why NOD32 thinks it is?

Edited by BinaryBrother

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

Download only the source and read it line by line for yourself. If you want remove all ip or net functions. I been using a version of a script a long time now no problems. ^_^

Edited by lordicast
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...