Ok, so I was attempting to make my first game when I ran into a few problems. I have made 2 versions of the game and both I have had both technical problems and problems stemming from my limited knowledege base. The game I am attempting to recreate is an extremely simple version of brick breaker. I will first show the code, and then explain my problems.
Rem Project: Brick Breaker
Rem Created: Sunday, April 03, 2011
Rem ***** Main Source File *****
Set Display Mode 800,800,32
SET WINDOW SIZE 800, 800
Center Text 400, 100, "Hello and Welcome to Block Breaker by Eric Boyce!"
Center Text 400, 400, "Press Enter to Continue."
Wait Key
CLS
Center Text 400, 300, "Begin!"
Wait Key
CLS
load image "Box.png" ,1
load image "cube yellow.png" ,2
load image "cube red.png" ,3
load image "cube blue.png" ,4
load image "cube pink.png" ,5
load image "cube purple.png" ,6
load image "cube green.png" ,7
load image "Message.png" ,8
Sprite 1, 275, 700, 1
Sprite 2, 200, 300, 2
Sprite 3, 325, 300, 3
Sprite 4, 450, 300, 4
Sprite 5, 270, 200, 5
Sprite 6, 390, 200, 6
Sprite 7, 325, 100, 7
Sprite 8, 50, 50, 8
input "" , input$
do
If Leftkey()=1
Move Sprite 1, 400
Endif
If Rightkey()=1
Move Sprite 1, 400
Endif
If Input$="e"
End
Endif
loop
The problems I have with this version are that when you press the left or right arrow keys, A: Nothing happens. B: I am almost certain "Move Sprite" doesn't specify direction and I can't find any other commands that will do so.
After unsuccessfully attempting to fix that version I opted for version 2.0. The first two screens are the same, only the "brick breaker" part itself is different. This is the code I am having trouble with.
*Note: trampolineX = the first x coordinate and trapolineXY
= the second
trampolineX = 300
trampolineXY = 500
box trampolineX, 600, trampolineXY, 700
Enter Code For Bricks (ie. box 121, 245, 356, 467)
Do
if leftkey()=1
trampolineX - 3
trampolineXY - 3
Endif
if rightkey()=1
trampolineX + 3
trampolineXY + 3
endif
loop
The problems with this code are that A: When you press an arrow key nothing happens and B: I wouldn't know how to code the collisions.
Thank you very much to any who help. It is much appreciated.