Back to Blog
X= WindowEvent() : If X = #PB_Event_CloseWindow : End : EndIf THE "If" GETS EXECUTED WHEN USER CLICKS THE WINDOW CLOSE X ICON EMPTIES XEVENT QUEUE AND RETURNS 1 WHEN ESCAPE KEY IS PRESSEDĮSCAPE= 0 : ExamineKeyboard() : If KeyboardPushed(#PB_Key_Escape) : ESCAPE= 1 : EndIf LoadFont(4,"Arial",48,#PB_Font_Bold|#PB_Font_HighQuality) LoadFont(3,"Arial",36,#PB_Font_Bold|#PB_Font_HighQuality) LoadFont(2,"Arial",24,#PB_Font_Bold|#PB_Font_HighQuality) The source code below is available for your modifications and compilation using this free compiler if you want to experiment with making changes to the game.Ĭode: Select all ******************************** This was written as a demo program to help beginners learn game programming. Press the space bar to pause while playing.The Windows® version provides a full screen/window toggle by pressing W, F, S, or Alt+Enter.When playing using a gamepad controller, any button will serve as the trigger.When playing using a keyboard controller, the trigger button is mapped to the closest ctrl key.Things not mentioned in the sparse onscreen prompting: You may or may not need to read the rules linked above for the playing details. SURROUND contains variations of the Snake game. And having a great development environment helps a lot. After a multi-year programming halt, I feel back up to speed. I was surprised at how quickly things went. I started the programming of SURROUND at 9:48 PM CDT 6/22/14, and I finished everything, including the artificial intelligence opponent, at 2:33 AM CDT on 6/24/14, 29 hours later. I decided not to bother putting in the VIDEO GRAFFITI™ modes. Number of Players 2 1 3 1 2 2 2 2 2 2 2 2 1 or 2 1 or 2
0 Comments
Read More
Leave a Reply. |