Goombert
|
|
Reply #60 Posted on: August 08, 2014, 05:52:19 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
No I can guarantee you that Studio probably rotates around the sprite center, whatever the defined behavior of image_angle is.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
TheExDeus
|
|
Reply #62 Posted on: August 10, 2014, 01:25:14 pm |
|
|
Joined: Apr 2008
Posts: 1860
|
Rotation around origin together with flipping should be as easy as this:
g2.setToIdentity(); //Set everything to default. This should also be true in general before any translation g2.translate(-g.xoffset,-g.yoffset); //So move to 0-xoffset (xorigin),0-yoffset (yorigin) g2.scale((xflip==true?-scale.getX():scale.getX()),(yflip==true?-scale.getY():scale.getY())); g2.rotate(Math.toRadians(-rotation)); g2.translate(g.x,g.y); //Translate to instance position So the order is translate the origin, scale, rotate and translate to position.
Flipping is not rotation and translation - well it is, but it's the same as scale- so scale by negative amount and it's flipping. Try inputting -1.00 in Scale X, it should show the same as Flip X. I don't know how GM handles that fact (does it allow Scale X to be negative?), but I think we should allow it to be negative and Flip X to be enabled at the same time. It's useless, but still.
|
|
« Last Edit: August 10, 2014, 01:32:20 pm by TheExDeus »
|
Logged
|
|
|
|
egofree
|
|
Reply #63 Posted on: August 13, 2014, 02:24:31 pm |
|
|
Joined: Jun 2013
Posts: 601
|
I've finished to implement scaling, rotation and alpha property. It was a pain in the *** to integrate correctly all these properties, especially with the sprite's origin. If some people would like to test my latest version : https://dl.dropboxusercontent.com/u/29802501/lateralgm.jar. This is work in progress and it is made just to test the new properties in the rooms editor. It is not working yet within ENIGMA, and i need to add missing features, like the undo. I need also to be sure that they are saved correctly in project files. I am working right now on the image blending with colors.
|
|
« Last Edit: August 13, 2014, 02:30:07 pm by egofree »
|
Logged
|
|
|
|
Goombert
|
|
Reply #64 Posted on: August 13, 2014, 11:11:24 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Alright egofree, just a heads up I am planning to update the Portable ZIP this weekend possibly Friday when classes end.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
egofree
|
|
Reply #66 Posted on: August 23, 2014, 02:55:28 pm |
|
|
Joined: Jun 2013
Posts: 601
|
I've finished the work on LateralGM and the modifications for the new properties are now in the repository : https://github.com/IsmAvatar/LateralGM/pull/138In order to integrate the new properties in Enigma, the following tasks must be finished in the LateralGm plugin : changing the new instance's properties (image_xscale,image_yscale,image_alpha,image_angle) in the new property : pre_creation_code. Also these properties must be supported when reading and writing egm files. But anyway i consider the work to be finished in LateralGM, and there is not much remaining work to be finished. About 90% of the work is already done.
|
|
« Last Edit: August 23, 2014, 03:12:08 pm by egofree »
|
Logged
|
|
|
|
Goombert
|
|
Reply #67 Posted on: August 23, 2014, 10:14:26 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Very nice ego, keep up the good work, I am still pressed for time, even more so now.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
egofree
|
|
Reply #68 Posted on: August 27, 2014, 03:58:21 am |
|
|
Joined: Jun 2013
Posts: 601
|
I've finished everything for the new properties. Here is a test project : and the result, when running : But this was done only for testing purpose with modifying the creationCode. But in my pull request ( https://github.com/enigma-dev/lgmplugin/pull/27), i am not modifiying creationCode but the new property preCreationCode. Currently, it will give the following error : Stack trace: java.lang.Error: Invalid memory access at com.sun.jna.Native.invokeInt(Native Method) at com.sun.jna.Function.invoke(Function.java:383) at com.sun.jna.Function.invoke(Function.java:315) at com.sun.jna.Library$Handler.invoke(Library.java:212) at com.sun.proxy.$Proxy0.compileEGMf(Unknown Source) at org.enigma.EnigmaRunner$CompilerThread.run(EnigmaRunner.java:679) But i am rather confident it is because the ENIGMA engine must be modified in order to take into account the new property.
|
|
« Last Edit: August 27, 2014, 06:07:38 am by egofree »
|
Logged
|
|
|
|
|
|
time-killer-games
|
|
Reply #71 Posted on: August 27, 2014, 01:04:10 pm |
|
|
"Guest"
|
Ego free I was going to upgrade to windows 8 but I've heard a lot of bad things about it so no promises until after I hear you are interested, thanks to your contribution that I've waited so long for I'd like to reward you a donation from about $20-$40. I offered this to Robert in times past but he wanted me to use the money for something better. I want everyone to know this when I offer donations I do it as a joy not a burden. I really like to share the love. What I get out of it is the pleasure to help someone who has helped me greatly. I like to make people happy. It makes me happy to see people happy. HAPPY HAPPY JOY JOY HAPPY HAPPY JOY
|
|
« Last Edit: August 27, 2014, 01:07:05 pm by time-killer-games »
|
Logged
|
|
|
|
|
egofree
|
|
Reply #73 Posted on: August 27, 2014, 02:30:13 pm |
|
|
Joined: Jun 2013
Posts: 601
|
Thanks guy ! I just hope the new features will work for you and will not have too much bugs, otherwise i am afraid you will be less grateful ! This is the first time i am participating in an open project, and i have a lot of pleasure to do it. As i've a lot of fun, i don't notice how time flies. Time-killer-game, thanks for you donation, but i don't need it, as i am not doing it for money. Use this money to have a good diner or to watch an interesting movie ! As this seems the time of thanking everybody , i would like to thank all developers who have worked on this project and specially Robert. If i started to work on this project it is mostly because of Robert, with all the efforts he made on this project and all the help he gave on this forum.
|
|
« Last Edit: August 27, 2014, 02:33:28 pm by egofree »
|
Logged
|
|
|
|
TheExDeus
|
|
Reply #74 Posted on: August 28, 2014, 11:12:45 am |
|
|
Joined: Apr 2008
Posts: 1860
|
Test this: https://github.com/enigma-dev/enigma-dev/pull/809You will have to recompile the .dll. I do it by opening Git Shell and typing "mingw32-make". After that the plugin error shouldn't show and the transformation options should work fine. Also, I noticed that there is some weirdness when using "inverted colors" option together with instance sprite transformations. And "color" should be used instead of the english spelling. Just to be more consistent. And you could maybe have a "preCreation code" modifiable just like creation code is, for both the instance and rooms. So the transformations are prefixed to the user made precreation code. Also you should allow negative scale (right now it doesn't allow you to set -1 in scale for example). If you had that I wouldn't need the "flip" option, which is also missing now.
|
|
|
Logged
|
|
|
|
|