I offer you the second version of the game for all devices. Also added was sound, and some improvements.
https://www.dropbox.com/sh/3pllfshifdor ... LpRna?dl=0
In the case of incorrect operation, curves, pictures, etc. please write and possibly put a screenshot.
Just consider the suggestions for the improvement and refinement
Thank you.
Henhouse v2 [ALL]
Henhouse v2 [ALL]
- Attachments
-
- image.png (1.59 MiB) Viewed 3697 times
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Henhouse v2 [ALL]
I don't understand the text at upper right and lower left.
Still a small step to a multilingual version
Still a small step to a multilingual version
Re: Henhouse v2 [ALL]
I'll do a multilingual game soon. I have a problem with adaptation for the iPad. it I do not have, even though I'm already close to completion, no where to check. I am going to do so a few eggs at a time rolled. right above the word score, the left button at the bottom of the exit. it will not be fast. I need only to debug programs.Dutchman wrote:I don't understand the text at upper right and lower left.
Still a small step to a multilingual version
Re: Henhouse v2 [ALL]
Specially for you. Multi Language eng and rus. if there are more or suggestions, writeDutchman wrote:I don't understand the text at upper right and lower left.
Still a small step to a multilingual version
Code: Select all
REM sB 5.0 / iPhone 5 / iOS 9.1 / by Tantrixx
GRAPHICS
GRAPHICS CLEAR 1,1,1
OPTION ANGLE DEGREES
OPTION SPRITE POS CENTRAL
OPTION IMAGE POS CENTRAL
OPTION TEXT POS CENTRAL
SET ORIENTATION LANDSCAPE
SET TOOLBAR OFF
RANDOMIZE
PAGE 2 SET
PAGE 2 COLOR 1,0,0,.7
PAGE 2 HIDE
PAGE 1 SET
maxx=SCREEN_WIDTH()
maxy=SCREEN_HEIGHT()
pady=maxy/768
padx=maxx/1024
DRAW ALPHA 0.8
DRAW IMAGE "System/grass.png" AT maxx/2,maxy/2 SCALE 3.6*pady
DRAW ALPHA 1
DRAW IMAGE "System/Korich2.png" AT 135*padx,40*pady SCALE 0.55*padx
DRAW IMAGE "System/Korich2.png" AT 660*padx,40*pady SCALE 0.55*padx
IF FILE_EXISTS ("System")=0 THEN DIR "System" CREATE
IF FILE_EXISTS ("System/Best")=0 THEN FILE "System/Best" PRINT 0
FILE "System/Best" SETPOS 0
FILE "System/Best" READLINE best
'размер экрана 568,320
'данные игры
lang$=SYSTEM_LANGUAGE$()
s=2.4*pady
sm=1.55*pady
smu=1.19*pady
lv$="perch"
lvsz$="perchsz"
b$="bear"
se=1.43*pady
sch=0
speed=0.01
'Язык
IF lang$="ru" THEN
sche$=" Счет: " ! best$=" Лучшее:"
bresult$="Лучший результат: " ! gover$="КОНЕЦ ИГРЫ" ! cegg$="Собранные ЯЙЦА: "
ELSE
sche$=" Score:" ! best$=" Best:"
bresult$="Best result: " ! gover$="GAME OVER" ! cegg$="Collected EGGS: "
ENDIF
'звук
MUSIC "egg" LOAD "System/egg1.mp3"
MUSIC "istcho" LOAD "System/istcho.mp3"
MUSIC "boom" LOAD "System/boom.mp3"
MUSIC "egg" VOLUME 0.3
'размещение кур
SPRITE "hen_pv" LOAD "System/hen3.png"
SPRITE "hen_pv" AT 910*padx,220*pady SCALE s
SPRITE "hen_pv" COPY "hen_lv"
SPRITE "hen_lv" AT 128*padx,220*pady SCALE s FLIP 1
SPRITE "hen_pv" COPY "hen_ln"
SPRITE "hen_ln" AT 128*padx,370*pady SCALE s FLIP 1
SPRITE "hen_pv" COPY "hen_pn"
SPRITE "hen_pn" AT 910*padx,370*pady SCALE s
SPRITE "hen_pv" SHOW
SPRITE "hen_lv" SHOW
SPRITE "hen_ln" SHOW
SPRITE "hen_pn" SHOW
'рисование насеста
SPRITE lvsz$ LOAD "System/Kortem3.png"
SPRITE lvsz$ RESIZE 156*padx ,24*pady
SPRITE lvsz$ AT 236*padx,348*pady ANGLE 30
SPRITE lvsz$ STAMP
SPRITE lvsz$ AT 236*padx,500*pady ANGLE 30
SPRITE lvsz$ STAMP
SPRITE lvsz$ AT 806*padx,348*pady ANGLE -30
SPRITE lvsz$ STAMP
SPRITE lvsz$ AT 806*padx,500*pady ANGLE -30
SPRITE lvsz$ STAMP
SPRITE lvsz$ COPY lv$
SPRITE lv$ RESIZE 92*padx ,24*pady
SPRITE lv$ AT 345*padx,190*pady ANGLE 90
SPRITE lv$ STAMP
SPRITE lv$ AT 500*padx,190*pady ANGLE 90
SPRITE lv$ STAMP
SPRITE lv$ AT 128*padx,297*pady
SPRITE lv$ STAMP
SPRITE lv$ AT 916*padx,297*pady
SPRITE lv$ STAMP
SPRITE lv$ AT 916*padx,449*pady
SPRITE lv$ STAMP
SPRITE lv$ AT 128*padx,449*pady
SPRITE lv$ STAMP
SPRITE lvsz$ RESIZE 156*padx ,24*pady
SPRITE lvsz$ AT 473*padx,95*pady ANGLE 45
SPRITE lvsz$ STAMP
SPRITE lvsz$ AT 373*padx,95*pady ANGLE -45
SPRITE lvsz$ STAMP
SPRITE lvsz$ RESIZE 164*padx,24*pady
SPRITE lvsz$ AT 424*padx,214*pady
SPRITE lvsz$ STAMP
SPRITE b$ LOAD "System/Bear_tors.png"
SPRITE b$ AT 410*padx,138*pady SCALE 0.55*padx
SPRITE b$ SHOW
SPRITE b$ HIDE
SPRITE "b_egg" LOAD "System/broken egg2.png"
SPRITE "b_egg" AT 318*padx,670*pady SCALE se
SPRITE "b_egg" SHOW
SPRITE "b_egg" ALPHA 0
SPRITE "b_egg" COPY "b_egg2"
SPRITE "b_egg2" AT 724*padx,670*pady SCALE se
SPRITE "b_egg2" SHOW
SPRITE "b_egg2" ALPHA 0
SPRITE "b_egg" COPY "dead_lives"
SPRITE "dead_lives" AT 600*padx,144*pady SCALE se
SPRITE "dead_lives" SHOW
SPRITE "dead_lives" ALPHA 1
SPRITE "dead_lives" HIDE
SPRITE "masha_up_pv" LOAD "System/Masha up_big.png"
SPRITE "masha_up_pv" AT 628*padx,490*pady SCALE sm FLIP 1
SPRITE "masha_up_pv" SHOW
SPRITE "masha_up_pv" COPY "masha_up_lv"
SPRITE "masha_up_lv" AT 410*padx,490*pady SCALE sm
SPRITE "masha_ln" LOAD "System/Masha_big.png"
SPRITE "masha_ln" AT 404*padx,490*pady SCALE smu ANGLE 10
SPRITE "masha_ln" COPY "masha_pn"
SPRITE "masha_pn" AT 634*padx,494*pady SCALE smu ANGLE 10 FLIP 1
SPRITE "masha_pn" SHOW
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" SHOW
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" SHOW
SPRITE "masha_up_lv" HIDE
i$="egg"
v$="egg2"
SPRITE i$ LOAD "System/egg2.png"
SPRITE i$ COPY v$
SPRITE i$ AT 590*padx,144*pady SCALE se
SPRITE i$ STAMP
SPRITE i$ AT 645*padx,144*pady SCALE se
SPRITE i$ STAMP
SPRITE i$ AT 700*padx,144*pady SCALE se
SPRITE i$ STAMP
SPRITE "schet" BEGIN 245*padx,86*pady
DRAW COLOR 0,0,0
DRAW FONT SIZE 36*padx
DRAW TEXT sche$ AT 60*padx,40*pady
SPRITE END
SPRITE "schet" AT 660*padx,45*pady
SPRITE "schet" SHOW
SPRITE "best" BEGIN 246*padx,86*pady
DRAW COLOR 0,0,0
DRAW TEXT best$ AT 100*padx,40*pady
SPRITE END
SPRITE "best" AT 110*padx,45*pady
SPRITE "best" SHOW
PAGE 1 SHOW
LOOP:
sec=CURRENT_SECOND()
SPRITE i$ DELAY speed
SPRITE v$ DELAY speed
SPRITE "schet" BEGIN
GRAPHICS CLEAR
DRAW COLOR 0,0,0
DRAW FONT SIZE 36*padx
DRAW TEXT sche$ AT 60*padx,40*pady
DRAW TEXT sch AT 175*padx,43*pady
SPRITE END
SPRITE "best" BEGIN
GRAPHICS CLEAR
DRAW COLOR 0,0,0
DRAW TEXT best$ AT 100*padx,40*pady
DRAW TEXT best AT 216*padx,43*pady
SPRITE END
GET TOUCH 0 AS h,w
IF SPRITE_HIT ("hen_lv",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" SHOW
ENDIF
IF SPRITE_HIT ("hen_pv",h,w)=1 THEN
SPRITE "masha_up_lv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_pv" SHOW
ENDIF
IF SPRITE_HIT ("hen_ln",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_pn" HIDE
SPRITE "masha_up_lv" HIDE
SPRITE "masha_ln" SHOW
ENDIF
IF SPRITE_HIT ("hen_pn",h,w)=1 THEN
SPRITE "masha_up_pv" HIDE
SPRITE "masha_ln" HIDE
SPRITE "masha_up_lv" HIDE
SPRITE "masha_pn" SHOW
ENDIF
'случайный выбор жердочки
5 IF SPRITE_VISIBLE (i$)=0 AND SPRITE_VISIBLE (v$)=0 THEN
MUSIC "egg" LOOP
ix=RND(4)+1
IF ix=1 THEN
x2=187*padx ! y2=280*pady
x3=.2 ! y3=.12
SPRITE v$ AT x2,y2 SCALE se
SPRITE v$ DA 5 DX x3 DY y3
SPRITE v$ SHOW
SPRITE v$ LOOP
MUSIC "egg" LOOP
ENDIF
IF ix=2 THEN
x1=187*padx ! y1=426*pady
x=.2 ! y=.12
SPRITE i$ AT x1,y1 SCALE se
SPRITE i$ DA 5 DX x DY y
SPRITE i$ SHOW
SPRITE i$ LOOP
MUSIC "egg" LOOP
ENDIF
IF ix=3 THEN
x2=842*padx ! y2=286*pady
x3=-.2 ! y3=.12
SPRITE v$ AT x2,y2 SCALE se
SPRITE v$ DA -5 DX x3 DY y3
SPRITE v$ SHOW
SPRITE v$ LOOP
MUSIC "egg" LOOP
ENDIF
IF ix=4 THEN
x1=842*padx ! y1=436*pady
x=-.2 ! y=.12
SPRITE i$ AT x1,y1 SCALE se
SPRITE i$ DA -5 DX x DY y
SPRITE i$ SHOW
SPRITE i$ LOOP
MUSIC "egg" LOOP
ENDIF
ENDIF
GET SPRITE i$ POS x4,y4
IF x4 >= 318*padx AND x4<328*padx THEN
x=0 ! y=1.5
SPRITE i$ DA 5 DX x DY y
ENDIF
GET SPRITE i$ POS x4,y4
IF x4 <= 724*padx AND x4>714*padx THEN
x=0 ! y=1.5
SPRITE i$ DA -5 DX x DY y
ENDIF
GET SPRITE v$ POS x5,y5
IF x5 >= 318*padx AND x5<328*padx THEN
x3=0 ! y3=1.5
SPRITE v$ DA 5 DX x3 DY y3
ENDIF
GET SPRITE v$ POS x5,y5
IF x5 <= 724*padx AND x5>714*padx THEN
x3=0 ! y3=1.5
SPRITE v$ DA -5 DX x3 DY y3
ENDIF
IF SPRITES_COLLIDE (v$,"masha_up_lv")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
sch=sch+1
MUSIC "istcho" PLAY
IF sch>best THEN
best+=1
ENDIF
GOSUB speedegg
GOTO 5
ENDIF
IF SPRITES_COLLIDE (i$,"masha_ln")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
sch=sch+1
MUSIC "istcho" PLAY
IF sch>best THEN
best+=1
ENDIF
GOSUB speedegg
GO TO 5
ENDIF
IF SPRITES_COLLIDE (v$,"masha_up_pv")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
sch=sch+1
MUSIC "istcho" PLAY
IF sch>best THEN
best+=1
ENDIF
GOSUB speedegg
GOTO 5
ENDIF
IF SPRITES_COLLIDE (i$,"masha_pn")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
sch=sch+1
MUSIC "istcho" PLAY
IF sch>best THEN
best+=1
ENDIF
GOSUB speedegg
GO TO 5
ENDIF
IF SPRITES_COLLIDE (i$,"b_egg")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
SPRITE "b_egg" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (i$,"b_egg")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
SPRITE "b_egg" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (i$,"b_egg2")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
SPRITE "b_egg2" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (i$,"b_egg2")=1 THEN
SPRITE i$ HIDE
SPRITE i$ STOP
SPRITE "b_egg2" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (v$,"b_egg")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
SPRITE "b_egg" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (v$,"b_egg")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
SPRITE "b_egg" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (v$,"b_egg2")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
SPRITE "b_egg2" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
IF SPRITES_COLLIDE (v$,"b_egg2")=1 THEN
SPRITE v$ HIDE
SPRITE v$ STOP
SPRITE "b_egg2" ALPHA 1
nn+=55*padx
SPRITE "dead_lives" AT 545*padx+nn,144*pady SCALE se
SPRITE "dead_lives" STAMP
deadEgg
ENDIF
'конец игры
IF nn=165*padx THEN
GRAPHICS CLEAR .2,.2,.2
PAGE 1 HIDE
DRAW COLOR 0,0,0
DRAW TEXT gover$ AT .maxx/2,.maxy/2-25
DRAW TEXT cegg$&sch AT .maxx/2+18,.maxy/2
DRAW RECT .maxx/2,.maxy/2 SIZE 100*.kof,50*.kof
DRAW TEXT "OK" AT .maxx/2,.maxy/2+50
FILE "System/Best" TRIM 0
FILE "System/Best" PRINT best
DRAW COLOR 0,0,0
DRAW TEXT bresult$&best AT .maxx/2+25,.maxy/2+25
REFRESH
PAUSE 1
nazh
loo:
GET TOUCH 0 AS xx,yy
IF xx>-1 THEN RUN "henhouse v1.txt"
GOTO loo
ENDIF
'яйцо разбилось
DEF deadEgg
MUSIC "egg" STOP
MUSIC "boom" PLAY
FOR ii=1 TO 10
IF ii%2=0 THEN PAGE 2 HIDE ELSE PAGE 2 SHOW
PAUSE .1
NEXT ii
SPRITE "b_egg2" ALPHA 0
SPRITE "b_egg" ALPHA 0
END DEF
'функция касания
DEF nazh
LOOP:
IF NOT x>-1 THEN LOOP
END DEF
IF sec=30 OR sec=1 THEN
SPRITE b$ SHOW
SPRITE b$ ALPHA 1
ENDIF
IF sec=15 OR sec=45 THEN
SPRITE b$ ALPHA 0
ENDIF
GOTO LOOP
speedegg: IF sch%17=0 THEN
speed-=0.0005
ENDIF
IF sch=100 THEN
speed=0.009
ENDIF
IF sch=200 THEN
speed=0.008
ENDIF
IF sch=300 THEN
speed=0.0075
ENDIF
IF sch=400 THEN
speed=0.0065
ENDIF
IF sch=500 THEN
speed=0.0055
ENDIF
IF sch=600 THEN
speed=0.0045
ENDIF
RETURN