Results 1 to 9 of 9

Thread: Prometheus Development Thread

  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45

    Prometheus Development Thread

    Just thought, with all the progress today, that I would open the Prometheus project for the wider community to request features. At the moment I stand poised for some new ideas as basic image functionality seems to be leak free and quite efficient. Plus, I'd like to have some cool stuff in version 0.1 of the video unit and core unit (input, conversions and etc) that I'm planning to make available (source and binary) later this week.

    Here is a sample program to date:

    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.
    	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
    	
    	//And we can also run an image resize like so:
    	DrawImage(300,300, ResizeImage(50,100, Image));
    	
    	UpdateCanvas();   //same as sdl_flip(screen)
    	
    	//wait
    	readln();
    end.
    Again, sorry about the coding style, but then again no one likes anyone else's...

    And the above program yields the following output (see attached image)

    EDIT:
    sorry about the atrocious quality, it is much better in real life...

    cheers,
    code_glitch
    Attached Images Attached Images
    Last edited by code_glitch; 02-10-2010 at 05:24 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    Looks good, but why create an SDL wrapper? Do you find the wrapper increases your productivity?

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Its aimed at newbies to help them grasp the concept of how programming works and not work with some abstracts and complexities of sdl and audio directly aong with input and event handling and etc... Ie. the hard part in my learning sdl experience.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I've made a game library/engine myself way back in the day called the Pascal Sprite Engine. Wonderful name, I know. You can probably still find it out there somewhere. It was for Turbo Pascal 7 and it followed a few basic rules as far as functionality and features went. I kept the entire unit structure like a 'black box' you had a list of functions that did everything for you and you didn't have to dabble indie of it or deal with other complicated libraries or functions to make games with it.

    I assume that your goal with Prometheus is about the same?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    pretty much. My aim is based on the fact that when you start pogramming you must think about:
    -How the engine/program works
    -What the program does
    -And how it achieves that

    then you need to get that into the relevant code which isn't always too easy/intuitive. (Based on my experience) and sometime you don't know if its the design or the way its done that's giving unwanted behaviour. It's a horrible feeling as a beginner.

    The aim of Prometheus at present is simple: Make the translation into pascal as easy and intuitive as possible so that the programmer only has to worry about what matters: understanding how to build programs so that he/she can move onto full on sdl/opengl easily knowing that the way they do things is good and that it works.

    I don't know if the above is too clear, and if you don't get it too well, feel free to ask again. Its around 11PM here and I'm really tired...

    cheers,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #6
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I believe that once the coding gets mature, the documentation, tutorials and demos will be a must for the first release. I'm sure others will like this idea and want to help, maybe make a few simple demos. Documentation should be easy to read and follow. Keep it as simple as the library to use, yet detailed enough so that they understand all the aspects of your library. This of course will take time. More time than it will take to make the library it's self I'm sure.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #7
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Again, a slight update: added a google code project for prometheus here: http://code.google.com/p/prometheuslib/


    Also, WILL asked a valid point about how library management works as I didnt explain it in my last blog post, heres how:
    you have an array of objects each with:
    The data (eg fonts, image)
    Name
    Boolean whether its used or not
    and any extra data.

    Then when you call load_whatever(name, source) it loads that into the next empty slot in the array. To process it you simple do process_whatever(NAME) and it checks where it is in the array and does it for you. Its not always the most efficient, however.

    Hopefully that clarifies things as to how I would implement a library s such.

    Furthermore, all Prometheus updates will be posted here and links to the code on google code also.

    cheers,
    code_glitch

    PS: Also made a small graphics update retro style. Although it should no longer be called probewars, it looks a ton better now...
    The download links are here: http://code.google.com/p/prometheuslib/downloads/list
    The homepage is here: http://code.google.com/p/prometheuslib/
    Last edited by code_glitch; 05-10-2010 at 08:44 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  8. #8
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Yet another new feature that I was suggested in RL which I might deem feasible: character rendition engine and map rendition engine based on TileD csv along with tileset management built into Prometheus. Although I do plan on adding such functionality, would you prefer it as part of the Prometheus_Vid unit or would it be worth creating a Prometheis_Spec unit?

    Cheers,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  9. #9
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Just updated probewars. New gfx and font handling, also source compiles by default on linux and mac and windows by default.

    source: http://code.google.com/p/prometheusl...q=#makechanges
    win32: http://code.google.com/p/prometheusl...q=#makechanges

    the new runtime for windows (the dll files): http://code.google.com/p/prometheusl...q=#makechanges

    The new prometheus units source code with colour handling and ttf font handling:
    http://code.google.com/p/prometheusl...q=#makechanges

    sorry for just posting links. I can post as attachment too if you need. Home page here: http://code.google.com/p/prometheuslib/

    cheers,
    code_glitch

    ps: font is variable management. But colours is library management in the end. And hey, probewars is almost playable...
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •