Moving the window on a frame-by-frame basis - good idea?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Moving the window on a frame-by-frame basis - good idea?
A small question for an idea I wanted to do, akin to how some games have screen shake to simulate staggering effects, I'd like to apply that shake to not only the game, but to the entire window itself. I've done some demoing on Windows and it doesn't seem to have any adverse effects outside of not being able to drag the window to a new position (an implementation fault on my part, probably). As window functions tend to be unfriendly when it comes to overhead and other factors, as I've heard, is this a fine thing to do?
Re: Moving the window on a frame-by-frame basis - good idea?
Make it optional, so people can deactivate it when it causes issues on their system
If you add a .love I'll gladly test it on OSX.
If you add a .love I'll gladly test it on OSX.
Re: Moving the window on a frame-by-frame basis - good idea?
It sounds like a cool idea.
The only problem I see is that it might not be that portable...
My windowmanager would probably just ignore the request.
Also, make sure the window has the same position after the shake than before!
Otherwise it might just move off screen after a couple of times, which would be annoying.
Whether this is expensive performance-wise I don't know, but you should probably test it.
The only problem I see is that it might not be that portable...
My windowmanager would probably just ignore the request.
Also, make sure the window has the same position after the shake than before!
Otherwise it might just move off screen after a couple of times, which would be annoying.
Whether this is expensive performance-wise I don't know, but you should probably test it.
Re: Moving the window on a frame-by-frame basis - good idea?
Glad to see there's interest in the idea! For testing, here's a love of the game with the WindowShake module I threw together, dropboxed because it's too large to be attached. Arrow keys to move and jump, and pretty much everything else is irrelevant, but you're still free to poke around if you desire.
The way I made it work, it takes into account the window's previous position before and after the shake is applied. It should, anyway.undef wrote:It sounds like a cool idea.
The only problem I see is that it might not be that portable...
My windowmanager would probably just ignore the request.
Also, make sure the window has the same position after the shake than before!
Otherwise it might just move off screen after a couple of times, which would be annoying.
Whether this is expensive performance-wise I don't know, but you should probably test it.
Re: Moving the window on a frame-by-frame basis - good idea?
There's no lag or performance impact noticeable on (arch) linux. The window is almost as large as my screen so the effect isn't very noticeable though, I'm going to make it smaller for testing.
Edit: it looks and feels great, adds a lot more feel and intensity to the actually rather small screenshake.
Edit: it looks and feels great, adds a lot more feel and intensity to the actually rather small screenshake.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Moving the window on a frame-by-frame basis - good idea?
Works flawlessly on my Win7 (64bit, though with 32bit löve) as well; no lag whatsoever.
Interesting little game, though for some reason, i expected the world to be toroidal
Edit: One little issue; it always resets to the first monitor id when shaking; i'd suggest checking which screen its on _currently_, otherwise it will always snap back to that monitor on a multi screen setup.
Interesting little game, though for some reason, i expected the world to be toroidal
Edit: One little issue; it always resets to the first monitor id when shaking; i'd suggest checking which screen its on _currently_, otherwise it will always snap back to that monitor on a multi screen setup.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Moving the window on a frame-by-frame basis - good idea?
The main menu works, but when I start the game this happens:
P.S.: You really make some nice music!
P.S.: You really make some nice music!
Re: Moving the window on a frame-by-frame basis - good idea?
That's the goal!S0lll0s wrote:Edit: it looks and feels great, adds a lot more feel and intensity to the actually rather small screenshake.
There's a really, really high chance you're not using the latest version of love.undef wrote:The main menu works, but when I start the game this happens:
P.S.: You really make some nice music!
Also, it's not mine, it's by a guy named No Mana. https://soundbutt.com/ihavenomanas
Good catch, forgot to account for multiple displays. Thanks for that.zorg wrote:Edit: One little issue; it always resets to the first monitor id when shaking; i'd suggest checking which screen its on _currently_, otherwise it will always snap back to that monitor on a multi screen setup.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Moving the window on a frame-by-frame basis - good idea?
No problemKingdaro wrote:Good catch, forgot to account for multiple displays. Thanks for that.
As Kingdaro said (and i experienced as well), you're running an older than 0.9.2 version of love (or at least, have it in your path, if you're on windows)undef wrote:The main menu works, but when I start the game this happens
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Prole
- Posts: 39
- Joined: Thu Jan 22, 2015 5:46 am
[REMOVED]
[MESSAGE REMOVED BY OWNER]
Last edited by RaptrStudios on Sun Mar 29, 2015 12:35 am, edited 2 times in total.
Raptr Studios
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests