badidea wrote:@BasicCoder2: Everything ok there? A saw a bunch of posts by you ~12 hours ago, now gone?
Yes still standing up right :) Decided I should stop posting partly finished demos. Over the last few years I have been figuring out how to make old retro games like Mario, Pengo, Donkey Kong, Batman the Movie (Amiga), Pacman and so on as a programming exercise and it has given me some respect for what they achieved on the old machines. I read somewhere that Zelda took one year and 100 people to make!
The hardest and time consuming part for me is the graphics.
Getting back on topic it is in the back of mind how to incorporate the FreeBASIC theme in a simple retro style game as I work on some game ideas inspired by these old classics but time is running out.
Where are you getting your characters?
This sprite sheet has a good set of template activities for a modifiable character.
http://tradnux.com/teej-character-base-sprite-sheet/
https://host-a.net/f/67872-stripsheetch ... emplatezip
I have been using the sprite sheet as place value characters in a platform game.
Probably could change the character's title to FreeBasic Avenger if I can weave the FB theme into a platform game :)
Code: Select all
' template sprite modified and taken from,
' http://tradnux.com/teej-character-base-sprite-sheet/
' https://host-a.net/f/67872-stripsheetcharbasetemplatezip
const SCRW = 1280 'screen dimensions
const SCRH = 600
screenres SCRW,SCRH,32
color rgb(0,0,0),rgb(200,200,255):cls
' ========= make redAvenger sprite ==========
dim shared as any ptr redAvenger
redAvenger = imagecreate(132,57)
dim as ulong colors(8)
colors(0)=RGB(255,0,255)
colors(1)=RGB(0,0,0)
colors(2)=RGB(128,0,0)
colors(3)=RGB(237,28,36)
colors(4)=RGB(255,174,201)
colors(5)=RGB(166,13,20)
colors(6)=RGB(130,11,17)
colors(7)=RGB(66,0,0)
dim as integer n
dim as string datum
for i as integer = 0 to 131
read datum
for j as integer = 0 to 56
n = val(mid(datum,j+1,1))
pset redAvenger,(i,j),colors(n)
next j
next i
'=======================================================================
type AGENT
as integer x 'current position of image
as integer y
as integer w
as integer h
as integer xd 'velocity in pixel change
as integer yd
end type
dim shared as AGENT ag1
ag1.x = 14 'top left corner of image
ag1.y = 369
ag1.w = 22 'dimensions of agent (same as image in this case)
ag1.h = 57
ag1.xd = 4 'velicity in pixels per frame
ag1.yd = 0
dim shared as integer frame 'used for this example
sub drawWorld()
screenlock
cls
locate 4,4
print "HIT ESC KEY TO END DEMO"
line (0,ag1.y+ag1.h+1)-(SCRW-1,ag1.y+ag1.h+1),rgb(0,0,0)
put (ag1.x,ag1.y), redAvenger,(frame*ag1.w,0)-(frame*ag1.w+ag1.w-1,ag1.h-1),trans
screenunlock
frame = frame + 1
if frame = 6 then frame = 0
ag1.x = ag1.x + ag1.xd
end sub
sub update()
drawWorld()
end sub
dim as double now1
now1 = timer
update()
do
if timer > now1 + 0.2 then
now1 = timer
update()
end if
sleep 2
loop until multikey(&H01)
DATA "000000000000000000000000000000000000000000000000001111000"
DATA "000000011111000000000000000000000000000000000000012222100"
DATA "000001133333110000000000000000000011110000000000122222210"
DATA "000013333333331000000000000000111144441000000011222222221"
DATA "000133333333333100000111111111555111111000001122222222221"
DATA "001333333333333310001555555511111333333111112222222222221"
DATA "001333333333333331115533111155555333333333332222211222221"
DATA "013333333333333333335333333311155333333333333221100122221"
DATA "013333333333333333335333333333311331113333333210000012221"
DATA "013333333333333333335333333333333114441133333100000001221"
DATA "013333333333333333335553311133333334444131111000000000110"
DATA "013333333333333343111555555511333334444416666111111111111"
DATA "013333333333334441000111555555113344444416666777777777771"
DATA "001333333333344441000000111111111144444416666777777777771"
DATA "001333333133344441000000000000000014444411166777777777771"
DATA "000133333133344441000000000000000001441100011111177777771"
DATA "000011333333344410000000000000000000110000000000017777771"
DATA "000000111333344100000000000000000000000000000000001777771"
DATA "000000000133311000000000000000000000000000000000000177771"
DATA "000000000011100000000000000000000000000000000000000017771"
DATA "000000000000000000000000000000000000000000000000000017771"
DATA "000000000000000000000000000000000000000000000000000001110"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000111110000000000000000000000000000000000000111000000"
DATA "000011333331100000000000000000000000000000000001222111000"
DATA "000133333333310000000000000111111110000000000001222222100"
DATA "001333333333331000001111111555555111110000000012222222210"
DATA "013333333333333100015555555111111333331000001122222222221"
DATA "013333333333333311155531111555555333333110012222222222221"
DATA "133333333333333333355333333111155331111331122122211222221"
DATA "133333333333333333355333333333311114444113322122177112221"
DATA "133333333333333333355333333333333334444441332221777771111"
DATA "133333333333333333355533111333333334444441332217777777771"
DATA "133333333333333431115555555111133334444441331177117777771"
DATA "133333333333344410001115555555511134444441117111001777771"
DATA "013333333333444410000001111111111114444441111000000177771"
DATA "013333331333444410000000000000000001444110000000000017771"
DATA "001333331333444410000000000000000000111000000000000017771"
DATA "000113333333444100000000000000000000000000000000000001110"
DATA "000001113333441000000000000000000000000000000000000000000"
DATA "000000001333110000000000000000000000000000000000000000000"
DATA "000000000111000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000111110000000000000000000000000000000000000000000000"
DATA "000011333331100000000000000000000000000000000000000000000"
DATA "000133333333310000000000000000000000111110000000000001111"
DATA "001333333333331000001111111000000111444441000000001117771"
DATA "013333333333333100015555555111111333444441001111112117771"
DATA "013333333333333311155531111333333333444444117777122221771"
DATA "133333333333333333355333333333333333444444177771222222171"
DATA "133333333333333333355333333333333333444444177712222222171"
DATA "133333333333333333355333333331111111144441177122222222211"
DATA "133333333333333333355553111115555533311113311222222222211"
DATA "133333333333333431115555555555555533333333332222211222221"
DATA "133333333333344410001115555555555533333333333221100122221"
DATA "013333333333444410000001111111111111133333333310000012221"
DATA "013333331333444410000000000000000014411111333100000012221"
DATA "001333331333444410000000000000000001111000111000000001110"
DATA "000113333333444100000000000000000000000000000000000000000"
DATA "000001113333441000000000000000000000000000000000000000000"
DATA "000000001333110000000000000000000000000000000000000000000"
DATA "000000000111000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000111100000000000111000"
DATA "000000011111000000000000000000000001444410000000001777100"
DATA "000001133333110000000000000000001114444441000000017777710"
DATA "000013333333331000000000000000113334444441000001177777710"
DATA "000133333333333100000111111111333333344444101117777777771"
DATA "001333333333333310001555113333333333334444117777777777771"
DATA "001333333333333331115533333333333111134441667777777777771"
DATA "013333333333333333335533333333111333311116667777711177771"
DATA "013333333333333333335533333311553333333116666771100017771"
DATA "013333333333333333335553333155553333333331111110000111111"
DATA "013333333333333333335555555555553333333333333221111222221"
DATA "013333333333333343111555555555553333333333333222222222221"
DATA "013333333333334441000111555555553333333333332222222222221"
DATA "001333333333344441000000111111111111111111332222222222221"
DATA "001333333133344441000000000000001444444100111111112222221"
DATA "000133333133344441000000000000000144444100000000001222221"
DATA "000011333333344410000000000000000011441000000000000122221"
DATA "000000111333344100000000000000000000110000000000000122221"
DATA "000000000133311000000000000000000000000000000000000012221"
DATA "000000000011100000000000000000000000000000000000000012221"
DATA "000000000000000000000000000000000000000000000000000001110"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000111110000000000000000000000000000000000000000000000"
DATA "000011333331100000000000000000000000000000000000001111000"
DATA "000133333333310000000000000000000000111110000000017777100"
DATA "001333333333331000001111111000000111444441000000177777710"
DATA "013333333333333100015555555111111333444441000001777771111"
DATA "013333333333333311155531111333333333444444100111111112221"
DATA "133333333333333333355333333333333333344444111222222222221"
DATA "133333333333333333355333333333333333344444133222222222221"
DATA "133333333333333333355333333331111111144441333222222222221"
DATA "133333333333333333355553311115553333311113333222222222221"
DATA "133333333333333431115555555555553333333333333111112222221"
DATA "133333333333344410001115555555553333333111111711001222221"
DATA "013333333333444410000001111111111111111111111100000122221"
DATA "013333331333444410000000000000000014441000000000000122221"
DATA "001333331333444410000000000000000001110000000000000012221"
DATA "000113333333444100000000000000000000000000000000000012221"
DATA "000001113333441000000000000000000000000000000000000001110"
DATA "000000001333110000000000000000000000000000000000000000000"
DATA "000000000111000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000111110000000000000000000000000000000000000000000000"
DATA "000011333331100000000000000000000000000000000000000000000"
DATA "000133333333310000000000000111111111100000000000000001111"
DATA "001333333333331000001111111555555111110000000000001112221"
DATA "013333333333333100015555555111111333331111000011112222221"
DATA "013333333333333311155531111555555333333333111122222222221"
DATA "133333333333333333355333333111155331111333333222222222221"
DATA "133333333333333333355333333333311114444113333322222222221"
DATA "133333333333333333355333333333333334444441333322111222221"
DATA "133333333333333333355553111333333334444441333111777122221"
DATA "133333333333333431115555555111133334444441111777777122221"
DATA "133333333333344410001115555555511134444441666771177712221"
DATA "013333333333444410000001111111111114444441666710017712221"
DATA "013333331333444410000000000000000001444111666100001771110"
DATA "001333331333444410000000000000000000111011111000000177710"
DATA "000113333333444100000000000000000000000000000000000177710"
DATA "000001113333441000000000000000000000000000000000000011100"
DATA "000000001333110000000000000000000000000000000000000000000"
DATA "000000000111000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000"