Author Topic: Flip/Mirror views involving the cam object. (Klazen's Studio Engine) (RESOLVED.)  (Read 2040 times)

TheGamerGuy500

  • Cherry Eater
  • Posts: 62
  • I'm a gamer and a guy, video-game-music junkie...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 48.0.2564.109 Chrome 48.0.2564.109
    • View Profile
    • TheGamerGuy500 HQ
  • Playstyle: Keyboard
This screenie should tell you how I set it up, of course with me blindly thinking that this would, I dunno, WORK?
Anyway, I'd like some assistance with making this work if you would please...

You might have to just visit https://prntscr.com/a3q05z to see a zoomed in version of it.
The image should tell you all you need to know.

"Lots of removed spaces so just" means I just put a lot of spaces to hide any irrelevant code. Forgot to finish typing that.

I've also tried using surfaces and that works UNTIL YOU SHIFT THE CAMERA and then everything goes black. In fullscreen, it moves the whole camera an entire screen to the left or right. In the normal window, it's just black. https://prntscr.com/a3qduo
« Last Edit: February 16, 2016, 03:43:14 PM by TheGamerGuy500 »
Pro tip: you gotta run and jump at the same time!
Notice: She doesn't stop spinning.

:KappaHD:

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 48.0.2564.109 Chrome 48.0.2564.109
    • View Profile
  • Playstyle: Keyboard
Re: Flip/Mirror views involving the camera object. (Klazen's Studio Engine)
« Reply #1 on: February 15, 2016, 03:56:22 PM »
you might have to use surfaces. draw the view to a surface, then draw the surface with xscale -1.
(click to show/hide)

smoke weed everyday

TheGamerGuy500

  • Cherry Eater
  • Posts: 62
  • I'm a gamer and a guy, video-game-music junkie...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 48.0.2564.109 Chrome 48.0.2564.109
    • View Profile
    • TheGamerGuy500 HQ
  • Playstyle: Keyboard
Re: Flip/Mirror views involving the camera object. (Klazen's Studio Engine)
« Reply #2 on: February 15, 2016, 03:56:57 PM »
Just added that to the post, it doesn't work after you shift the camera...
Pro tip: you gotta run and jump at the same time!
Notice: She doesn't stop spinning.

:KappaHD:

TheGamerGuy500

  • Cherry Eater
  • Posts: 62
  • I'm a gamer and a guy, video-game-music junkie...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 48.0.2564.109 Chrome 48.0.2564.109
    • View Profile
    • TheGamerGuy500 HQ
  • Playstyle: Keyboard
Re: Flip/Mirror views involving the camera object. (Klazen's Studio Engine)
« Reply #3 on: February 16, 2016, 12:13:29 PM »
you might have to use surfaces. draw the view to a surface, then draw the surface with xscale -1.
I had used the application surface method, and the manual says surfaces are like unstable when you do other things with the computer.
If you could supply me with some kinda fail-proof code for drawing a view-only surface with this engine, I'd appreciate that.
Pro tip: you gotta run and jump at the same time!
Notice: She doesn't stop spinning.

:KappaHD:

patrickgh3

  • Spike Dodger
  • Posts: 169
  • stay optimistic! :D
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 44.0 Firefox 44.0
    • View Profile
    • Github
  • Playstyle: Keyboard
Here's how I would do make a camera object to do this using views: https://klazen.com/gm/07Q.

However, now I realize it might be simpler just to redraw the application surface flipped. So either do the solution above or the solution below, but not both obviously.

In Studio, add this snippet to a Draw GUI End event:
Code: [Select]
if global.mirror {
    draw_surface_ext(application_surface,800,0,-1,1,0,c_white,1)
}

TheGamerGuy500

  • Cherry Eater
  • Posts: 62
  • I'm a gamer and a guy, video-game-music junkie...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 48.0.2564.109 Chrome 48.0.2564.109
    • View Profile
    • TheGamerGuy500 HQ
  • Playstyle: Keyboard
Thanks for the help, but the first option creates the same tile-less effect as before, and redrawing the application surface doesn't work in big rooms that use the camera object. When I start the file with global.mirror, it just presents a black screen. I even put it in DrawGUI end...

EDIT: Whoops, I still had a screen-flipping code in world.roomstart. so the application surface method kinda works? I went back to a previous application surface code I found online, and that works until I go down a screen, then it's all black. this is also with the original camera's code listed in the screenie.

EDITS EDIT: Okay, so all I had to do with the app surface is not base it upon view co-ords. It works, but transparent objects get raped though. Thank you guys so much for your help.
« Last Edit: February 16, 2016, 03:42:42 PM by TheGamerGuy500 »
Pro tip: you gotta run and jump at the same time!
Notice: She doesn't stop spinning.

:KappaHD: