Developer's diary

Started by SplinterGU, October 19, 2008, 01:05:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

#31
r30 in svn...

core:

- new string_ptoa more efficient and same result in different SO.
- check constants already defined as variable
- Fix variant arg for pointer vars
- Fix unsigned comparations

modules:
   
- 32 bits drawing alpha support (alpha-pixel and drawing_alpha)
- speed up some drawing functions
- write_var pointer vars support

sample:


import "mod_draw"
import "mod_wm"
import "mod_key"
import "mod_video"
import "mod_text"
import "mod_say"
import "mod_rand"
import "mod_map"

Process Main()
private
unsigned int ga = 255;
unsigned int r = 255, g = 255, b = 255;
unsigned int a = 255;
char * rgba;

Begin
    set_mode(640,480,32);

    write(0,10,10,0,"drawing_alpha:");   write_var(0,110,10,0,ga);
    write(0,10,20,0,"r:");               write_var(0,110,20,0,r);
    write(0,10,30,0,"g:");               write_var(0,110,30,0,g);
    write(0,10,40,0,"b:");               write_var(0,110,40,0,b);
    write(0,10,50,0,"alpha");            write_var(0,110,50,0,a);
    write(0,10,60,0,"color32:");         write_var(0,110,60,0,rgba);

    Repeat
        if (key(_1) and ga>0) drawing_alpha(ga--); end
        if (key(_2) and ga<255) drawing_alpha(ga++); end

        if (key(_q) and r>0) drawing_color(rgba(r--,g,b,a)); end
        if (key(_a) and r<255) drawing_color(rgba(r++,g,b,a)); end

        if (key(_w) and g>0) drawing_color(rgba(r,g--,b,a)); end
        if (key(_s) and g<255) drawing_color(rgba(r,g++,b,a)); end

        if (key(_e) and b>0) drawing_color(rgba(r,g,b--,a)); end
        if (key(_d) and b<255) drawing_color(rgba(r,g,b++,a)); end

        if (key(_r) and a>0) drawing_color(rgba(r,g,b,a--)); end
        if (key(_f) and a<255) drawing_color(rgba(r,g,b,a++)); end

        if (key(_SPACE)) draw_box(rand(0,640),rand(0,480),rand(0,640),rand(0,480)); end

        rgba = rgba(r,g,b,a);

        frame;

    Until(exit_status||key(_ESC))

End

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

splinter_work

Already available in SVN "Bennu Game Development 1.0.0 RC (Release Candidate)"...

josebita

I... need... more... time.... aghhhh!!
I'll upload them as soon as possible to my PPA.
Splinter, I know I owe you something, just give me some more time, my real life is starting to take all of my time :)

splinter_work

take it easy... don't hurry up.

SplinterGU

svn updated!

- New instances system, hash on priority, type. Speed up improved on iterate instances.
- Instances now are limited to 65536 running at same time
- Instances dirty list by change on priority is removed.
- collision, getid, signal,... speed up improved by use of new instance system and other.
- speed up improved on show debug info
- compiler parse number is fixed
- debug console parse number is fixed
- debug console color tags fixed
- several casts are added in code
- several sizeof are added in code
- libvideo now start in 32 bits as default
- getscreen now return graphic without control point 0, (centered)
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MythomizeR


josebita

PPA updated (should hit the servers soon, bennugd-core is already compiled & packaged in launchpad, bennugd-modules is being compiled right now).

SplinterGU

well, after a long time without an update... I just now release a new version that include all new fixes, included the use of openssl for encryption...

win32's installer works again (well, I mean, I can do compile it...)

take a look to my signature for the download... version 1.0 RC11(r131)
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

blostec

Great news, thanks for your work!

Burbruee

Latest win32-exe didn't work for me. Just flashed a command prompt quickly and disappeared and nothing was updated. Had to update manually with the compressed .rar
On Windows 7, 64-bit. UAC disabled so I have full admin rights.

Moogster

Bug report!

The map blitting functions seem to have trouble with blitting transparant onto transparant..

[code language="bennu"]

import "mod_dir"
import "mod_draw"
import "mod_debug"
import "mod_grproc"
import "mod_key"
import "mod_map"
import "mod_math"
import "mod_proc"
import "mod_screen"
import "mod_string"
import "mod_sys"
import "mod_text"
import "mod_video"
import "mod_wm"


global
   int mapToBlit;
   int mapToBlitOn;
end

process main();
private
   int i,j;
begin
   set_title("Bug!");
   set_mode(320,240,32);
   
   //Colour the background
   map_clear(0,0,rgb(200,100,100));
   
   //Make a map to draw a circle in and make it green
   mapToBlit = map_new(100,100,32);
   map_clear(0,mapToBlit,rgb(0,200,0));
   
   //Make every point further than 30px from the center transparant
   for(i=0;i<100;i++)
      for(j=0;j<100;j++)
         if(fget_dist(50,50,i,j) > 30)
            map_put_pixel(0,mapToBlit,i,j,rgba(0,0,0,0));
         end
      end
   end
   
   //Make a big empty map
   mapToBlitOn = map_new(320,240,32);
   
   
   //Try to put the circle on the empty map
   map_put(0,mapToBlitOn,mapToBlit,160,120);
   
   
   //Should give a green circle on the red main background
   graph = mapToBlitOn;
   x = 160; y = 120;
   
   //But it doesn't, even though the map with the circle DOES have transparant surroundings!
   while(!key(_ESC) && !exit_status)
   
      //Press S to see that the map with the circle is transparant
      if(key(_s))
         graph = mapToBlit;
      end
      
      frame;
   end
end
[/code]

Windgate

Some graphic functions don't works well with 32 bits colour mode... I don't know what is a "blit", but that bug may be only with 32 bits colour mode.
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es