View RSS Feed

code_glitch

Prometheus gets anti-aliasing, improved initialization, scaling and rotations...

Rate this Entry
Just got some more work in the prometheus interface. Added basic support for Scaling surfaces, rotating them and selectable levels of anti-aliasing/quality. Finished a sample program of the new prometheus interface and here it is: (most of it is comments though)

Code:
program PromVTest;

uses
	Prometheus_Vid,
	sdl;

var
	Image: pSdl_Surface;
	
begin
	//init stuff
	sdl_init(sdl_init_everything);
	
	//the prometheus stuff starts here:
	
	//make a window with prometheus and set the video modes
	CreateWindow(640, 480, 32, Sdl_HwSurface);
	
	//set prometheus quality levels
	SetPrometheusAA_Rotating(1); 									//rotation quality
	SetPrometheusAA_Scaling(1); 									//scaling quality
	SetPrometheusAA_General(1);									//quality levels of everything else
	
	Image := LoadImage('TestImage.png');							//load image from disk
	DrawImage(0, 0, RotateImage(40, ScaleImage(0.8, Image))); 			//draw the rotation of a scaled image. or you could:
	DrawImage(100, 100, ScaleImage(0.8, RotateImage(40, Image))); 		//draw the scaled version of a rotated image. Its the same quality either way
	DrawImage(200, 200, RotoScaleImage(40, 0.8, Image));				//or you can do it all in one. whichever suits you. 
	//Note: RotoScaleImage() uses both AA_Rotating and AA_Scaling settings. Its is the only exception to AA_General Rule
	
	UpdateCanvas(); 																					 //same as sdl_flip(screen)
	
	//wait
	readln();
end.
This is getting close to a 0.1 release of the Prometheus video unit... A few extra weeks and we should be there.

cheers,
code_glitch.

Submit "Prometheus gets anti-aliasing, improved initialization, scaling and rotations..." to Digg Submit "Prometheus gets anti-aliasing, improved initialization, scaling and rotations..." to del.icio.us Submit "Prometheus gets anti-aliasing, improved initialization, scaling and rotations..." to StumbleUpon Submit "Prometheus gets anti-aliasing, improved initialization, scaling and rotations..." to Google

Tags: prometheus Add / Edit Tags
Categories
Uncategorized

Comments

  1. code_glitch's Avatar
    This is quite annoying, the comments wont indent in a uniform line. Sorry viewers, I'm a bit of a perfectionist...
  2. WILL's Avatar
    I assume that with scaling, rotations, blending and even anti-aliasing you're planning on providing some hardware acceleration as well? I have a feeling that otherwise, even beginners will quickly outgrow SDL-only performance of these rather slow-in-software-only graphics effects. Even DelphiX had some 3D acceleration with D3D to help with these functions.

    Other than that concern, not bad. How are you planning on handling image/texture files/packing?
  3. code_glitch's Avatar
    No textures yet, and yes I am planning on adding hardware acceleration to the mix. The code behind the basic version will remain with sdl, but for better performance I plan to release a OpenGl based version for better performance. In terms of textures I hope to be able to base it all on the work out there and to top it off, I have a vague idea for a particle system (advanced version only?).

    In the future, if this becomes successful, I will create a thread and perhaps a dedicated site for the docs. If all goes well, you guys can have the .ppu and .o files by next Friday, although it depends on how much free time I get with all my homework and etc.
  4. WILL's Avatar
    Particles is very advanced stuff, especially for beginners. I'd stay that option until you've perfected the basics perhaps. The Scale, Rotate and Fade effects usually are enough to wet most beginner's appetites until they learn enough to move up to bigger and better things. There is a lot to learn from just using different sprite-ing techniques transparency through a single transparent color value, using ADD logic to mix color for fire and other glow effects and so on.

    Though if you wanted to make Prometheus capable of doing higher end things, you could always add on after you've gotten the basics done. Something I've always found neat was the old PowerDraw functions for drawing smooth lines and shapes along with all the cool effects you could play with too. A lot of beginners who learn Pascal in highschool CS classes learn to use line and shape drawing before they jump into sprites for their first few game projects. I think they may love the ability to draw with attractive anti-aliased shapes and the like.

    I know this though, basic lines and shapes are a must. Though you can do some of this with SDL directly, but I don't think it's feature complete. Rectangles, Ovals/Circles, Filled versions of these, etc...
  5. code_glitch's Avatar
    Good idea. I will thus begin adding some primitive support for lines all the way up to a pentagon incl. circles and possibly ovals (really hate them though)...

    Particles are down at the bottom of the list for now, and filled primitives is now also up high on the wish list thats currently under development.
    And thanks for all the support you guys.