this is the above (with an error for unknown reason)
when I remark out the two printmode lines, my programs works fine, but i would like to print the timer at the top whilest leaving the background behind it intact.
(Will be a proper timer but stuck this on to see if i can get printmode working)
Title: Re: _PRINTMODE
Post by: PMACKAY on September 27, 2018, 02:26:35 am
the timer is in the top left (I would like this displayed with the background in tact).. _display _keepbackground
Title: Re: _PRINTMODE
Post by: FellippeHeitor on September 27, 2018, 04:28:15 am
From the wiki:
Quote
The _PRINTMODE statement and function can only be used in graphic screen modes, not SCREEN 0
http://www.qb64.org/wiki/PRINTMODE
Title: Re: _PRINTMODE
Post by: PMACKAY on September 27, 2018, 05:59:10 am
thank you... I thought that was the case
Any Ideas on a
TI$="000000"
if ti$="003000" then 30 seconds went by
just seeing if there is a simple way of a timer like in sharp mz700 or zx spectrum basic. the ti$="000000" resets timer to zero then reading= "00" minutes, "30" seconds and "00" milliseconds
thats what the 000000 is... nothing fancy needed. it just calculates how long the loop is running for (eg. time on puzzle)
thanks.... just trying to avoid using timer on
Title: Re: _PRINTMODE
Post by: bplus on September 27, 2018, 08:15:38 am
Wait... what was wrong with printing TIME$ and TIMER?
Title: Re: _PRINTMODE
Post by: Petr on September 27, 2018, 09:21:34 am
do you miss a program that calculates time from a number? Maybe time from TIMER? I quickly pulled it out and edited it from my player. Perhaps the Czech names of the variables will not be damaging.
Attached is meaning of expression "Until the cows come home":
Title: Re: _PRINTMODE
Post by: PMACKAY on September 28, 2018, 12:36:01 am
THANK YOU GUYS!!!
I ended up using (funny i did not want to use timer() thinking would take a bit of work) but i ended up using timer which turned out so simple
T1 = _FREETIMER _SNDLOOP GAMEMUSIC1& ON TIMER(T1, 1) GOSUB TI DO :' START OF PROGRAM LOOP (TRUST ME ITS MUCH BIGGER - 80+ LINES OF CODE BUT I LOVE IT AND SO ADDICTIVE TO PLAY) "iTS MY NEW PUZZLE GAME" TI=60 TIMER(T1) ON IF TI=0 THEN : ' TIMER AT 0 SO OUT OF TIME
TI: TI = TI - 1: RETURN :' SUB TIMER COUNTER
I LOVE QB64
Title: Re: _PRINTMODE
Post by: PMACKAY on September 28, 2018, 12:35:50 pm
TIMERS working great (2xtimers for title) and (1xtimer for in game).. Also got my timer now running on screen without numbers (shows a bar for 60seconds / width of 4) looks great.
Working time Bar (YAY)
Title: Re: _PRINTMODE
Post by: FellippeHeitor on September 28, 2018, 12:40:43 pm
Looking good!
Title: Re: _PRINTMODE
Post by: PMACKAY on September 28, 2018, 01:30:08 pm
all in screen 0.. user def character set :) plays very good..
Need to finish score routines (High scores table, Game over section, Congratulate on completing levels fastest)... I kind of test run it and get stuck playing it :)
FORGOT TO MENTION "PRESS THE TAB IF YOU ARE STUCK" to restart level but beware lives=lives-1
Title: Re: _PRINTMODE
Post by: TempodiBasic on September 28, 2018, 05:17:42 pm
Hi PMACKAY I find it cool for music, for ASCII sprites and for kind of game.
Good Coding
Title: Re: _PRINTMODE
Post by: PMACKAY on September 28, 2018, 08:53:05 pm