Search found 652 matches

by bluatigro
Sep 23, 2012 9:23
Forum: General
Topic: design pattern : abstract factory
Replies: 6
Views: 1157

Re: design patern : abstract factory

i translated this from c++

i fond the book "thinking in c++" volume 2

on internet

i dont have the URL

this was the only game related code in the book
by bluatigro
Sep 21, 2012 11:29
Forum: General
Topic: design pattern : abstract factory
Replies: 6
Views: 1157

design pattern : abstract factory

this is a try at a abstract factory design pattern i got some errors ''abstract factory type obstacle public : declare sub action end type type player public : declare sub interactWhit( ob as obstacle ) end type type kitty( player ) public : declare sub interactWhit( ob as obstacle ) end type sub ki...
by bluatigro
Sep 20, 2012 11:51
Forum: General
Topic: design pattern : singleton
Replies: 3
Views: 1087

design pattern : singleton

this is a try at a singleton design pattern a singleton is a class where there can only be 1 instance of type singleton private : declare constructor() declare destructor() singleton operator = () singleton( singleton q ) dim as singleton m_singleton public : def static function getInstance() as sin...
by bluatigro
Sep 20, 2012 11:28
Forum: Windows
Topic: wire world
Replies: 2
Views: 484

wire world

this is a try at a wire world there is somthing wrong whit my wire cube it shoot move on cursorkey but it act strange use [esc] key to end 'game' #include once "windows.bi" dim shared as integer key( 255 ) dim shared as integer mouse_x dim shared as integer mouse_y dim shared as integer mo...
by bluatigro
Jul 16, 2012 12:10
Forum: Game Dev
Topic: the pit
Replies: 3
Views: 1169

the pit

try this game : #include "fbgfx.bi" #if __FB_LANG__ = "fb" Using FB '' Scan code constants are stored in the FB namespace in lang FB #endif declare sub drawpit declare sub restart dim shared as integer p( 40 , 30 ) , humanx , humany dim shared as integer stonest , stonex , stoney...
by bluatigro
Jun 07, 2012 12:52
Forum: General
Topic: anaglyph
Replies: 0
Views: 255

anaglyph

this is a try at anaglyph 1.5 inprovements : - i wanted to use a OR pen . how ? - red and blue can be switched i cant check if this is working due to my stereo-blindnes so look for your red blue glasses and report ''create matrix type to hold position & orentation type matrix dim as single m( 3 ...
by bluatigro
Jun 05, 2012 11:32
Forum: General
Topic: Genetic Programming
Replies: 0
Views: 263

Genetic Programming

this is a translation from a libertybasic program i wrote some time ago Genetic Programming : - 1 activate some genes - 2 write some random function programs - 3 calculate fitnes function for each function program - 4 sort function programs on output fitnes function - 5 use crossover to calculate so...
by bluatigro
May 27, 2012 15:07
Forum: Beginners
Topic: split( a as string ) as string() ?
Replies: 11
Views: 910

Re: split( a as string ) as string() ?

here is a try at it myself error : - code does not print anyting dim as string test = "this is a test ." dim shared as string word( 40 ) declare sub split( a as string , cut as string = " ") sub split( a as string , cut as string = " " ) dim i as integer , tel as intege...
by bluatigro
May 25, 2012 10:41
Forum: General
Topic: flocking
Replies: 10
Views: 385

Re: flocking

update : - added opengl error : - i got some verry cryptic error messages #include once "GL/gl.bi" #include once "GL/glu.bi" dim shared as integer mouse_x dim shared as integer mouse_y dim shared as integer mouse_button const as double PI = atn( 1 ) * 4 const as integer false = 0...
by bluatigro
May 24, 2012 13:24
Forum: General
Topic: flocking
Replies: 10
Views: 385

flocking

the algoitm i got whit a google seartch i m looking for a algoitm that works whit angles the i can add some opengl why is this wrong ? : if b <> boid( i ) then type t3d dim as single x , y , z declare constructor ( x as single = 0 , y as single = 0 , z as single = 0 ) end type operator + ( a as t3d ...
by bluatigro
May 21, 2012 9:46
Forum: Game Dev
Topic: invaders from space
Replies: 16
Views: 3036

Re: invaders from space

@ fxm : i shoot have thought of that update : code altered accordingly error : - only a black screen is showing - code reacts strange on esc const as integer false = 0 const as integer true = not false ''primary colors const as integer black = &h000000 const as integer red = &hff0000 const a...
by bluatigro
May 20, 2012 14:22
Forum: Game Dev
Topic: invaders from space
Replies: 16
Views: 3036

Re: invaders from space

@ fxm : forgot , in example did use it in code does stil not work here the code whit images in sprite class : const as integer false = 0 const as integer true = not false ''primary colors const as integer black = &h000000 const as integer red = &hff0000 const as integer green = &h00ff00 ...
by bluatigro
May 19, 2012 16:20
Forum: Game Dev
Topic: invaders from space
Replies: 16
Views: 3036

Re: invaders from space

update : i tryed somthing else : a mask that worked i tryed a image in my rect class but circle enemy.img ( 30 ,30 ) , 30 , red ,,,, f etc... gave a syntax error : "." where "," expected so i cant do that whit a mask you can do more then i m showing now const as integer false = 0...
by bluatigro
May 18, 2012 13:02
Forum: Game Dev
Topic: invaders from space
Replies: 16
Views: 3036

Re: invaders from space

@ fxm : it is beging to look nice now update : - now whit somewhat better graphics only the fire looks a little strange i shal change my rect into a sprite object later i have begone to think what is nesesery in a sprite object const as integer false = 0 const as integer true = not false ''primary c...
by bluatigro
May 18, 2012 12:50
Forum: General
Topic: perlin noise
Replies: 2
Views: 298

perlin noise

i copyed this from a libertybasic program [ that worked ] i wrote myself but in FB it does not work wel you shoot see a explosion like graphic dim shared as integer low , NumberOfOctaves const as single pi = atn( 1 ) * 4 const as integer black = rgb( 0 , 0 , 0 ) const as integer red = rgb( 255 , 0 ,...

Go to advanced search