Search found 64 matches

by Pitto
Sep 09, 2017 19:43
Forum: Tips and Tricks
Topic: Average color function
Replies: 3
Views: 301

Re: Average color function

Hi Muttonhead, you're right. Here's a better version. http://www.pitto.cloud/freebasic_img/avg_color_2.gif #include "fbgfx.bi" #DEFINE debug 1 'Average color function: 'given an array of rgb colors values as argument 'returns the average color using the arithmetic mean function average_col...
by Pitto
Sep 03, 2017 10:00
Forum: Tips and Tricks
Topic: Polygons filled using scan line algorithm
Replies: 15
Views: 399

Re: Polygons filled using scan line algorithm

@MrSwiss
Thanks for the correct translation.
I'll use it on a vector graphic low poly editor I'm currently working on.
by Pitto
Sep 03, 2017 9:59
Forum: Tips and Tricks
Topic: Average color function
Replies: 3
Views: 301

Average color function

This functions returns the average color (arithmetic mean) of a monodimensional array of rgb values Something like this: http://www.pitto.cloud/freebasic_img/avg_color.gif #include "fbgfx.bi" 'Average color function: 'given an array of rgb colors values as argument 'returns the average col...
by Pitto
Sep 01, 2017 15:04
Forum: Tips and Tricks
Topic: Polygons filled using scan line algorithm
Replies: 15
Views: 399

Re: Polygons filled using scan line algorithm

@MrSwiss

thanks for the tip.

So, in order to avoid problems with 64bit fbc (or some headers), I've to replace `integer` with `Long`.
`Long` remains a 32-bit signed whole-number data type in both 32 and 64 bit platforms, right?

@dafhi
you welcome
by Pitto
Sep 01, 2017 13:49
Forum: Tips and Tricks
Topic: Polygons filled using scan line algorithm
Replies: 15
Views: 399

Polygons filled using scan line algorithm

Here's a translation from a C implementation of the scan line algorithm to fill polygons. In this snippet 10 random generated polygons of 10 vertices each are filled without using "paint" function. http://www.pitto.cloud/freebasic_img/scan_line_00.gif C original source: http://code-heaven....
by Pitto
Aug 17, 2017 10:29
Forum: Projects
Topic: FB Graph Editor
Replies: 0
Views: 185

FB Graph Editor

Hi all, here's a little project I'm working in: FB Graph Editor (v0.01). It's a tool for graph theory. Here's the source: https://github.com/Pitto/FB_Graph_Editor Here's a video: https://youtu.be/qsxV6dCPvjA It uses single linked lists to store vertices and edges. It's possible to add vertices, move...
by Pitto
Aug 07, 2017 21:09
Forum: Tips and Tricks
Topic: Another Dijkstra's shortest path Algorithm implementation
Replies: 1
Views: 196

Another Dijkstra's shortest path Algorithm implementation

Hi all, I've translated a C source by Yusuf Shakeel The vertexes are linked in both orthogonal and diagonal way. As soon as possible I wish make it interactive 'file: dijkstra.c 'author: yusuf shakeel - 'date: 2014-03-03 'source from: 'https://www.dyclassroom.com/graph/dijkstra-algorithm-finding-sho...
by Pitto
Jun 29, 2017 1:32
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

Re: JASC Soccer

@MrSwiss Thanks for the tips. However I think there is a misunderstanding. Maybe You are referring​ to the old version (0.17) I've posted to show it BasicCoder2. The current version improves yet the features You have highlighted. It's available from https://github.com/Pitto/Jasc-Soccer @BasicCoder2 ...
by Pitto
Jun 27, 2017 22:34
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

Re: JASC Soccer

In jasc the playfield is divided in a grid of 36 tiles (6 x 6), a function returns the tile number where the ball is. Both tactic and behaviour interact with the current ball position. Tactic: involves the way each player move himself along the playfield while he doesn't owns the ball. So, it involv...
by Pitto
Jun 27, 2017 19:20
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

Re: JASC Soccer

Ops, I've linked the incorrect file. I have already corrected it in the post above.
by Pitto
Jun 27, 2017 12:33
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

Re: JASC Soccer

Hi BasicCoder2, thank you for your compliments. The idea that the user may select horizontal or vertical playfield is good. I'll add it to the todo list. The first (public) release of Jasc was pretty close to your idea. In that old release (I suppose 0.17) the playfield was horizontal, there was onl...
by Pitto
Jun 25, 2017 10:15
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

Re: JASC Soccer

@BasicCoder2 Thanks for the tips. I've implemented the selection of the resolution from the main menu. Now it's possible select three resolution for the match display: 640x480; 800x600 and 1024x768. Here's the link: https://www.dropbox.com/s/9vof6zggxadf2jp/Jasc-Soccer_screen_sel.zip?dl=0 To be hone...
by Pitto
Jun 05, 2017 15:43
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 18366

JASC Soccer - Fmod

Hi all, I've updated a little this project adding sound effects , interfacing fmod audio library (Windows only). I've not added yet this version to the main GitHub repository since I prefer use FBsound in the future (it should be compatible with GPL 2.0 license) and put self-made audio (or at least ...
by Pitto
Mar 06, 2017 18:45
Forum: Projects
Topic: FBB - FreeBasic Bézier
Replies: 13
Views: 1099

Re: FBB - FreeBasic Bézier

Hi all
https://github.com/pitto/fbb/
Version 0.03
New features:
    Node delete using mouse right button click
    Path delete if there is only one node
    Zoom in/out using mouse wheel
Thanks to D.J. Peters for his tips and his fbGFXAddon
by Pitto
Mar 05, 2017 9:59
Forum: Beginners
Topic: Nearest Neighbor Image Scaling - Problem while translating a java snippet
Replies: 6
Views: 630

Re: Nearest Neighbor Image Scaling - Problem while translating a java snippet

I was left speechles. Very good piece of code.
I'll study and implement it on FBB.
Thanks a lot!
Best regards

Go to advanced search