10.03.2019 - Round 1 results of our "A Love Letter For FreeBASIC" game dev competition have been published. Please be sure to check the results thread: http://games.freebasic.net/forum/index.php?topic=629.0. Don't forget that the competition is continuing with a round 2, lasting till 29th of April, 300 USD first prize. Stay tuned!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - relsoft

Pages: [1]
1
General Discussion / Wet Pussy!
« on: January 19, 2013, 01:09:31 AM »



Trollolololol!

2
Showcase / Convex Wars FB
« on: October 14, 2012, 02:44:08 AM »
Hello guys, I made a new little game.

Screens:



Download:
http://rel.phatcode.net/junk.php?id=128

Controls:
   -See in-game instructions

About the game:

   Just a minigame I made over the week to showcase Easy GL2D for FreeBasic.
   Original game was an even smaller minigame I made in C++ to showcase Easy GL2D for C/C++.
   It is also notable that because I wanted this game (the source at least)
       to be a sort of a teaching material, I used the "easiest" ways to make this game.
      Which means that I used internal FB commands almost exclusively, major absence of
      pointers and use dim/redim as opposed to new[] (except for the polygon class).
      Doing so did not really hamper the game's speed in any way so I guess FB's dynamic
      allocation with run-time checks for arrays are not that slow as anyone might think. ;*)
      I also commented the source like crazy so that anyone reading it could understand
      the gist of what the code does.
   Don't expect much from this as my purposes in making this game are:
   - Stresstest and showcase Easy GL2D
   - Make a game that only use the GlowLine() sub
   - To make an example of how to make games in FB easily using some
      of the most commonly used coding techniques( FSM, Factories, SAT(Separating Axis Theorem), etc )
   - Share some of the most common classes I use (Keyboard, Joystick, Mouse, Vector2D, Polygon2D, etc)
   - Brush up on my FB knowledge. I keep forgeting "then" and type {} in my for-loops, typing "switch"
       for select cases, etc. but it was fun.
   
Gameplay:

   An asteroids clone with a funky experimental control system.
   Just shoot everything that moves.
   This is a "vector" game so GFX are made of simple glowlines.
   Gameplay is kinda boring to say the least.
   
Sourcecode:
   Sourcecode is provided for learning purposes.
   Use to your hearts content, but I would enjoy knowing the things you used it for.
   Code should never be used to harm anyone.
   I used FBedit to code this game

4
General Discussion / Phishing
« on: July 02, 2008, 07:46:54 PM »
;*)

A video of my 3 month old betta fry (siamese fighting fish).

http://youtube.com/watch?v=-CugkiPcnaI

BTW, can you imbed youtube vids on this forum?

5
General Discussion / Pimp my phish...
« on: March 18, 2008, 09:30:20 AM »

6
Programming / Glow
« on: January 31, 2008, 09:43:06 AM »

''Realtime Glow
''Relsoft (http://rel.betterwebber.com)
''Jan 31, 2008
''Fast Blur code by Jim Scott (blackpawm.com)



#include "fbgfx.bi"


declare sub blur_h(byval source as uinteger ptr, byval dest as uinteger ptr,_
            byval wid as integer, byval hei as integer, byval radius as uinteger)
declare sub blur_v(byval source as uinteger ptr, byval dest as uinteger ptr,_
            byval wid as integer, byval hei as integer, byval radius as uinteger)           


const SCR_W = 640
const SCR_H = 480

screenres SCR_W,SCR_H,32,


dim as FB.Image ptr image = imagecreate(SCR_W,SCR_H)
var image_ptr = cast(uinteger ptr, image+1)



dim as FB.Image ptr image2 = imagecreate(SCR_W,SCR_H)
var image_ptr2 = cast(uinteger ptr, image2+1)


randomize timer
 
cls

 get(0,0)-(SCR_W-1,SCR_H-1), image2
 
dim as integer x, y, i, j


for i = 0 to 100
    line(rnd*SCR_W, rnd*SCR_H)-(rnd*SCR_W, rnd*SCR_H), rgb(rnd*255,rnd*255,rnd*255)
next i



get(0,0)-(SCR_W-1,SCR_H-1), image


blur_h(image_ptr,image_ptr2,SCR_W, SCR_H, 4)
blur_v(image_ptr2,image_ptr,SCR_W, SCR_H, 4)
blur_h(image_ptr,image_ptr2,SCR_W, SCR_H, 2)
blur_v(image_ptr2,image_ptr,SCR_W, SCR_H, 2)


Print "Press any key to glow..."
sleep


put(0,0), image,add
sleep


sub blur_h(byval source as uinteger ptr, byval dest as uinteger ptr,_
            byval wid as integer, byval hei as integer, byval radius as uinteger)
    dim as uinteger x, y, pixel
    dim as uinteger r, g, b, a
    dim as uinteger divisor
    dim as integer kx
    divisor = (radius * 2 + 1)
        for y = 0 to hei -1
            for x = 0 to wid - 1                               
                r = 0
                g = 0
                b = 0
                a = source[y * wid + x] shr 24
                for kx = -radius to radius
                    pixel = source[y * wid + x + kx]
                    r += (pixel shr 16 )
                    g += (pixel shr 8) and 255
                    b += (pixel and 255)
                next kx                               
                r \=divisor
                g \=divisor
                b \=divisor
                dest[y * wid+x] = a shl 24 or r shl 16 or g shl 8 or b
            next x
        next y
end sub
 
sub blur_v(byval source as uinteger ptr, byval dest as uinteger ptr,_
            byval wid as integer, byval hei as integer, byval radius as uinteger)
    dim as uinteger x, y, pixel
    dim as uinteger r, g, b, a
    dim as uinteger divisor
    dim as integer ky
    divisor = (radius * 2 + 1)
 
      for x  = 0 to wid - 1         
            for y = radius to (hei - 1)  - radius                               
                r = 0
                g = 0
                b = 0
                a = source[y * wid + x] shr 24
                for ky = -radius to radius
                    pixel = source[x + (y + ky)*wid]                                       
                    r += (pixel shr 16 )
                    g += (pixel shr 8) and 255
                    b += (pixel and 255)
                next ky                     
                r \=divisor
                g \=divisor
                b \=divisor
                dest[x + y*wid] = a shl 24 or r shl 16 or g shl 8 or b
            next y           
      next x
         
end sub


Could be used in just about anything(not only lines)

Pages: [1]