Welcome, Guest. Please login or register.


Author Topic: fun with margins (Read 3976 times)

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
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
[ Guests cannot view attachments ]
- moving screen
- fixed left margin increments (+-1)

tsweep1:
[ Guests cannot view attachments ]
- static screen
- fixed margin increments (+-1)

tsweep2
[ Guests cannot view attachments ]
- moving screen
- "random" left margin increments (+-1)

tsweep3:
[ Guests cannot view attachments ]
- 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: 355
  • Country: pl
Re: fun with margins
« Reply #1 on: 2015.March.14. 23:08:51 »
Second: "movable and resizable square"

tsquarem
[ Guests cannot view attachments ]
- an animated "demo"

tsquarer
[ Guests cannot view attachments ]
- 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: 355
  • Country: pl
Re: fun with margins
« Reply #2 on: 2015.March.14. 23:13:56 »
Third: "movable and resizable circular shape"

tcirclem
[ Guests cannot view attachments ]
tcircler
[ Guests cannot view attachments ]
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: 355
  • Country: pl
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 »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • 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
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: 355
  • Country: pl
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:
[ Guests cannot view attachments ]
- a "noise" animation of screen ends using "random" increments/decrements

tsweep5:
[ Guests cannot view attachments ]
- "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: 355
  • Country: pl
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

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: fun with margins
« Reply #8 on: 2015.March.16. 20:00:31 »
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
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 )