Sumer is icumen in

Teaching software development? Using LiveCode to build your curriculum? This is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Tue Jul 05, 2016 4:03 pm

It turns out that the Belkin Nostromo n52 is ODD insofar as it seems to be about the only
game controller I can lay my hands on that Xubuntu automatically recognises and receives
key signals from.

The Belkin Nostromo n50 doesn't work; nor do the gamepads and steering wheel with pedals thing I have.

I would be most grateful if an expert (Richard Gaskin ?) could explain what stops other USB devices
not having their keyDown/Up signals being recognised both by Linux, and by Livecode-on-Linux
while the Belkin Nostromo n52 effectively behaves exactly like a keyboard.
Last edited by richmond62 on Wed Jul 06, 2016 9:21 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Wed Jul 06, 2016 7:03 pm

Board demo.jpg
This one does exactly what it says "on the packet".
As well as demonstrating how to use SWITCH and CASE.

https://www.dropbox.com/s/ogwbgqqbfwcaf ... e.zip?dl=0

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Sun Jul 10, 2016 12:22 pm

One of the boys attending my Summer classes proposes to produce a searchable map of somewhere for
his final project. How he will manage that I just don't know as he seems very good at copying code,
but unable even to adapt copied code for his own ends.

In talking to him it became clear he was proposing to "rip off" a map stack I made last year
oldMap.jpg
[as such, I have no objection to that]

and JUST change the map.

So, being the "nice chap" that I am, I came down on that one like a ton of hot bricks, and told him
that if he wanted to do something with maps he should add a new feature that isn't there in my stack:
otherwise "no marks, no diploma, and cast into outer darkness forever".

Anyway, this weekend, fueled by drinking rather too much coffee, I began to wonder about this boy's "plans" and
wondered how easy it would be to make a searchable map. Well, face it, loads of other people have done this; starting with
the dreaded monopolising Google downwards.

So, here is my way of doing things: it's very simple indeed because nobody helped me
[ well, possibly the people who make Tchibo coffee (commercial endorsement) ],
and it should be considered a prototype.

Not all the places in Kirkwall [my favourite town in Scotland] are listed. Pop open the red disclosure
triangle to see what's going on.

Things I would change:

1. Probably better to have a drop-down menu populated with street and feature names rather than a search field.

2. The scaling of the map and the magnifying glass are "all wrong".
MK.jpg
Here's the stack (6 MB): https://www.dropbox.com/s/8bo5un6psbvwj ... e.zip?dl=0

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Sun Jul 10, 2016 3:50 pm

Well; I've just been fiddling around and "done" a version with a drop-down menu:
MKDDx.jpg
https://www.dropbox.com/s/4277iikvf6tq2 ... e.zip?dl=0

For anyone who is wondering about the "Saint Olay Chapel" . . .

Patron saint of skin-care products:

[That is "revenge" for the drop-down menu dropping upwards.]
olay-old-bottles.jpg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Tue Jul 12, 2016 6:18 pm

kit.png
This is my "map kit" for anyone who wishes to try making a navigable amp:

https://www.dropbox.com/s/7tcnbrive1gax ... t.zip?dl=0

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Tue Jul 12, 2016 6:36 pm

We looked at the uses of Blend/Ink:

https://www.dropbox.com/s/bu10l6zds7fsq ... e.zip?dl=0
ink.png
ink.png (9.93 KiB) Viewed 11259 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Wed Jul 13, 2016 9:10 pm

Time to "hit them" with Unicode text.

We're going to have fun building an old-fashioned Bulgarian typewriter:
Cyrillic.jpg
The stack has only got functionality for 3 buttons: ѩ, DEL & CLEAR, and 'something' in the cardScript.

https://www.dropbox.com/s/tpaugqqpvtj51 ... e.zip?dl=0

Everyone will need this for reference: http://www.unicode.org/charts/PDF/U0400.pdf
cyrDetail.jpg
Last edited by richmond62 on Thu Jul 14, 2016 9:59 am, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Wed Jul 13, 2016 10:06 pm

code14July.png
introducing overlay, opacity and numToCodePoint.

It is useful to contrast the use of ink.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Sun Jul 17, 2016 5:14 pm

layers.jpg
This is the first stack to show you how LAYER can be used to achieve various optical effects:

https://www.dropbox.com/s/89qjyfh4tl9q2 ... e.zip?dl=0

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Sun Jul 17, 2016 8:41 pm

Check out your Early Middle English:

Svmer is icumen in
Lhude sing cuccu
Groweþ sed
and bloweþ med
and springþ þe wde nu
Sing cuccu

Awe bleteþ after lomb
lhouþ after calue cu
Bulluc sterteþ
bucke uerteþ

murie sing cuccu
Cuccu cuccu
Wel singes þu cuccu
ne swik þu nauer nu

Sing cuccu nu • Sing cuccu.
Sing cuccu • Sing cuccu nu
DEER.jpg
Look at the words "bucke uerteþ" = "buck verteth" a bit more closely.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Mon Jul 18, 2016 9:01 pm

puss.jpg
And here's a companion stack to the LAYER one to play around with mouseEnter,
mouseLeave, mouseDown, mouseStillDown and mouseUp to achieve various optical effects:

https://www.dropbox.com/s/n7xz8o6u…/PUS ... vecode.zip

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Thu Jul 21, 2016 7:24 pm

Today one of the children mentioned "Tank Wars":
tankwars2.png.jpeg
so we got "all hot and sweaty" about how to do something like that in Livecode:
code1.jpg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Thu Jul 21, 2016 7:26 pm

So, it occurred to me that we needed to generate a parabolic trajectory graphic for cannon balls to fly along:
Parabola.png
Here's the stack:

https://www.dropbox.com/s/g9apsbyu2i9f2 ... e.zip?dl=0

Obviously that will have to be flipped vertically before it is used in a game.
tankWar1.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sumer is icumen in

Post by richmond62 » Fri Jul 22, 2016 8:02 am

"Son of a gun!"
gunSnip.png
gunSnip.png (9.56 KiB) Viewed 11056 times
on rawKeyDown RK
global POZZ
if RK = 65309 then
if POZZ < 8 then
add 1 to POZZ
end if
set the backPattern of grc "gun" to the id of img ("gun" & POZZ)
switch POZZ
case 8
set the width of grc "pathX" to 450
set the height of grc "pathX" to 660
set the loc of grc "pathX" to 282,365
break
case 7
set the width of grc "pathX" to 510
set the height of grc "pathX" to 600
set the loc of grc "pathX" to 323,407
break
case 6
set the width of grc "pathX" to 570
set the height of grc "pathX" to 540
set the loc of grc "pathX" to 368,434
break
case 5
set the width of grc "pathX" to 630
set the height of grc "pathX" to 480
set the loc of grc "pathX" to 408,467
break
case 4
set the width of grc "pathX" to 690
set the height of grc "pathX" to 420
set the loc of grc "pathX" to 442,507
break
case 3
set the width of grc "pathX" to 750
set the height of grc "pathX" to 360
set the loc of grc "pathX" to 477,546
break
case 2
set the width of grc "pathX" to 810
set the height of grc "pathX" to 300
set the loc of grc "pathX" to 513,590
break
case 1
set the width of grc "pathX" to 860
set the height of grc "pathX" to 240
set the loc of grc "pathX" to 541,633
break
end switch
end if
if RK = 65308 then
if POZZ > 1 then
subtract 1 from POZZ
end if
set the backPattern of grc "gun" to the id of img ("gun" & POZZ)
switch POZZ
case 8
set the width of grc "pathX" to 450
set the height of grc "pathX" to 660
set the loc of grc "pathX" to 282,365
break
case 7
set the width of grc "pathX" to 510
set the height of grc "pathX" to 600
set the loc of grc "pathX" to 323,407
break
case 6
set the width of grc "pathX" to 570
set the height of grc "pathX" to 540
set the loc of grc "pathX" to 368,434
break
case 5
set the width of grc "pathX" to 630
set the height of grc "pathX" to 480
set the loc of grc "pathX" to 408,467
break
case 4
set the width of grc "pathX" to 690
set the height of grc "pathX" to 420
set the loc of grc "pathX" to 442,507
break
case 3
set the width of grc "pathX" to 750
set the height of grc "pathX" to 360
set the loc of grc "pathX" to 477,546
break
case 2
set the width of grc "pathX" to 810
set the height of grc "pathX" to 300
set the loc of grc "pathX" to 513,590
break
case 1
set the width of grc "pathX" to 860
set the height of grc "pathX" to 240
set the loc of grc "pathX" to 541,633
break
end switch
end if
pass rawKeyDown
end rawKeyDown

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Sumer is icumen in

Post by [-hh] » Fri Jul 22, 2016 11:10 am

Really nice posts, thanks for sharing.

This may help you with some 'specials' to your last project.
Cannonballs (Tutorial by Robert Cailliau, in " newsletters.livecode.com "

Part 1.1 Part 1.2 Part 2.1 Part 2.2 Part 3.1 Part 3.2
Part 4.1 Part 4.2 Part 5.1 Part 5.2 Part 6.1 Part 6.2
shiftLock happens

Post Reply

Return to “Teaching with LiveCode”