News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Merry Christmas & Happy New Year!

Started by ScottieBro1, January 06, 2024, 04:48:35 PM

Previous topic - Next topic

ScottieBro1

Free gift from the holidays!
God Bless Us One And All!

Here is another endless runner!

It could use some graphics and effects if anyone could help.

Originally it is top down view so a smiley face 3d rolling ball sprites would be kewl.
The wall again could be bricks top down walls. but any artwork would be nice to see.


A titlescreen and end screen as well if anyone care to build this better.

ScottieB

stevmjon

merry xmas and a better new year to all.

thanks scott for the gifts. you seem to always be busy working on something or another. i always look forward to seeing what you code.
you seem to code a good variety of programs too.

all the best for 2024 and beyond.

   stevmjon
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin

#2
 Good job...  Scotty and Happy New Year to you also
 



PlayBASIC Source Code Snippet - Ball Following Mouse - (2024-01-09)

  in this example PlayBASIC source code, we create a ball that moves towards the mouse with what seems like some soft acceleration.  The code also includes method to decouple the programs execution speed from the performance from the machine running the code.   This is achieved by monitoring the how much time has past between updates and only moving the characters when enough time has past.   If too much time has past we step the movement as per the required number of frames past.  


 
PlayBASIC Code: [Select]
   PlayerX# = GetScreenWidth()/2
PlayerY# = GetScreenHeight()

// Frame rate we're targeting
TicksPerFrame# = 1000.0/100

// Current frame we're on
CurrentFRAME = 0

// Time when this program Starts
FrameStart = timer()
do

// Check how much time as Past since program started
TimePast#=(timer()-FrameStart)

// Is it time to move characters or not ??
if (CurrentFRAME*TicksPerFrame#)<TimePAST#

// See how much time as past since we might need to move
// things more than once this refresh.
FramesPAST = ( TimePAST# - (CurrentFRAME*TicksPerFrame#) ) / TicksPerFrame#

// Move everything
for FrameCOUNT =1 to FramesPAST
gosub Update_Logic
CurrentFRAME++
next
endif


// Scroll Wheeel to force a frame rate (simulate slower computers)
LImitedFPS=cliprange(LimitedFPS+mousemovez(),0,1000)
if GetFps()<>LImitedFPS
Setfps LImitedFPS
endif


// Draw the scene
cls
print "Machine FPS:"+str$(LImitedFPS)

circle PlayerX#,PlayerY#,30,true
sync


loop




Update_Logic:

mX#=mousex()
mY#=mousey()

PlayerX# = curvevalue( mX#,PlayerX#, 20)
PlayerY# = curvevalue( mY#,PlayerY#, 20)
return






 



stevmjon

just for fun i made all the graphics from inside PB.

also modified the re-dim arrays to only use re-dim when increase in size. no need to re-dim each frame when the array size has not changed.

have fun, stevmjon
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin


  Steve,

     nicely done with the coins and brick work !