Hey All
Brand new to the world of AppGameKit about, ohhhhhhhhhhhhhh, 5 hours ago thanks to the Steam Sale
- I downloaded the demo, it reminded me of AMOS, I know I'm not alone as I've seen the little
emoticon thingy now I'm on the forum - And, well, here I am. After briefly being distracted by "Her Story"...
Anyways...
Just sitting down with it to have a little play, I'm not new to the world of coding but for the past 9 years or so I've been living in a world of VBA (Visual Basic for Applications) and doing mostly bespoke business like internal stuff (AKA the boring stuff).
Years ago, using AMOS, I wrote a little Snake like game where you had to navigate a maze (think those little maze games in puzzle books where you have to reach treasure) - So, to get me used to things I thought I'd have a go at that.
I've hit a little snag and can't figure out the basics
What I want to do, is draw a line that keeps on going - A snake, but I can't work out which Command to use, I've looked for a "Plot", "Ink", "Pixel" or a "Draw" or, something...
The closest I got was DrawLine;
// Project: Test
// Created: 2015-06-26
// set window properties
SetWindowTitle( "Test" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
x=50
y=50
x2 = 150
y2 = 50
do
If LineUp = 1
DrawLine( x, y, x2, y2, 255, 255, 0)
x = x2
x2 = x2
y = y
y2 = y2 - 1
endif
If LineDown = 1
DrawLine( x, y, x2, y2, 255, 255, 0)
x = x2
x2 = x2
y = y
y2 = y2 + 1
endif
If LineRight = 1
DrawLine( x, y, x2, y2, 255, 255, 0)
x = x
x2 = x2 + 1
y = y2
y2 = y2
endif
If LineLeft = 1
DrawLine( x, y, x2, y2, 255, 255, 0)
x = x
x2 = x2 - 1
y = y2
y2 = y2
endif
if GetRawKeyPressed(38) //Up
LineUp = 1
LineDown = 0
LineLeft = 0
LineRight = 0
endif
if GetRawKeyPressed(40) //Down
LineUp = 0
LineDown = 1
LineLeft = 0
LineRight = 0
endif
if GetRawKeyPressed(39) //Right
LineUp = 0
LineDown = 0
LineLeft = 0
LineRight = 1
endif
if GetRawKeyPressed(37) //Left
LineUp = 0
LineDown = 0
LineLeft = 1
LineRight = 0
endif
DrawLine( x, y, x2, y2, 255, 255, 0)
if getpointerpressed()=1 then exit
sync()
loop
end
Can anyone point me in the right direction for the right Command?
This is very much a n00b question but I've been in the 'Help' for about an hour now and I've either over thought this or I'm missing something so stunningly simple I'm going to be kicking myself for a week
Thanks in advance for any help