Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 486
» Latest member: WellPop
» Forum threads: 2,806
» Forum posts: 26,358

Full Statistics

Latest Threads
New Years Eve Fireworks!
Forum: Programs
Last Post: eoredson
25 minutes ago
» Replies: 2
» Views: 18
Fireworks thru the years
Forum: bplus
Last Post: SierraKen
1 hour ago
» Replies: 4
» Views: 226
Hey guys, riddle me this....
Forum: General Discussion
Last Post: SpriggsySpriggs
1 hour ago
» Replies: 5
» Views: 52
Prime Number Generator
Forum: Programs
Last Post: eoredson
3 hours ago
» Replies: 8
» Views: 100
QB64pe 4.0 on Mac Trouble...
Forum: Help Me!
Last Post: NakedApe
3 hours ago
» Replies: 6
» Views: 50
Emulating DS4QB2
Forum: QBJS, BAM, and Other BASICs
Last Post: jofers
6 hours ago
» Replies: 5
» Views: 278
Prime Number Generator
Forum: SierraKen
Last Post: SierraKen
8 hours ago
» Replies: 0
» Views: 12
QB64PE v4.0 is now live!!
Forum: Announcements
Last Post: NakedApe
9 hours ago
» Replies: 43
» Views: 1,766
another variation of "10 ...
Forum: Programs
Last Post: hsiangch_ong
Yesterday, 04:55 PM
» Replies: 0
» Views: 21
List of file sound extens...
Forum: Help Me!
Last Post: hsiangch_ong
Yesterday, 04:30 PM
» Replies: 17
» Views: 477

 
  CHALLANGE ! Dangerous Maze
Posted by: MasterGy - 12-03-2023, 06:15 PM - Forum: MasterGy - Replies (13)

I finished the game. I have included many elements that I have not used before. For example, shading. This has slowed down games a lot so far, so I used to create separate textures for different distances. Here, however, the translucent shadow is drawn over the texture.

Lots of physics, interactions between objects, subtle movements. (not piecemeal, but transitional)

The best innovation is the automatic FPS setting. In the past, I usually set the image refresh rate to 20-25-30 so that it would run well even on weaker computers. It is noticeable and can be confusing. Here, however, I used it to adapt the image update to the speed of the machine. On a faster machine, it can go up to 60-100 FPS, which makes the animation very soft and fluid.

I cover this so that even those who don't play 3D games can understand it. Let's say I want to move a point from one side of the screen to the other. There is strictly 1 minute available for this. What should be its velocity vector? It depends on how wide the window is, and it also depends on how many times I want to interrupt the operation. The more times we interrupt, the more we see beautiful animation. If we break it a few times, it will be lumpy.
The automatic fps adjuster continuously monitors whether interruptions have been completed at the current FPS during a specified measurement time. If not, it means the machine is slow, so at that fps the whole game will stutter and become unenjoyable, so set it lower. On the other hand, if our computer is fast, we will perceive a wonderful display. All of this unnoticed, because in the game the speeds are constantly set to this. So it makes the most of the computer's performance (it tries not to leave any 'rest time'), and in return very nice animation takes place.

I would like a challenge. I divided the CHALLENGE into 12 tracks! Completing one is more difficult and exciting. I would like you to try it, and if everyone succeeds in posting the puzzle picture!

The game contains 2 pieces of BAS! One is in dm_start and the other is in the need/game_exe folder!
download:

https://qb64phoenix.com/forum/showthread.php?tid=686
corrections:
in principle, it also runs on Linux, it uses the appropriate per-signal

advices:
if possible, no windows or browsers should be running, so you can enjoy the game at the highest fps
the bigger the water, the slower you walk in it. if you jump, run away, you go faster
if the water is already overflowing, you can get air by jumping

Print this item

  Simple Brick Pattern Fill Question
Posted by: NakedApe - 12-01-2023, 07:22 PM - Forum: Help Me! - Replies (3)

I came upon this in Help. I like what it does, but don't get how it works. How do the CHR$(&H0)s and CHR$(&HEF)s create the string pattern to be filled? I understand the &H definition in Help is hex base 16 format, but that's as far as I go... Thanks!

DIM Row$(1 TO 8)
SCREEN 12

'make red-brick wall
Row$(1) = CHR$(&H0) + CHR$(&H0) + CHR$(&HFE) + CHR$(&HFE)
Row$(2) = Row$(1)
Row$(3) = Row$(1)
Row$(4) = CHR$(&H0) + CHR$(&H0) + CHR$(&H0) + CHR$(&H0)
Row$(5) = CHR$(&H0) + CHR$(&H0) + CHR$(&HEF) + CHR$(&HEF)
Row$(6) = Row$(5)
Row$(7) = Row$(5)
Row$(8) = Row$(4)
Tile$ = Row$(1) + Row$(2) + Row$(3) + Row$(4) + Row$(5) + Row$(6) + Row$(7) + Row$(8)

LINE (59, 124)-(581, 336), 14, B 'yellow box border to paint inside
PAINT (320, 240), Tile$, 14 'paints brick tiles within yellow border

Print this item

  GIFPlay
Posted by: a740g - 11-30-2023, 10:48 PM - Forum: a740g - Replies (12)

This is an animated GIF player library written purely in QB64-PE.

I was kind of annoyed and frustrated with the issues in the animated GIF library implementation we have listed in the wiki. Unfortunately, InForm's GIF support is derived from the same code, and it suffers from the same limitations and issues. Basically, it does not support frame local color tables and does not correctly support all of GIF's frame disposal methods. So, I set out to write an animated GIF library that can work standalone and also with InForm-PE.

The latest version of the library will always be a part of InForm-PE. You can find the code inside InForm-PE/InForm/extensions.

I am also attaching a standalone zip file here. This zip file contains just the GIFPlay library, demo and its dependencies.

Library documentation is here: https://github.com/a740g/InForm-PE/blob/...GIFPlay.md

You'll find some other useful (?) stuff in the InForm/extensions directory.  Smile

Cheers!

[Image: Screenshot-2023-12-01-040855.png]
[Image: Screenshot-2023-12-01-040927.png]



Attached Files
.zip   GIFPlay.zip (Size: 1.81 MB / Downloads: 81)
Print this item

  Creepy Computer Games & BASIC Computer Games
Posted by: SMcNeill - 11-30-2023, 09:55 PM - Forum: General Discussion - Replies (9)



Attached Files Thumbnail(s)
   

.7z   Creepy Computer Games.7z (Size: 70.06 MB / Downloads: 77)
Print this item

  Program Crashes After Start in MacOS
Posted by: NakedApe - 11-30-2023, 07:41 PM - Forum: Help Me! - Replies (14)

Howdy. While this chunk of my game runs fine in QB64pe v. 3.6.0, in versions 3.8.0 and up it crashes upon touching an input key. Attached is the source code, associated files and the error report, per instructions from SMcNeill. I hope a Mac guru can help me/us out with this! Thanks vm, Ted  Big Grin

Print this item

  Possible Bug
Posted by: SpriggsySpriggs - 11-30-2023, 07:09 PM - Forum: GitHub Discussion - Replies (1)

So I know a while back I had mentioned how the Save As dialog was still pulling in the default style even with the GUI dialogs option checked... Well, it got fixed for when picking it from the dropdown menu but NOT when pressing CTRL+S on an Untitled* file. Pressing CTRL+S still pops up the old dialog.

Print this item

  QB64PE mentioned on Slashdot
Posted by: Ed Davis - 11-30-2023, 04:12 PM - Forum: General Discussion - No Replies

QB64PE was mentioned in the comments section in a Slashdot article about BBCBasic.

It was mostly complimentary.

Interesting how several commenters don't realize that many Basics have not required line numbers for decades.

Print this item

  Recursively Remove Directories and Content
Posted by: SMcNeill - 11-30-2023, 05:47 AM - Forum: SMcNeill - No Replies

Code: (Select All)
CONST Testing = 0

RMDIR_Recursive "Z:\"

SUB RMDIR_Recursive (Dir$)
IF RIGHT$(Dir$, 1) = "\" OR RIGHT$(Dir$, 1) = "/" THEN Dir$ = LEFT$(Dir$, LEN(Dir$) - 1)
IF _DIREXISTS(Dir$) = 0 THEN EXIT SUB
REDIM FileList(0) AS STRING
GetFileList Dir$, FileList()
FOR i = 1 TO UBOUND(FileList)
IF FileList(i) <> "." AND FileList(i) <> ".." THEN
$IF WIN THEN
file$ = Dir$ + "\" + FileList(i)
$ELSE
file$ = Dir$ + "/" + FileList(i)
$END IF
IF _FILEEXISTS(file$) THEN
IF Testing THEN PRINT "DEL "; file$ ELSE KILL file$
ELSEIF _DIREXISTS(file$) THEN
RMDIR_Recursive file$
END IF
END IF
NEXT
IF LEN(Dir$) > 3 THEN
IF Testing THEN PRINT "RD "; Dir$ ELSE RMDIR Dir$
END IF
END SUB


SUB GetFileList (SearchDirectory AS STRING, FileList() AS STRING)
DECLARE CUSTOMTYPE LIBRARY ".\direntry"
FUNCTION load_dir& (s AS STRING)
FUNCTION has_next_entry& ()
SUB close_dir ()
SUB get_next_entry (s AS STRING, flags AS LONG, file_size AS LONG)
END DECLARE

DIM flags AS LONG, file_size AS LONG

REDIM _PRESERVE FileList(1000)
FileCount = 0

IF load_dir(SearchDirectory) THEN
DO
length = has_next_entry
IF length > -1 THEN
nam$ = SPACE$(length)
get_next_entry nam$, flags, file_size
FileCount = FileCount + 1
IF FileCount > UBOUND(FileList) THEN REDIM _PRESERVE FileList(UBOUND(FileList) + 100)
FileList(FileCount) = nam$
END IF
LOOP UNTIL length = -1
close_dir
ELSE
END IF
REDIM _PRESERVE FileList(FileCount)
END SUB


You'll need the header file below to place in the QB64 folder for this to work. Just point this command at a directory, and it'll remove all files and subdirectories inside that directory, and then remove the directory itself. Note that there's no "Are you certain" prompt to this, so I wouldn't suggest trying it out on your "C:" drive.

My suggestion? Before running, set TESTING to TRUE (any non-zero value), and take a look at what all it'll be getting rid of first for you! Any files you lose with this WILL NOT go into your computer's Recycle Bin, so you can't recover them. This nukes them once and for all, so BE CAREFUL with what you point it at!

You've been warned here first, and if you couldn't bother to read this warning... All I can say is, "I hope you regularly keep things backed up. Too bad for you now! /shrug!"



Attached Files
.h   direntry.h (Size: 1.15 KB / Downloads: 29)
Print this item

  Kill a directory in DOS
Posted by: eoredson - 11-30-2023, 04:16 AM - Forum: Help Me! - Replies (30)

Hi,

I have recently been able to Kill Filename$ but I would like a function to Kill Directory$

I know in Command.com and Cmd.exe the DEL command has /S to delete all subdirectories but Dosbox-X does not..

Or could a batch file do it??

Erik.

Print this item

  What kind of Chart would you use?
Posted by: Dimster - 11-28-2023, 06:35 PM - Forum: Help Me! - Replies (10)

I want to create a chart that visually demonstrates the effects of various activities on a main event. For example if the main event is Forest Fire and the activities are temperature, wind speed, precipitation and density, what kind of chart would you use to display all this information. I've been looking at bar charts, pie charts and a scatter charts but none of them appeal to me. Do you guys use charts and if so would you recommend it?

Print this item