This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 »
856
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 07:07:36 pm »Quote from: Darkstar2
YYG is hiring....You are in Scotland right ?He's actually in Chinatown right now.
And this is what he looks like in Chinatown with no meds.
857
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 06:21:02 pm »Quote from: TKG
Thank you Bob!No problem but the point is I was trying to show you that you do not have to switch from using BASIC to accomplish it. I just don't know the BASIC counter part off hand but as long as this BASIC language lets you do windows and loops and handles you should not have to switch languages.
858
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 06:05:24 pm »Quote from: TKG
So how do I do that?
Like this...
Code: (cpp) [Select]
LRESULT CALLBACK DllChildWndProc (HWND hWndParameter, UINT message,WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_CREATE:
return 0;
}
return DefWindowProc(hWndParameter, message, wParam, lParam);
}
void somefunctionwhereyouwanttotakecontrolofthechildwindow() {
SetWindowLong(childWindowhWnd, GWL_WNDPROC, DllChildWndProc);
}
Then you have complete control over all messages for the child control.
859
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 05:23:38 pm »
TKG, ok, do you have the handle to the control? What you would want to do is intercept all of its window messages, but I don't think that can be done without directly controlling it and delegating the messages.
It goes like this, in order to get WM_SIZE or WM_PAINT or other messages from the window, we hand it a process to its class/container which is used to create the window.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWSmain.cpp#L224
We then process the messages.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWScallback.cpp#L72
And if we want we can optionally pass messages right back to Win32 for Windows to handle the message itself.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWScallback.cpp#L247
So what I am wondering if there is a way to take the handle of your control and attach it a message process after it has already been created. These are formally called Window Procedures.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632593%28v=vs.85%29.aspx
Found it
Use SetWindowLong with GWL_WNDPROC and you can change the window procedure to your own function and intercept all messages from the child control.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591%28v=vs.85%29.aspx
It goes like this, in order to get WM_SIZE or WM_PAINT or other messages from the window, we hand it a process to its class/container which is used to create the window.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWSmain.cpp#L224
We then process the messages.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWScallback.cpp#L72
And if we want we can optionally pass messages right back to Win32 for Windows to handle the message itself.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWScallback.cpp#L247
So what I am wondering if there is a way to take the handle of your control and attach it a message process after it has already been created. These are formally called Window Procedures.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632593%28v=vs.85%29.aspx
Found it
Use SetWindowLong with GWL_WNDPROC and you can change the window procedure to your own function and intercept all messages from the child control.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591%28v=vs.85%29.aspx
860
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 04:50:38 pm »Quote
The losing focus issue is because the browser controll is a seperate window being embedded in there, there's no way to fix that unless I re-write in c++.Not necessarily, can't you just intercept the messages from the browser control handle?
861
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: September 28, 2014, 01:58:29 pm »
TKG are you making use of Windows dll's? If that's the case that is likely what is causing the Internet Explorer hell, also why Windows has dll hell. It's a problem specific to Windows operating systems and devices.
https://en.wikipedia.org/wiki/DLL_Hell
This is also why Microsoft has GUID's and why we see them in Studio, applications should have unique identifiers to avoid Microsoft API's from getting confused and reading another ones messages or interops.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931%28v=vs.85%29.aspx
https://en.wikipedia.org/wiki/COM_Interop
I don't know all the details about it, but I've definitely heard of this before.
https://en.wikipedia.org/wiki/DLL_Hell
This is also why Microsoft has GUID's and why we see them in Studio, applications should have unique identifiers to avoid Microsoft API's from getting confused and reading another ones messages or interops.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931%28v=vs.85%29.aspx
https://en.wikipedia.org/wiki/COM_Interop
I don't know all the details about it, but I've definitely heard of this before.
862
Developing ENIGMA / Re: git madness
« on: September 28, 2014, 01:42:26 pm »
Well, first, don't worry about the history Harri, it's already gone to shit for the most part several times in fact. This happens to be why I get very anxious about leaving pull requests setting around, they can and will become a nightmare after a while.
863
General ENIGMA / Externalizing LateralGM
« on: September 28, 2014, 01:33:21 pm »
I want to make the case for excluding several things from LateralGM's JAR and redistributing it as a zip file.
1) I want to externalize the file that configures all the keyboard shortcuts of the application to allow people to change the shortcuts.
https://github.com/IsmAvatar/LateralGM/issues/147
2) I want people to easily be able to add and change existing icon packs by placing them in a folder called icons and every top level folder will become a new icon pack.
3) I want to do the same thing I want to do for icons with languages and allow people to easily add new language packs.
4) I want to externalize all the LGL action libraries to a folder where LGM will load them to allow users the easy ability to add and remove action libraries as well as modify and utilize existing ones, even those made for GM since we already have the code to load them it doesn't make any sense not to offer the capability, obviously for legal purposes we use our own LGL format.
Anybody that knows me knows that I have never been one for creating applications that package everything into a single file, it has never been my thing and I strongly oppose it for several reasons. I like applications that you can easily modify without hassle or even having to know what you are doing, and I find this aspect of LateralGM to actually be against what makes LGM great, its free and open source nature.
1) I want to externalize the file that configures all the keyboard shortcuts of the application to allow people to change the shortcuts.
https://github.com/IsmAvatar/LateralGM/issues/147
2) I want people to easily be able to add and change existing icon packs by placing them in a folder called icons and every top level folder will become a new icon pack.
3) I want to do the same thing I want to do for icons with languages and allow people to easily add new language packs.
4) I want to externalize all the LGL action libraries to a folder where LGM will load them to allow users the easy ability to add and remove action libraries as well as modify and utilize existing ones, even those made for GM since we already have the code to load them it doesn't make any sense not to offer the capability, obviously for legal purposes we use our own LGL format.
Anybody that knows me knows that I have never been one for creating applications that package everything into a single file, it has never been my thing and I strongly oppose it for several reasons. I like applications that you can easily modify without hassle or even having to know what you are doing, and I find this aspect of LateralGM to actually be against what makes LGM great, its free and open source nature.
864
Proposals / Re: GMS vs GM8.1 and below [window_handle()]
« on: September 27, 2014, 03:35:15 pm »
Ok TKG, but how do you propose we do that? Especially when you don't even know how Studio's works, ours just casts hWnd to unsigned long long.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWSwindow.cpp#L812
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Platforms/Win32/WINDOWSwindow.cpp#L812
865
Off-Topic / Re: Restructuring the Community
« on: September 27, 2014, 03:16:37 am »
I can't view the link Lonewolff, what was that all about?
866
General ENIGMA / Re: Please vote for ENIGMA's new license
« on: September 27, 2014, 03:13:47 am »
Hmmm I see your name in a couple of places where I'd think to look so ok I'll take your word for it.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/subframes/RoomFrame.java#L6
Just remember to update headers of the files you change! I can not stress it enough.
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/subframes/RoomFrame.java#L6
Just remember to update headers of the files you change! I can not stress it enough.
867
Programming Help / Re: Script problem
« on: September 26, 2014, 03:46:38 pm »
Yes you could still do what I suggested, this is simply physics/calculus. rate of change = distance/time.
My original suggestion was this which gives us an exponential graph where velocity is the y-axis and distance is the x-axis.
So let's just spruce up what I suggested first and you'll get a function similar to what you want that will accelerate up to a constant distance from any given point at which point it will slow down. You'll need to create a new variable called velocity in your create event and initialize it to 0.
If you like you can also use the built in variables with this alternative so you don't have to create a new one and you could also use the friction variable then as well.
My original suggestion was this which gives us an exponential graph where velocity is the y-axis and distance is the x-axis.
Code: (EDL) [Select]
// with a room speed of 30 steps/frames per second you will get these speeds
// distance = 5, 5/10th pixel per step * 30 steps per second = 15 pixels per second
// distance = 10, 10/10th pixel per step * 30 steps per second = 30 pixels per second
// distance = 20, 20/10th pixel per step * 30 steps per second = 60 pixels per second
var spd;
spd = distance_to_point(xx, yy) / 10;
// you could also limit the speed if you like to some arbitrary value
if (spd > 30) {
spd = 30;
}
move_towards_point(xx, yy, spd);
So let's just spruce up what I suggested first and you'll get a function similar to what you want that will accelerate up to a constant distance from any given point at which point it will slow down. You'll need to create a new variable called velocity in your create event and initialize it to 0.
Code: (EDL) [Select]
var dist;
dist = distance_to_point(xx, yy);
if (dist > 100) {
// accelerate
velocity += dist / 10;
} else {
// we are getting close, so decelerate
velocity -= (100 - dist) / 10;
}
// you could also limit the speed if you like to some arbitrary value
if (velocity > 30) {
velocity = 30;
}
move_towards_point(xx, yy, spd);
If you like you can also use the built in variables with this alternative so you don't have to create a new one and you could also use the friction variable then as well.
Code: (EDL) [Select]
var dist;
dist = distance_to_point(xx, yy);
if (dist > 100) {
// accelerate
speed += dist / 10;
} else {
// we are getting close, so decelerate
speed -= (100 - dist) / 10;
}
// you could also limit the speed if you like to some arbitrary value
if (speed > 30) {
speed = 30;
}
direction = point_direction(x, y, xx, yy);
868
Programming Help / Re: Script problem
« on: September 26, 2014, 02:18:12 pm »
Hmm I am not really sure I follow you though, because I don't see why you would need a script particularly for this as both GM and ENIGMA do have functions built in for this. For instance, move_towards_point sounds like it does exactly what you want this script to do.
http://enigma-dev.org/docs/Wiki/Move_towards_point
Additional Instance and Motion functions are documented here.
http://enigma-dev.org/docs/Wiki/Instance_and_Motion_Functions
The acceleration you can control yourself using the speed variable. You could also take the distance between the two points (Pythagorean theorem; also the point_distance function) and divide it by some arbitrary number and use that as the speed, then the object will be faster when it is further away and get exponentially slower as it gets closer and closer to the point.
http://enigma-dev.org/docs/Wiki/Move_towards_point
Additional Instance and Motion functions are documented here.
http://enigma-dev.org/docs/Wiki/Instance_and_Motion_Functions
The acceleration you can control yourself using the speed variable. You could also take the distance between the two points (Pythagorean theorem; also the point_distance function) and divide it by some arbitrary number and use that as the speed, then the object will be faster when it is further away and get exponentially slower as it gets closer and closer to the point.
869
Programming Help / Re: Script problem
« on: September 26, 2014, 01:01:25 pm »
Yes sir I can move it for you! You were looking for Programming Help. I would like to call your attention to the functions move_towards_point and mp_potential_step which are designed to move the object towards a point while avoiding other objects and such. Though the later of these functions is a little finicky in ENIGMA due to the difference in implementation however playing with the settings function for it does make it work. We currently have a ticket filed on it not working exactly the same as GM though.
https://github.com/enigma-dev/enigma-dev/issues/678
Additional details as to what you are looking to do would also be helpful, such as do you want to avoid other objects? Are you looking to calculate the shortest path and not just any path?
https://github.com/enigma-dev/enigma-dev/issues/678
Additional details as to what you are looking to do would also be helpful, such as do you want to avoid other objects? Are you looking to calculate the shortest path and not just any path?
870
General ENIGMA / Re: Please vote for ENIGMA's new license
« on: September 26, 2014, 12:53:05 pm »
Mmmm, IsmAvatar, I am not sure about what you are saying because the extent to which ENIGMA and LGM work together is limited, the same could be accomplished in LGM with a Studio plugin which I had contemplated before. I think more of that would reside in the plugin for LGM wouldn't it? Or probably not since the license we want for ENIGMA is to stop people from fixing important bugs and closing off the source code to us.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 »