1. Additional Video Pages
- Posted by William Eiten <atompunk at ROF.NET> Mar 26, 1997
- 1049 views
I am making a game and would like to know how to get more video pages in mode 19, 320x200 256 colors. I think I've seen it before but don't remember where. I don't have a whole lot of the details of the game worked out, but I am planning on making it some sort of a strategy game. Thanks for any help. William
2. Re: Additional Video Pages
- Posted by David Alan Gay <moggie at INTERLOG.COM> Mar 26, 1997
- 1052 views
> I am making a game and would like to know how to get more video pages in > mode 19, 320x200 256 colors. I think I've seen it before but don't > remember where. I don't have a whole lot of the details of the game worked > out, but I am planning on making it some sort of a strategy game. Thanks > for any help. > > William Well, remember that you can always save a screen using save_image(), to store the current screen display if you want to generate a new screen. When you want one of the screens redisplayed, just redisplay using display_image(). This way, you can swap between as many screens as desired. Hope this helps David Gay http://www.interlog.com/~moggie/Euphoria "A Beginner's Guide To Euphoria"
3. Re: Additional Video Pages
- Posted by Michael Packard <lgp at EXO.COM> Mar 26, 1997
- 1051 views
On Wed, 26 Mar 1997, William Eiten wrote: > > I am making a game and would like to know how to get more video pages in > mode 19, 320x200 256 colors. I think I've seen it before but don't > remember where. I don't have a whole lot of the details of the game worked > out, but I am planning on making it some sort of a strategy game. Thanks > for any help. You get one display page in 320x200x256 mode. The best way I know to work with it is to have a Virtual Screen, a screen sized sequence in ram, then "draw" your sprites into it by indexing into the sequence. After you "draw" all your sprites, you update the actual graphics screen by grabbing the changed regions of the Virtual Screen (with a few pixel border to help erase the previous sprite positions) and display_image() them to the screen. It sounds pretty complicated, but once you figure it out, it's VERY straightforward. The only confusing part is the actual "drawing." In my SpriteEngine I do something like: setVS -- this makes a clean copy of the background screen_update={0,1,0,1} -- is is my table of regions in VS to update to the screen. for each sprite procedure draw_sprite(atom x, atom y) for i = 1 to length(sprite) --height for j= 1 to length(sprite[1]) --width a=sprite[i][j] -- color of pixel in sprite if a>0 then -- if the color is 0 don't draw it, thus masking the sprite with the background VS[y+i][x+j]=a -- replace whatever is at that location with a end for end for screen_update=append -- add a 3 pixel safety region around it to erase the last position, -- increase this is if it moves more than 3 pixels in any direction end procedure Then after you get done with all your sprites, do through the screen_update() table and grab regions from the VS and display_image them. The format above for that table is {x1,x2,y1,y2} for the regions from {x1,y1} to {x2,y2}. Michael Packard Lord Generic Productions lgp at exo.com http://exo.com/~lgp A Crash Course in Game Design and Production http://exo.com/~lgp/euphoria
4. Re: Additional Video Pages
- Posted by "Cuny, David" <ATB.DCUNY at HW1.CAHWNET.GOV> Mar 27, 1997
- 1082 views
re: Video pages I'm under the impression that one of the unchained Mode X resolutions actually supports 4 video screens. The problem is, you would need to write all your own tools to use the mode, since Euphoria doesn't support it. There is a good tutorial with C-code examples in the PC-GPE (PC Game Programmer's Encyclopedia), an excellent freeware collection of articles on game programming related topics. It looks like an easy enough port to Euphoria, if you use Jacques' port writing tools. It's also got a nice series of tutorials on Mode 13h, including one on writing virtual screens. If you want to get more speed, take a look at Jiri's "Aliens!" program, which uses mem_copy() to do video moves, which is much faster than working with sequences, but again, you would need to write your own primitives. -- David Cuny