'Written In Stone' word puzzle game
- Dav
- Posts: 279
- Joined: Tue Dec 30, 2014 5:12 pm
- My devices: iPad Mini, iPod Touch.
- Location: North Carolina, USA
- Contact:
'Written In Stone' word puzzle game
I have ported the 'Written in Stone' game from QB64 to smart BASIC. It is a word puzzle game where you try to guess popular quotes in 60 seconds or less. I have included screenshots of the game here.
I still don't have a dropbox account yet, I've been making all my file transfers in/out of my iPad using smart BASIC programs. So I have temporarily put the complete game in a .zip archive on my programming website for now.
Alternatively, I have made a small downloading program for smart BASIC that can download the game files directly from my site to smart BASIC devices, and then run the game after downloading it. But I will not post that program unless my host gives me the OK to do that first. Maybe I should just break down and use dropbox.
ZIP archive of game: (Fixed v1.1 - JUNE/2015)
http://www.qbasicnews.com/dav/files/win ... sic-v1.zip (3.2MB)
DOWNLOAD/INSTALL program (for smart Basic):
viewtopic.php?f=20&p=11836#p9323
- Dav
I still don't have a dropbox account yet, I've been making all my file transfers in/out of my iPad using smart BASIC programs. So I have temporarily put the complete game in a .zip archive on my programming website for now.
Alternatively, I have made a small downloading program for smart BASIC that can download the game files directly from my site to smart BASIC devices, and then run the game after downloading it. But I will not post that program unless my host gives me the OK to do that first. Maybe I should just break down and use dropbox.
ZIP archive of game: (Fixed v1.1 - JUNE/2015)
http://www.qbasicnews.com/dav/files/win ... sic-v1.zip (3.2MB)
DOWNLOAD/INSTALL program (for smart Basic):
viewtopic.php?f=20&p=11836#p9323
- Dav
- Attachments
-
- winstone-1.jpg (125.96 KiB) Viewed 5923 times
-
- winstone-2.jpg (109.15 KiB) Viewed 5923 times
-
- winstone-3.jpg (47.42 KiB) Viewed 5923 times
-
- winstone-4.jpg (136.83 KiB) Viewed 5923 times
Last edited by Dav on Mon Sep 11, 2017 10:41 pm, edited 2 times in total.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 'Written In Stone' word puzzle game
Very interesting!
Smart BASIC is designed to use Dropbox, so it is very handy to transfer and share programs.
What about game, animations work well. Sound is also great! Overall design is very stylish.
But I hardly succeed pressing letters in quote - they almost don't respond to touches. Almost impossible to play.
Numbers and menu buttons respond to touch very well.
Also one wish: do not force orientation if it is already landscape, but in another direction.
Smart BASIC is designed to use Dropbox, so it is very handy to transfer and share programs.
What about game, animations work well. Sound is also great! Overall design is very stylish.
But I hardly succeed pressing letters in quote - they almost don't respond to touches. Almost impossible to play.
Numbers and menu buttons respond to touch very well.
Also one wish: do not force orientation if it is already landscape, but in another direction.
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: 'Written In Stone' word puzzle game
Maybe a reason for new commands?Mr. Kibernetik wrote:Also one wish: do not force orientation if it is already landscape, but in another direction.
SET ORIENTATION LANDSCAPE (or HORIZONTAL)
SET ORIENTATION PORTRAIT (or VERTICAL)
Re: 'Written In Stone' word puzzle game
Oh yeah. That's much better than
I'm voting for it. (:
Code: Select all
get orientation ornt
if ornt=2 or ornt=4 then set orientation ornt else set orientation 4
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 'Written In Stone' word puzzle game
Dahl wrote:Oh yeah. That's much better thanI'm voting for it. (:Code: Select all
get orientation ornt if ornt=2 or ornt=4 then set orientation ornt else set orientation 4
Code: Select all
GET ORIENTATION ornt
IF ODD(ornt) THEN SET ORIENTATION RIGHT
Re: 'Written In Stone' word puzzle game
Well, yes, but if orientation is already landsape, it doesn't blocks. With "else" fork it's pretty much the same. Dedicated command is still better, though it's a matter of pure aesthetics. (:
- Dav
- Posts: 279
- Joined: Tue Dec 30, 2014 5:12 pm
- My devices: iPad Mini, iPod Touch.
- Location: North Carolina, USA
- Contact:
Re: 'Written In Stone' word puzzle game
Thanks for trying the game. I am sorry it is not working correctly for you. I must have messed up the playing board when I scaled the images up in size.
I'm getting the board input this way:
mx= touch_x(0)
my= touch_y(0)
Then I break up the screen into a grid columns & rows instead of pixels. That way it's easy to manage the rows of letters.
col = int(mx / 42) -1
row = int(my / 42) -1
The original way was 35x35, but was too small on my ipap so I changed it to 42 and scaled up the letter images.
I have attached the source code here. I didn't before because I'm kind of embarrassed how ugly the code is.
I can also post the original way of 35x35, just to see if that version works correctly.
Maybe with help here we can get it working? Thanks!
- Dav
EDIT: New attachment with fixed version June/2015
I'm getting the board input this way:
mx= touch_x(0)
my= touch_y(0)
Then I break up the screen into a grid columns & rows instead of pixels. That way it's easy to manage the rows of letters.
col = int(mx / 42) -1
row = int(my / 42) -1
The original way was 35x35, but was too small on my ipap so I changed it to 42 and scaled up the letter images.
I have attached the source code here. I didn't before because I'm kind of embarrassed how ugly the code is.
I can also post the original way of 35x35, just to see if that version works correctly.
Maybe with help here we can get it working? Thanks!
- Dav
EDIT: New attachment with fixed version June/2015
- Attachments
-
- Winstone.txt
- (80.32 KiB) Downloaded 391 times
Last edited by Dav on Tue Jun 23, 2015 3:02 am, edited 1 time in total.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 'Written In Stone' word puzzle game
About touches:
TOUCH_X() and TOUCH_Y() functions are to be used if you need X or Y coordinate only. If you need to get full touch (both X and Y coordinates simultaneously) GET TOUCH command exists - it is twice as fast (one command instead of two functions) and both coordinates are from the same touch time.
About image buttons:
of course it is fine to use constructions like IF x>a AND x<b AND y>c AND y<d THEN..., but it is supposed to use sprites for buttons with SPRITE_HIT() function to detect if image is touched. Also, this function performs real sprite surface hit analysis, so non-square images can be used and properly analyzed for touch.
TOUCH_X() and TOUCH_Y() functions are to be used if you need X or Y coordinate only. If you need to get full touch (both X and Y coordinates simultaneously) GET TOUCH command exists - it is twice as fast (one command instead of two functions) and both coordinates are from the same touch time.
About image buttons:
of course it is fine to use constructions like IF x>a AND x<b AND y>c AND y<d THEN..., but it is supposed to use sprites for buttons with SPRITE_HIT() function to detect if image is touched. Also, this function performs real sprite surface hit analysis, so non-square images can be used and properly analyzed for touch.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 'Written In Stone' word puzzle game
Also about touch:
if you get X and Y touch coordinates then it can happen when screen is not touched. This means that IF X<0 THEN you can repeat waiting for touch immediately. If instead you go to analyze for hitting your buttons, then this takes time. This means that your reaction for touch will be somewhat sluggish.
This code:
1 GET TOUCH 0 AS x,y
IF x<0 THEN 1
IF SPRITE_HIT()...
...
GOTO 1
works much agile than this:
1 GET TOUCH 0 AS x,y
IF SPRITE_HIT()...
...
GOTO 1
because reaction for touch will be immediate in the first case and delayed in the second case (because here it is always in touch analysis code, which takes time).
if you get X and Y touch coordinates then it can happen when screen is not touched. This means that IF X<0 THEN you can repeat waiting for touch immediately. If instead you go to analyze for hitting your buttons, then this takes time. This means that your reaction for touch will be somewhat sluggish.
This code:
1 GET TOUCH 0 AS x,y
IF x<0 THEN 1
IF SPRITE_HIT()...
...
GOTO 1
works much agile than this:
1 GET TOUCH 0 AS x,y
IF SPRITE_HIT()...
...
GOTO 1
because reaction for touch will be immediate in the first case and delayed in the second case (because here it is always in touch analysis code, which takes time).
- Dav
- Posts: 279
- Joined: Tue Dec 30, 2014 5:12 pm
- My devices: iPad Mini, iPod Touch.
- Location: North Carolina, USA
- Contact:
Re: 'Written In Stone' word puzzle game
Thank you very much for the suggestions and tips!
I first used GET TOUCH in a loop, waiting for touch, but that made the timer bar & popup screens not updating while waiting for a touch. I will have to re-do the main loop. I also put in a pause in the letter selection & draw routines, that may be making it sluggish too.
Most of the code is still very QB64 like, I need to think in a new way now.
I will work on it. I'd like to be able to make it for app store one day, if it can work well.
smart BASIC has no problems editing the source code which is almost 2700 lines now.
- Dav
EDIT: That's an tnsteresting idea about putting the letters as sprites and waiting for a hit. I will experiement there...
I first used GET TOUCH in a loop, waiting for touch, but that made the timer bar & popup screens not updating while waiting for a touch. I will have to re-do the main loop. I also put in a pause in the letter selection & draw routines, that may be making it sluggish too.
Most of the code is still very QB64 like, I need to think in a new way now.
I will work on it. I'd like to be able to make it for app store one day, if it can work well.
smart BASIC has no problems editing the source code which is almost 2700 lines now.
- Dav
EDIT: That's an tnsteresting idea about putting the letters as sprites and waiting for a hit. I will experiement there...