"A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

For other topics related to the FreeBASIC project or its community.
song
Posts: 38
Joined: Jan 24, 2006 8:39

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby song » Feb 14, 2019 1:09

Hello......

Many people love this official game programming contest in our FreeBASIC community. This contest is a constructive tradition in our community.

I suggest that this official game programming contest should not be abandoned. This official game programming contest should be held once per year in the future. Really no reason to stop. Does everybody agree with my idea?
leopardpm
Posts: 1791
Joined: Feb 28, 2009 20:58

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby leopardpm » Feb 14, 2019 4:32

song wrote:Hello......

Many people love this official game programming contest in our FreeBASIC community. This contest is a constructive tradition in our community.

I suggest that this official game programming contest should not be abandoned. This official game programming contest should be held once per year in the future. Really no reason to stop. Does everybody agree with my idea?

I will participate (either as sponsor or contestant) for as long as I can, as I truly appreciate both FreeBasic and this community.
song
Posts: 38
Joined: Jan 24, 2006 8:39

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby song » Feb 14, 2019 19:52

leopardpm wrote:
song wrote:Hello......

Many people love this official game programming contest in our FreeBASIC community. This contest is a constructive tradition in our community.

I suggest that this official game programming contest should not be abandoned. This official game programming contest should be held once per year in the future. Really no reason to stop. Does everybody agree with my idea?

I will participate (either as sponsor or contestant) for as long as I can, as I truly appreciate both FreeBasic and this community.


I really hope that Lachie can consider to continue to organize competitions in the future.
gothon
Posts: 223
Joined: Apr 11, 2011 22:22

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby gothon » Feb 14, 2019 23:55

Fast
running
elegant &
expressive

Be my Valentine, you
Adaptable
Self-Hosting
Interoperable
Compiler

Lachie Dazdarian wrote: Those participating in round 2, I would appreciate your reconfirmation of the participation, and update on your entry status. Thanks.

I will participate in Round 2 here is my Work In Progress (WIP)
https://github.com/gothon/FBPoL

Currently there is not much you can do as the game engine is lacking and the player programing has no front end. However you can zoom & rotate the orthogonally rendered Voxel scenery. See that block of code printed in the console? That is not my program, that is YOUR program. As PlayerN you are the developer of software that can be used to control these Robots.
Look at that:

Code: Select all

BotGo 2, "", (MultiKey(75) - MultiKey(77)), 0, (MultiKey(72) - MultiKey(80))

Only PlayerN could write code like that!

Some secret keys: press Esc to exit, Alt+'~' to change window size (eventually you will get a Screen sized window, and if you have multiple monitors it will eventually cover all monitors)
BasicCoder2
Posts: 3349
Joined: Jan 01, 2009 7:03

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby BasicCoder2 » Feb 15, 2019 0:25

gothon wrote:...
I will participate in Round 2 here is my Work In Progress (WIP)
https://github.com/gothon/FBPoL


Is it possible to have the README file open with NotePad?


Moved the extracted .zip folder, FBPoL-master, into the C:/FreeBASIC/ folder

However I have forgotten how to allow it to find files not within the current folder or within the FreeBASIC folder so I get this error,

Command executed:
"C:\FreeBasic\fbc.exe" "C:\FreeBasic\FBPoL-master\Perlin.bas"

Compiler output:
C:\FreeBasic\FBPoL-master\Perlin.bas(15) error 23: File not found, "Perlin.bi" in '#Include "Perlin.bi"'

Results:
Compilation failed

System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win32 (32bit)
OS: Windows NT 6.2 (build 9200)
gothon
Posts: 223
Joined: Apr 11, 2011 22:22

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby gothon » Feb 15, 2019 0:44

BasicCoder2 wrote:Is it possible to have the README file open with NotePad?

The README.md file is made to be displayed on github.com. I actually edit the README file in Notepad myself however git automatically converts the CR+LF line endings to LF when I push my changes to github.com.

BasicCoder2 wrote:
Moved the extracted .zip folder, FBPoL-master, into the C:/FreeBASIC/ folder

However I have forgotten how to allow it to find files not within the current folder or within the FreeBASIC folder so I get this error,

Command executed:
"C:\FreeBasic\fbc.exe" "C:\FreeBasic\FBPoL-master\Perlin.bas"

Compiler output:
C:\FreeBasic\FBPoL-master\Perlin.bas(15) error 23: File not found, "Perlin.bi" in '#Include "Perlin.bi"'

Results:
Compilation failed


Perlin.bas is not the main source file. I actually use Perlin.bas to make a small lib that I link to. Sorry I should probably put that file someplace else.

The actual Build Command is:
fbc "Src\FBPoL.bas" "Src\PoL.rc" "Src\modTile.bas" "Src\modMenu.bas" "Src\modBASIC.bas" "Src\modGraphics.bas" "Src\modGameState.bas" "Src\modPlayerCode.bas" -x "Bin\*targ*\FBPoL.exe"

where *targ* is the folder for the target platform. Additionally it depends on libPerlin, (built from Perlin.bas and Perlin.bi using "fbc -lib Perlin.bas") my VoxelGFX library https://github.com/gothon/VoxelGFX, fbpng, zlib, libtcc, SDL2 and SDL2_mixer. All the needed libs however are prebuilt in the Lib folder for Win32, Win64, and Lin64 anyway. Some prebuilt executables are also in the Bin folder.
leopardpm
Posts: 1791
Joined: Feb 28, 2009 20:58

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby leopardpm » Feb 15, 2019 22:03

whooooaaa... Gothon! Your thought mirror mine almost exactly..... How are you rrendering the voxels... through raycast? I will need to study your code and see how aligned our thought process is - VERY COOL! and great job so far!

Will each 'cell' be destructable? down to your voxel level?
BasicCoder2
Posts: 3349
Joined: Jan 01, 2009 7:03

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby BasicCoder2 » Feb 15, 2019 22:43

gothon wrote:The actual Build Command is:
fbc "Src\FBPoL.bas" "Src\PoL.rc" "Src\modTile.bas" "Src\modMenu.bas" "Src\modBASIC.bas" "Src\modGraphics.bas" "Src\modGameState.bas" "Src\modPlayerCode.bas" -x "Bin\*targ*\FBPoL.exe".


All my programs are so simple they usually only have a couple of files and other things like .dll or .bi files I put into the same folder as the program or into FreeBasic folders like its include folder and simply run program source code from FBIDE.

I have never done a "build" although I notice some forum members talk about doing a FreeBasic compiler build. I think I must have just downloaded the result of a FreeBasic build when I installed FreeBasic along with the FBIDE.

Anyway I gave it a go but for some reason the fbc can't be found although it is in C:/FreeBasic/ folder

Image
gothon
Posts: 223
Joined: Apr 11, 2011 22:22

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby gothon » Feb 15, 2019 23:59

leopardpm wrote:whooooaaa... Gothon! Your thought mirror mine almost exactly..... How are you rrendering the voxels... through raycast? I will need to study your code and see how aligned our thought process is - VERY COOL! and great job so far!

Will each 'cell' be destructable? down to your voxel level?


No, I don't use raycasts. VoxelGFX actually produces an array of slices through the volume that are rendered using conventional texture mapping and transparency. It does this 3 times, for each of the 3 faces of a cube that are visible from the perspective (back faces are ignored). To do this I was originally planning to triplicate the texture memory so that it could be done with 2D textures, fortunately OpenGL supports 3D textures as of version 1.2 so I use those instead. The method is very polygon efficient. A 32x32x32 volume takes only 32+32+32 = 96 quads to render, even though it is 32,768 voxels. However many of the quads may overlap, eg looking at the cube dead on you have 32 quads facing you and you might render the same screen pixel 32 times.

In my FB Programs of Legend, I go one step further and use tiles. Since I am using orthogonal projection, the tiles look the same regardless of their position or distance from the viewer. I pre-render each 16x16x16 tile to an off screen tile buffer. I then build the terrain by billboarding the pre-rendered tiles to the scene. This is not very different from how an isometric game renders, but I am free to rotate the scene to any desired angle. The Robot sprite is still rendered directly, when you zoom the scene, I scale the billboards creating pixelation in the terrain not visible in the sprite.

I actually have it coded to generate the terrain billboards with potentially high levels of multi-sample anti-aliasing (MSAA), but there is no way to turn it on from the running program (you must edit the default value of the MultiSampleAntiAlias variable of the RenderInfo structure on line 38 of modGraphics.bi). I also have to render tiles in far to near order when rendering with MSAA so that the translucent boundary pixels render correctly, but when MSAA is off I actually render near to far as that seems to render faster.

Having individual terrain voxels destructible would be difficult since it would defeat the purpose of prerendered tiles, (but maybe it could be faked). Forming output tiles by composting multiple internal tiles is also a possible avenue. Messing with individual voxels on the sprite is easier, you may have already noticed some voxel animation I have on its backside.

@BasicCoder2

You are very close, start the build from within the main folder (as you are already doing), but use the full path of your 'fbc' compiler. I actually have the 32bit and 64bit compilers in different directories, and specifying the compiler path enables me to switch quickly between 32 bit and 64 bit builds.
leopardpm
Posts: 1791
Joined: Feb 28, 2009 20:58

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby leopardpm » Feb 16, 2019 3:20

gothon,
very interesting- I have stayed away from the openGL/3D methods of displaying voxel sprites and terrains - which limits me quite a bit. I have been able to raycast the sprites in realtime, but for dynamic terrain, I have been forced to pre-cast the terrain 'cells' (32x32x32) into 2d images which ends up consuming alot of memory. Haven't proceeded with the project for over a year until I am able to come up with other possible methods. I look forward to seeing your project and studying your code! thank you
BasicCoder2
Posts: 3349
Joined: Jan 01, 2009 7:03

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby BasicCoder2 » Feb 16, 2019 3:47

gothon wrote:@BasicCoder2
You are very close, start the build from within the main folder (as you are already doing), but use the full path of your 'fbc' compiler. I actually have the 32bit and 64bit compilers in different directories, and specifying the compiler path enables me to switch quickly between 32 bit and 64 bit builds.

Can you explain how to "use the full path of your 'fbc' compiler"?
Exactly what should I type at the command prompt for the magic to happen?
gothon
Posts: 223
Joined: Apr 11, 2011 22:22

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby gothon » Feb 16, 2019 4:17

BasicCoder2 wrote:Moved the extracted .zip folder, FBPoL-master, into the C:/FreeBASIC/ folder


I see the files are in the C:\FreeBASIC\FBPoL-master\ folder so open the console and navigate to this folder:

C:
cd C:\FreeBASIC\FBPoL-master\

BasicCoder2 wrote:Anyway I gave it a go but for some reason the fbc can't be found although it is in C:/FreeBasic/ folder


Your compiler is in the C:\FreeBasic\ folder so you can invoke it from any folder with "C:\FreeBasic\fbc" (this is what I mean by "use the full path")

gothon wrote:The actual Build Command is:
fbc "Src\FBPoL.bas" "Src\PoL.rc" "Src\modTile.bas" "Src\modMenu.bas" "Src\modBASIC.bas" "Src\modGraphics.bas" "Src\modGameState.bas" "Src\modPlayerCode.bas" -x "Bin\*targ*\FBPoL.exe".

The build command I have is just a list of files to compile plus the -x option to set the output location

BasicCoder2 wrote:fbc: FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win32 (32bit)


since your compiler is for win32, specify the Win32 output folder in the -x option: (you do not have to specify the -x option, but the .exe file will pop out in the main folder where there aren't any of the .dll files it needs to run) eg -x "Bin\Win32\FBPoL.exe", this gives the following command:

C:\FreeBasic\fbc "Src\FBPoL.bas" "Src\PoL.rc" "Src\modTile.bas" "Src\modMenu.bas" "Src\modBASIC.bas" "Src\modGraphics.bas" "Src\modGameState.bas" "Src\modPlayerCode.bas" -x "Bin\Win32\FBPoL.exe"

Then you can go into the "Bin\Win32\" folder to run the program (there was already an .exe there that I made beforehand, but now that you can make your own, you can edit my sources or change build options :-) )
BasicCoder2
Posts: 3349
Joined: Jan 01, 2009 7:03

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby BasicCoder2 » Feb 16, 2019 8:00

@gothon,
Following your latest directions the build worked. It was missing ZLIB1.dll and MSCCR100.dll, which I downloaded into the same folder, for the FBPoL.exe to run.
The little box guy moves too fast when I touch the arrow keys and still requires boundary and obstacle checks? Interesting that you can rotate the world with 3 degrees of freedom. As the grass is not an obstacle it looks good to see the character run through it.
Image
gothon
Posts: 223
Joined: Apr 11, 2011 22:22

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby gothon » Feb 16, 2019 9:25

BasicCoder2 wrote:@gothon,
Following your latest directions the build worked. It was missing ZLIB1.dll and MSCCR100.dll, which I downloaded into the same folder, for the FBPoL.exe to run.
The little box guy moves too fast when I touch the arrow keys and still requires boundary and obstacle checks? Interesting that you can rotate the world with 3 degrees of freedom. As the grass is not an obstacle it looks good to see the character run through it.


Thank you for testing my game!

I believe the zlib1.dll dependency may have been created when I stopped VoxelGFX from using the static zlib in 'fbpngs'. I don't know of any MSCCR100.dll but MSVCR100.dll is a version of the C Runtime library, this is most likely a dependency of zlib1.dll itself. Every version of zlib1.dll I see seems to depend on a different run time library. I have now added libz.a to the Lib\Win32 folder, this should prevent a dependency on zlib1.dll

The guy runs at a speed of 1 tile per frame, which at 60 simulation fps is probably way too fast. I have a lot of game engine code still to write!
Lachie Dazdarian
Posts: 2337
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Lachie Dazdarian » Feb 16, 2019 9:28

song wrote:Hello......

Many people love this official game programming contest in our FreeBASIC community. This contest is a constructive tradition in our community.

I suggest that this official game programming contest should not be abandoned. This official game programming contest should be held once per year in the future. Really no reason to stop. Does everybody agree with my idea?


This is independant on me. Since we had a lot of sponsors this year, I think there will be enough people willing to sponsor future competitions as well, regardless who organizes them. I don't know what the trick was this year, but I wish I had this support years before as well.

Anyway, we just need someone willing to separate a moderate amount of time to compile coherent rules and do minimum PR. I do warmly recommend THEMES, as themeless competitions make little sense, especially if they repeat on an annual base. It allows people to recycle and resubmitt their WIP, and ever year would feel the same.

If somone needs to connect future competitions to a FBGD "brand", I'm more than willing to let the domain go. But, there will be enough time to discuss that in the future.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests