Welcome, Guest. Please login or register.


Author Topic: fun with margins (Read 1496 times)

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
fun with margins
« on: 2015.March.14. 22:54:35 »
Here are a few screen-transition effects obtained by modifying values of margins and line pointer of each modeline. The examples work in 160x144 16-c square pixel "mode" but the code works for all screens (I think) with more than one modeline for display block...

First "screen swipe":

tsweep0
11769-0
- moving screen
- fixed left margin increments (+-1)

tsweep1:
11771-1
- static screen
- fixed margin increments (+-1)

tsweep2
11773-2
- moving screen
- "random" left margin increments (+-1)

tsweep3:
11775-3
- static screen
- "random" margin increments (+-1)

Don't know if anyone is interested in the code but I'm posting it anyway...

Controls: joy left/right

front.asm and back.asm are the images used for background graphics...
« Last Edit: 2015.March.14. 23:18:32 by ssr86 »

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #1 on: 2015.March.14. 23:08:51 »
Second: "movable and resizable square"

tsquarem
11781-0
- an animated "demo"

tsquarer
11784-1
- you move and resize with joystick (no animation)

Controls:
- you can move the visible square area with the joystick
- joystick fire+up/down changes the size of the visible square (won't really work with the animated one)

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #2 on: 2015.March.14. 23:13:56 »
Third: "movable and resizable circular shape"

tcirclem
11789-0
tcircler
11792-1
the same as tsquare but with circular shape(although the shape seems a little off...)

The sources aren't commented and may be a bit messy...sorry for that

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #3 on: 2015.March.14. 23:29:53 »
All presented effects can be used as in-game screen transition animations. The more modelines your lpt display block uses the better the effect can look...
These margin-effects don't require changes to graphic data - only lpt is modified.

Any convex shape should be obtainable (not only rectangle/square or circle/ellipse)... So for example a cross, a diamond or a hexagon..

There are some glitches when you resize the shape after moving the center of the square/circle near the left or right screen boundary... I haven't secured all bad cases it seems...
« Last Edit: 2015.March.14. 23:34:53 by ssr86 »

Online Zozosoft

  • EP addict
  • *
  • Posts: 13531
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • http://enterprise.iko.hu/
Re: fun with margins
« Reply #4 on: 2015.March.15. 07:02:21 »
Amazing! :smt038 :smt038 :smt038

Offline CiH

  • Newbie
  • Posts: 23
  • OS:
  • Mac OS X 10.7 Mac OS X 10.7
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #5 on: 2015.March.15. 21:46:33 »
Agreed, is amazing.

Full demo, or even a nice 4ktro sometime, pretty please ;-)

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #6 on: 2015.March.16. 01:49:51 »
Yeah, these effects look quite good but the best is that they're quite cheap (about 0.5-1.0 frame)  and don't corrupt the screen buffers so can be used in games. Not much additional memory needed - only the routine and one 256-byte lut. The code is not optimized (the circle one the most).

Here are two more variations:

tsweep4:
11803-0
- a "noise" animation of screen ends using "random" increments/decrements

tsweep5:
11806-1
- "random" margin increments/decrements (both margins)
- static screen
- move joystick left and right to animate

tsweep5 could be changed to use fixed increments/decrements

Offline ssr86

  • EP user
  • *
  • Posts: 359
  • Country: pl
  • OS:
  • Windows NT 6.2 Windows NT 6.2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: fun with margins
« Reply #7 on: 2015.March.16. 02:40:41 »
...and one more:

tsweep6
- "random"changes of margins
- background is static
- screen disappears at the right side and appears from the left side (previously was right/right)

Offline szipucsu

  • EP addict
  • *
  • Posts: 8094
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: fun with margins
« Reply #8 on: 2015.March.16. 20:00:31 »
SOUND SOURCE 3,STYLE 16,LEFT 16,RIGHT 64,SYNC 2
SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 2
SOUND PITCH 25,SYNC 2
Videos

Online geco

  • EP addict
  • *
  • Posts: 5430
  • Country: hu
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 31.0 Firefox 31.0
    • View Profile
Re: fun with margins
« Reply #9 on: 2015.March.17. 20:45:03 »
Cool, CiH has right, you could make a small demo with these effects, even in higher resolution, as I saw not all effects could be used if 1 LPB is one vertical line in this form, but I am sure you could do it also.
Ex on an Attribute screen these effects should be more powerful :) ( in this case 4K demo is out of scope :D )