The Ring programming language version 1.2 book - Part 37 of 84Mahmoud Samir Fayed
The document provides documentation on using the Ring game engine for creating simple games. It describes how to load the game engine, create a game object, add animated sprites and define their behavior using functions. It also demonstrates how to create tile-based maps and handle map events by getting and setting tile values using mouse clicks.
The Ring programming language version 1.5.1 book - Part 48 of 180Mahmoud Samir Fayed
This document contains examples of using the Ring game engine to create sprites, animate objects, add mouse and keyboard controls, implement maps and draw objects. Code snippets show how to:
1. Create a sprite and add keyboard controls to move it left, right, up and down using keypress events.
2. Add mouse control to a sprite to move it to the mouse click location on mouse up events.
3. Add boundary and state checking to a sprite.
4. Animate a sprite, add keyboard and mouse controls, and implement movement and looping animation.
5. Create a map from a 2D array, add scrolling and mouse interaction to change map values.
6.
The Ring programming language version 1.8 book - Part 56 of 202Mahmoud Samir Fayed
This document contains examples of using the Ring game engine to create sprites, animate objects, handle input events, and draw to the screen. Key aspects include:
- Creating a Game object and adding sprites to handle input events like keypress and mouse clicks to move and position sprites.
- Using the animate block to create animated sprites by changing frame and moving the sprite over time.
- Creating a map using a 2D array to represent tiles and adding input handling to allow clicking tiles to change their type.
- Creating objects that can be drawn to using OpenGL calls, with examples of drawing circles and rectangles, and handling input to move the object.
The Ring programming language version 1.9 book - Part 59 of 210Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine to play sounds, animate sprites, handle keyboard/mouse input, and create maps. It shows how to:
- Play a sound file using the Sound object
- Animate text using the animate property and increasing the y position over time
- Create a repeating animation by incrementing the frame number and resetting it
- Handle keyboard input by moving a sprite left/right/up/down based on key presses
- Move a sprite to the mouse click position on mouse up events
- Add boundary checking to a sprite's position in the state event
- Animate a sprite and move it down slowly while allowing it to jump on spacebar
The Ring programming language version 1.6 book - Part 52 of 189Mahmoud Samir Fayed
This document provides code for creating a basic game using the Ring game engine. It defines an object with drawing and movement functions to display moving circles on the screen. Keypress events allow the object to be moved left, right, up and down. Additional examples show drawing rectangles and creating a stars fighter game. The code demonstrates basic game object creation and event handling capabilities in the Ring game engine.
The Ring programming language version 1.5.3 book - Part 49 of 184Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine. It shows how to load the game engine, create a game object, add text, sounds, animations, sprites and maps. Functions are used to control sprite movement with keyboard/mouse input and define animation and collision behavior.
The Ring programming language version 1.5.2 book - Part 49 of 181Mahmoud Samir Fayed
This document provides code for creating a basic game using the Ring game engine. It includes code to:
1) Create a sprite object that can be moved using keyboard controls and placed using mouse clicks;
2) Create an animated sprite that moves and jumps using keyboard controls;
3) Create a tiled map with different block types and allow editing blocks by clicking;
4) Create an object that draws circles and rectangles as it moves across the screen using keyboard controls.
The Ring programming language version 1.10 book - Part 61 of 212Mahmoud Samir Fayed
This document contains source code for a Stars Fighter game built using the Ring game engine. It includes code to create a main game object and game state object. On the main menu screen, text is displayed for the title, version, and copyright. If the player presses space or clicks, it will set the game state's startplay flag to true and shut down the game engine to transition to the gameplay.
The Ring programming language version 1.2 book - Part 37 of 84Mahmoud Samir Fayed
The document provides documentation on using the Ring game engine for creating simple games. It describes how to load the game engine, create a game object, add animated sprites and define their behavior using functions. It also demonstrates how to create tile-based maps and handle map events by getting and setting tile values using mouse clicks.
The Ring programming language version 1.5.1 book - Part 48 of 180Mahmoud Samir Fayed
This document contains examples of using the Ring game engine to create sprites, animate objects, add mouse and keyboard controls, implement maps and draw objects. Code snippets show how to:
1. Create a sprite and add keyboard controls to move it left, right, up and down using keypress events.
2. Add mouse control to a sprite to move it to the mouse click location on mouse up events.
3. Add boundary and state checking to a sprite.
4. Animate a sprite, add keyboard and mouse controls, and implement movement and looping animation.
5. Create a map from a 2D array, add scrolling and mouse interaction to change map values.
6.
The Ring programming language version 1.8 book - Part 56 of 202Mahmoud Samir Fayed
This document contains examples of using the Ring game engine to create sprites, animate objects, handle input events, and draw to the screen. Key aspects include:
- Creating a Game object and adding sprites to handle input events like keypress and mouse clicks to move and position sprites.
- Using the animate block to create animated sprites by changing frame and moving the sprite over time.
- Creating a map using a 2D array to represent tiles and adding input handling to allow clicking tiles to change their type.
- Creating objects that can be drawn to using OpenGL calls, with examples of drawing circles and rectangles, and handling input to move the object.
The Ring programming language version 1.9 book - Part 59 of 210Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine to play sounds, animate sprites, handle keyboard/mouse input, and create maps. It shows how to:
- Play a sound file using the Sound object
- Animate text using the animate property and increasing the y position over time
- Create a repeating animation by incrementing the frame number and resetting it
- Handle keyboard input by moving a sprite left/right/up/down based on key presses
- Move a sprite to the mouse click position on mouse up events
- Add boundary checking to a sprite's position in the state event
- Animate a sprite and move it down slowly while allowing it to jump on spacebar
The Ring programming language version 1.6 book - Part 52 of 189Mahmoud Samir Fayed
This document provides code for creating a basic game using the Ring game engine. It defines an object with drawing and movement functions to display moving circles on the screen. Keypress events allow the object to be moved left, right, up and down. Additional examples show drawing rectangles and creating a stars fighter game. The code demonstrates basic game object creation and event handling capabilities in the Ring game engine.
The Ring programming language version 1.5.3 book - Part 49 of 184Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine. It shows how to load the game engine, create a game object, add text, sounds, animations, sprites and maps. Functions are used to control sprite movement with keyboard/mouse input and define animation and collision behavior.
The Ring programming language version 1.5.2 book - Part 49 of 181Mahmoud Samir Fayed
This document provides code for creating a basic game using the Ring game engine. It includes code to:
1) Create a sprite object that can be moved using keyboard controls and placed using mouse clicks;
2) Create an animated sprite that moves and jumps using keyboard controls;
3) Create a tiled map with different block types and allow editing blocks by clicking;
4) Create an object that draws circles and rectangles as it moves across the screen using keyboard controls.
The Ring programming language version 1.10 book - Part 61 of 212Mahmoud Samir Fayed
This document contains source code for a Stars Fighter game built using the Ring game engine. It includes code to create a main game object and game state object. On the main menu screen, text is displayed for the title, version, and copyright. If the player presses space or clicks, it will set the game state's startplay flag to true and shut down the game engine to transition to the gameplay.
The Ring programming language version 1.3 book - Part 39 of 88Mahmoud Samir Fayed
This document provides documentation on using the game engine in Ring to play sounds, animate objects, use sprites, and create maps. It includes code examples to load the game engine, create a game object, play a sound file, add animated and stationary text objects, create a sprite that can be moved with keyboard controls or mouse clicks, and define a map as a 2D array of tile numbers. The code demonstrates core functions of the game engine like animation, input handling, and map creation.
The Ring programming language version 1.6 book - Part 51 of 189Mahmoud Samir Fayed
This document contains documentation on classes in the Ring game engine including:
- The Animate class which controls animation and has attributes like frames and framewidth.
- The Sound class which plays sound files and has attributes like file and once.
- The Map class which represents game maps and has attributes like aMap and aImages.
It also provides examples of using the game engine to:
- Create a game window
- Draw text
- Move text
- Play sounds
- Create animations
- Automatically move a sprite with keyboard controls
- Handle keypress and mouse events for custom sprite movement
The Ring programming language version 1.5.2 book - Part 48 of 181Mahmoud Samir Fayed
This document describes classes and methods in the Ring game engine documentation. It covers Animate, Sound, Map, and Sprite classes. Methods include Draw(), playsound(), and getvalue(). Examples are provided for creating a game window, drawing text, playing sounds, and animating and moving sprites using keyboard and mouse input.
The Ring programming language version 1.5.4 book - Part 50 of 185Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" using the Ring game engine. It includes code to load images and sounds, create game objects like sprites and text, handle input events, and control the game state and flow. The game has a main menu that allows starting a new game via mouse or keyboard input. When started, the game enters a gameplay loop that renders the background, controls player movement, and ends when the game is over.
The Ring programming language version 1.10 book - Part 60 of 212Mahmoud Samir Fayed
The document provides code examples for creating and customizing a game using the Ring game engine. It shows how to:
1. Load the game engine, create a game object, and start the event loop to initialize a basic game window.
2. Add text drawing and animation by modifying game object properties like position, color, font and movement settings.
3. Play sound by adding a sound object to the game.
4. Add sprite animation by loading image frames and updating the frame on each loop.
5. Handle keyboard and mouse input by adding keypress and mouse event functions to respond to user input.
The Ring programming language version 1.5 book - Part 9 of 31Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter using the Ring game engine. It includes code to create game objects like sprites, sounds, and text objects. It defines classes like GameState to track game variables and functions for game play, drawing to the screen, object movement, collisions, and win/loss conditions. The code implements a basic space shooter game with a player ship, enemies, firing projectiles, scoring, and multiple levels.
The Ring programming language version 1.9 book - Part 60 of 210Mahmoud Samir Fayed
This document provides documentation for Ring version 1.9 and includes code samples for using the Ring game engine. It shows how to create a game object, add a map and images, handle mouse and keyboard events, create objects that can be drawn and moved, and provides a full sample game code for a "Stars Fighter" space shooter game.
The Ring programming language version 1.3 book - Part 40 of 88Mahmoud Samir Fayed
This document provides documentation for Ring version 1.3 and includes code examples for using the Ring game engine. It shows how to create a game object, add a map and images, handle mouse and keyboard events, create objects and add drawing functions. One section focuses specifically on a "Stars Fighter" game example, showing how to set up the main menu, gameplay, player ship, enemies, firing, scoring and win checking.
The Ring programming language version 1.5.1 book - Part 47 of 180Mahmoud Samir Fayed
This document describes the Ring game engine documentation for version 1.5.1. It includes descriptions of various classes and their attributes that make up the game engine, including GameObject, Sprite, Text, Animate, Sound, Map, and others. It also provides examples of how to use the game engine to create a game window, draw text, move text, play sounds, animate sprites, and enable automatic movement of a sprite using the keyboard.
The Ring programming language version 1.5.3 book - Part 50 of 184Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" built with the Ring game engine. It includes code to load assets like images, sounds and fonts. It defines game states for the main menu and gameplay. Objects are created for the background, player ship, enemy ships and projectiles. Functions handle input, movement, collisions and winning conditions. The code provides a complete prototype for a basic 2D shooter game.
The Ring programming language version 1.8 book - Part 55 of 202Mahmoud Samir Fayed
This document provides documentation on the Ring game engine. It describes various classes used to create game objects like sprites, text, sounds, maps and more. It also provides examples on how to use the game engine to create a basic game window, draw text, move text, play sounds, animate sprites, and set up automatic sprite movement using keyboard controls.
The Ring programming language version 1.7 book - Part 53 of 196Mahmoud Samir Fayed
This document provides documentation on Ring's game engine and graphics libraries. It describes:
1) The gl_allegro and gl_libsdl libraries that provide a common interface to Allegro and SDL graphics libraries to allow switching between them.
2) The main classes in the game engine like Game, GameObject, Sprite, Text, Animate, Sound and Map that can be used to build games.
3) How to use the game engine classes through declarative programming to create games, including examples showing text, sound, animation and functions.
The Ring programming language version 1.5.2 book - Part 52 of 181Mahmoud Samir Fayed
This document describes code for a 3D game built using Ring and OpenGL. It includes functions for initializing OpenGL, drawing objects like cubes, handling input, and more. RingOpenGL provides bindings to the OpenGL graphics library that allow Ring programs to render 3D graphics. Sample code is based on OpenGL tutorials and shows how to create a simple 3D cube using RingOpenGL.
The Ring programming language version 1.5.1 book - Part 49 of 180Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter written in Ring. It includes code for a main menu screen with instructions, background music, and title text. It also includes code for the gameplay which features a player sprite that can be moved with mouse or keyboard controls, enemy sprites that move across the screen, firing projectiles, tracking scores, health, levels and handling wins/losses. The code is well structured and commented to explain the different game elements and functions.
The Ring programming language version 1.4.1 book - Part 15 of 31Mahmoud Samir Fayed
This document provides source code for a Flappy Bird clone game called Flappy Bird 3000 written in Ring programming language using a game engine. The code defines a main game loop that loads assets and controls game play. It includes code for a main menu, gameplay, map generation, and collision detection between the player and obstacles to end the game. The goal is for the player to score 3000 points by navigating the bird character between obstacles.
The Ring programming language version 1.7 book - Part 55 of 196Mahmoud Samir Fayed
The document contains source code for a 2D game engine and an example game called "Stars Fighter" built with the engine. The game engine code handles core game functionality like drawing, input handling, object management. The Stars Fighter code implements the game logic including player control, enemy behavior, collisions, scoring, and level progression. The game displays a menu screen before starting the main game loop where the player shoots enemies to advance levels.
The Ring programming language version 1.3 book - Part 43 of 88Mahmoud Samir Fayed
The document provides code examples for building graphical user interface applications using Ring and Qt, including creating a basic application with buttons and text fields, using layouts to organize widgets, displaying rich text in a QTextEdit widget, and populating a list of items in a QListWidget. It demonstrates basic GUI functionality and classes that can be used for desktop and mobile development with RingQt.
The Ring programming language version 1.2 book - Part 38 of 84Mahmoud Samir Fayed
The document describes how to create a simple 2D game using the Ring game engine. It shows code for creating game objects like sprites, handling input events, playing sounds, and displaying text. An example game is provided that implements a spaceship that shoots enemies to earn points and advance levels, with the goal of destroying all enemies within a level within a certain number of hits. Game state like score, level, and energy/hits is tracked and displayed.
The Ring programming language version 1.8 book - Part 57 of 202Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter written in Ring. The code defines classes and functions for a game engine, game state, and gameplay elements like sprites, sounds and text. It includes a main menu screen and gameplay that allows the player to control a spaceship, shoot enemies, and advance levels by destroying all enemies. The game tracks the player's score, energy level, number of enemies and level.
The Ring programming language version 1.5.3 book - Part 59 of 184Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine. It shows how to load the game engine, create a game object, add text, sounds, animations, sprites and maps. Functions are used to control sprite movement with keyboard/mouse input and define animation and collision detection. Screenshots demonstrate the animated output.
The Ring programming language version 1.5.4 book - Part 49 of 185Mahmoud Samir Fayed
The document describes how to create and animate objects in a game engine using the Ring programming language. It shows examples of creating a game object with static and animated text, playing sounds, animating sprites, and handling keyboard, mouse and state events for sprites. The examples demonstrate basic game development techniques like initializing a game, adding objects, controlling animation, and handling input.
The Ring programming language version 1.5.3 book - Part 60 of 184Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" built with the Ring game engine. It includes code to load assets like images, sounds and fonts. It defines game states for the main menu and gameplay. Objects are created for the background, player ship, enemy ships and projectiles. Functions handle input, movement, collisions and winning conditions. The code provides a complete prototype for a basic 2D shooter game.
The Ring programming language version 1.3 book - Part 39 of 88Mahmoud Samir Fayed
This document provides documentation on using the game engine in Ring to play sounds, animate objects, use sprites, and create maps. It includes code examples to load the game engine, create a game object, play a sound file, add animated and stationary text objects, create a sprite that can be moved with keyboard controls or mouse clicks, and define a map as a 2D array of tile numbers. The code demonstrates core functions of the game engine like animation, input handling, and map creation.
The Ring programming language version 1.6 book - Part 51 of 189Mahmoud Samir Fayed
This document contains documentation on classes in the Ring game engine including:
- The Animate class which controls animation and has attributes like frames and framewidth.
- The Sound class which plays sound files and has attributes like file and once.
- The Map class which represents game maps and has attributes like aMap and aImages.
It also provides examples of using the game engine to:
- Create a game window
- Draw text
- Move text
- Play sounds
- Create animations
- Automatically move a sprite with keyboard controls
- Handle keypress and mouse events for custom sprite movement
The Ring programming language version 1.5.2 book - Part 48 of 181Mahmoud Samir Fayed
This document describes classes and methods in the Ring game engine documentation. It covers Animate, Sound, Map, and Sprite classes. Methods include Draw(), playsound(), and getvalue(). Examples are provided for creating a game window, drawing text, playing sounds, and animating and moving sprites using keyboard and mouse input.
The Ring programming language version 1.5.4 book - Part 50 of 185Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" using the Ring game engine. It includes code to load images and sounds, create game objects like sprites and text, handle input events, and control the game state and flow. The game has a main menu that allows starting a new game via mouse or keyboard input. When started, the game enters a gameplay loop that renders the background, controls player movement, and ends when the game is over.
The Ring programming language version 1.10 book - Part 60 of 212Mahmoud Samir Fayed
The document provides code examples for creating and customizing a game using the Ring game engine. It shows how to:
1. Load the game engine, create a game object, and start the event loop to initialize a basic game window.
2. Add text drawing and animation by modifying game object properties like position, color, font and movement settings.
3. Play sound by adding a sound object to the game.
4. Add sprite animation by loading image frames and updating the frame on each loop.
5. Handle keyboard and mouse input by adding keypress and mouse event functions to respond to user input.
The Ring programming language version 1.5 book - Part 9 of 31Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter using the Ring game engine. It includes code to create game objects like sprites, sounds, and text objects. It defines classes like GameState to track game variables and functions for game play, drawing to the screen, object movement, collisions, and win/loss conditions. The code implements a basic space shooter game with a player ship, enemies, firing projectiles, scoring, and multiple levels.
The Ring programming language version 1.9 book - Part 60 of 210Mahmoud Samir Fayed
This document provides documentation for Ring version 1.9 and includes code samples for using the Ring game engine. It shows how to create a game object, add a map and images, handle mouse and keyboard events, create objects that can be drawn and moved, and provides a full sample game code for a "Stars Fighter" space shooter game.
The Ring programming language version 1.3 book - Part 40 of 88Mahmoud Samir Fayed
This document provides documentation for Ring version 1.3 and includes code examples for using the Ring game engine. It shows how to create a game object, add a map and images, handle mouse and keyboard events, create objects and add drawing functions. One section focuses specifically on a "Stars Fighter" game example, showing how to set up the main menu, gameplay, player ship, enemies, firing, scoring and win checking.
The Ring programming language version 1.5.1 book - Part 47 of 180Mahmoud Samir Fayed
This document describes the Ring game engine documentation for version 1.5.1. It includes descriptions of various classes and their attributes that make up the game engine, including GameObject, Sprite, Text, Animate, Sound, Map, and others. It also provides examples of how to use the game engine to create a game window, draw text, move text, play sounds, animate sprites, and enable automatic movement of a sprite using the keyboard.
The Ring programming language version 1.5.3 book - Part 50 of 184Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" built with the Ring game engine. It includes code to load assets like images, sounds and fonts. It defines game states for the main menu and gameplay. Objects are created for the background, player ship, enemy ships and projectiles. Functions handle input, movement, collisions and winning conditions. The code provides a complete prototype for a basic 2D shooter game.
The Ring programming language version 1.8 book - Part 55 of 202Mahmoud Samir Fayed
This document provides documentation on the Ring game engine. It describes various classes used to create game objects like sprites, text, sounds, maps and more. It also provides examples on how to use the game engine to create a basic game window, draw text, move text, play sounds, animate sprites, and set up automatic sprite movement using keyboard controls.
The Ring programming language version 1.7 book - Part 53 of 196Mahmoud Samir Fayed
This document provides documentation on Ring's game engine and graphics libraries. It describes:
1) The gl_allegro and gl_libsdl libraries that provide a common interface to Allegro and SDL graphics libraries to allow switching between them.
2) The main classes in the game engine like Game, GameObject, Sprite, Text, Animate, Sound and Map that can be used to build games.
3) How to use the game engine classes through declarative programming to create games, including examples showing text, sound, animation and functions.
The Ring programming language version 1.5.2 book - Part 52 of 181Mahmoud Samir Fayed
This document describes code for a 3D game built using Ring and OpenGL. It includes functions for initializing OpenGL, drawing objects like cubes, handling input, and more. RingOpenGL provides bindings to the OpenGL graphics library that allow Ring programs to render 3D graphics. Sample code is based on OpenGL tutorials and shows how to create a simple 3D cube using RingOpenGL.
The Ring programming language version 1.5.1 book - Part 49 of 180Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter written in Ring. It includes code for a main menu screen with instructions, background music, and title text. It also includes code for the gameplay which features a player sprite that can be moved with mouse or keyboard controls, enemy sprites that move across the screen, firing projectiles, tracking scores, health, levels and handling wins/losses. The code is well structured and commented to explain the different game elements and functions.
The Ring programming language version 1.4.1 book - Part 15 of 31Mahmoud Samir Fayed
This document provides source code for a Flappy Bird clone game called Flappy Bird 3000 written in Ring programming language using a game engine. The code defines a main game loop that loads assets and controls game play. It includes code for a main menu, gameplay, map generation, and collision detection between the player and obstacles to end the game. The goal is for the player to score 3000 points by navigating the bird character between obstacles.
The Ring programming language version 1.7 book - Part 55 of 196Mahmoud Samir Fayed
The document contains source code for a 2D game engine and an example game called "Stars Fighter" built with the engine. The game engine code handles core game functionality like drawing, input handling, object management. The Stars Fighter code implements the game logic including player control, enemy behavior, collisions, scoring, and level progression. The game displays a menu screen before starting the main game loop where the player shoots enemies to advance levels.
The Ring programming language version 1.3 book - Part 43 of 88Mahmoud Samir Fayed
The document provides code examples for building graphical user interface applications using Ring and Qt, including creating a basic application with buttons and text fields, using layouts to organize widgets, displaying rich text in a QTextEdit widget, and populating a list of items in a QListWidget. It demonstrates basic GUI functionality and classes that can be used for desktop and mobile development with RingQt.
The Ring programming language version 1.2 book - Part 38 of 84Mahmoud Samir Fayed
The document describes how to create a simple 2D game using the Ring game engine. It shows code for creating game objects like sprites, handling input events, playing sounds, and displaying text. An example game is provided that implements a spaceship that shoots enemies to earn points and advance levels, with the goal of destroying all enemies within a level within a certain number of hits. Game state like score, level, and energy/hits is tracked and displayed.
The Ring programming language version 1.8 book - Part 57 of 202Mahmoud Samir Fayed
This document contains source code for a 2D game called Stars Fighter written in Ring. The code defines classes and functions for a game engine, game state, and gameplay elements like sprites, sounds and text. It includes a main menu screen and gameplay that allows the player to control a spaceship, shoot enemies, and advance levels by destroying all enemies. The game tracks the player's score, energy level, number of enemies and level.
The Ring programming language version 1.5.3 book - Part 59 of 184Mahmoud Samir Fayed
This document provides code examples for using the Ring game engine. It shows how to load the game engine, create a game object, add text, sounds, animations, sprites and maps. Functions are used to control sprite movement with keyboard/mouse input and define animation and collision detection. Screenshots demonstrate the animated output.
The Ring programming language version 1.5.4 book - Part 49 of 185Mahmoud Samir Fayed
The document describes how to create and animate objects in a game engine using the Ring programming language. It shows examples of creating a game object with static and animated text, playing sounds, animating sprites, and handling keyboard, mouse and state events for sprites. The examples demonstrate basic game development techniques like initializing a game, adding objects, controlling animation, and handling input.
The Ring programming language version 1.5.3 book - Part 60 of 184Mahmoud Samir Fayed
This document provides code for a 2D space shooter game called "Stars Fighter" built with the Ring game engine. It includes code to load assets like images, sounds and fonts. It defines game states for the main menu and gameplay. Objects are created for the background, player ship, enemy ships and projectiles. Functions handle input, movement, collisions and winning conditions. The code provides a complete prototype for a basic 2D shooter game.
The Ring programming language version 1.3 book - Part 42 of 88Mahmoud Samir Fayed
This document contains source code for a Super Man 2016 game created with the Ring game engine. The code defines game objects like sprites, maps, and text for the title screen and gameplay. It includes functions for player movement and collision detection, opening walls when scoring thresholds are met, and ending the game if the player runs out of energy.
The Ring programming language version 1.7 book - Part 56 of 196Mahmoud Samir Fayed
This document contains source code for a Super Man 2016 game. The code defines game objects like sprites, texts, animations and sounds. It includes a GameState class to track game state. The main game loop initializes the game engine, loads assets and calls functions to start and run the game, refreshing the display each frame.
The Ring programming language version 1.9 book - Part 62 of 210Mahmoud Samir Fayed
This document contains source code for a 2D Super Man game created in the Ring programming language. The game has the following key elements:
1. A main game loop that initializes the game engine and game state and runs the game.
2. Sprite and text objects to display the title screen, instructions, and in-game elements like the player character and score.
3. Logic for player input and movement, collision detection with walls on the map, and interaction with enemies and powerups.
4. Functions to handle the game state, open doors when scoring thresholds are met, and end the game if the player runs out of energy.
The Ring programming language version 1.6 book - Part 55 of 189Mahmoud Samir Fayed
Here are the key points about RingOpenGL:
- RingOpenGL provides bindings to the OpenGL graphics library, allowing Ring programs to use 3D graphics capabilities.
- It supports multiple versions of OpenGL from 1.1 to the latest 4.3 specification. This allows access to modern OpenGL features.
- Sample programs are included to demonstrate basic 3D rendering concepts like drawing cubes, handling user input, etc. These are based on tutorials for the GLUT (OpenGL Utility Toolkit) library.
- To get started, programs can load the RingOpenGL library and make OpenGL calls like glBegin, glColor3f, glVertex3f to render 3D shapes and scenes.
- The RingFreeGLUT
The Ring programming language version 1.5.1 book - Part 50 of 180Mahmoud Samir Fayed
The Super Man 2016 game source code contains the code for a side-scrolling game where the player controls Superman. The game displays a title screen with instructions before starting the main gameplay. In the gameplay, Superman moves from left to right across a cityscape, dodging obstacles on a map while random enemies fly around the screen. The game ends when the player presses Esc or reaches the end of the level.
The Ring programming language version 1.8 book - Part 59 of 202Mahmoud Samir Fayed
This document provides instructions for building RingLibSDL games for Android. The key steps are:
1. Download the Android SDK, NDK, Ant, and JDK for development. Update the Android SDK to the desired API level (e.g. API 19).
2. Set up the project folder structure with the game source code and assets.
3. Build the native code using the NDK build command (ndk-build).
4. Create the Android package (.apk) file using the Ant debug command (ant debug).
This allows games created with the Ring Game Engine to be packaged and run as Android applications. The sample project includes a ready-made Flappy Bird 3000
The Ring programming language version 1.10 book - Part 63 of 212Mahmoud Samir Fayed
This document contains the source code for a Super Man 2016 game built with the Ring game engine. It includes code for game objects like the player character (Superman), enemies, walls, stars, keys, and more. Functions are defined for game logic like checking collisions, movement, scoring, and winning/losing conditions. On startup, it loads assets and initializes the game state before entering the main game loop to run and render the game. Keypress and mouse input allow controlling Superman to navigate the level, avoid enemies, and collect items to advance in the game.
The Ring programming language version 1.5.3 book - Part 62 of 184Mahmoud Samir Fayed
This document contains source code for a Super Man 2016 game created in the Ring programming language. It includes code for the game engine, map, player sprite that can move and collect items, enemy sprites, scoring text, and functions for collision detection, opening walls, and ending the game. The game displays a title screen and allows the player to move Superman around the city collecting stars and keys while avoiding enemies to progress to new levels.
The Ring programming language version 1.8 book - Part 58 of 202Mahmoud Samir Fayed
This document contains source code for a Super Man 2016 game. The code defines a GameState class and includes functions for initializing the game, displaying sprites, maps, and text on the screen. It sets up animations for a flying superman sprite and allows the player to start the game by pressing the space bar. When started, the game displays a city background map and superman flies around randomly, bouncing off edges of the screen.
The Ring programming language version 1.5.2 book - Part 50 of 181Mahmoud Samir Fayed
This document contains source code for a Flappy Bird 3000 game created with the Ring game engine. It includes code for a main menu with instructions and controls, a gameplay loop that handles player input and movement, generating pipes for the player to navigate, collision detection, scoring, and win/lose conditions. The game aims to get the player's score to 3000 by navigating between pipes without collision.
Similar to The Ring programming language version 1.7 book - Part 54 of 196 (13)
The Ring programming language version 1.10 book - Part 212 of 212Mahmoud Samir Fayed
This document summarizes new features and changes in different versions of the Ring programming language and library. It discusses various topics including using different syntax styles and code editors, developing graphical desktop and mobile applications using RingQt, and using Ring for 3D graphics and games development. The document also provides overviews of the core Ring libraries and language features.
The Ring programming language version 1.10 book - Part 211 of 212Mahmoud Samir Fayed
This document provides documentation for the Ring programming language and various Ring extensions and libraries. It includes sections on Ring mode for Emacs editor, the Ring Notepad IDE, the Ring Package Manager (RingPM), embedding Ring code in C/C++ programs, and references for the functions and classes of various Ring extensions for areas like 2D/3D graphics, networking, multimedia and more.
The Ring programming language version 1.10 book - Part 210 of 212Mahmoud Samir Fayed
This document contains summaries of various Ring classes, functions and concepts:
- It describes Ring classes like the Map, Math, MySQL, and PostgreSQL classes.
- It lists and briefly explains Ring standard library functions such as map(), random(), newlist(), and print().
- It covers Ring concepts and features like object oriented programming, operators, files and I/O, GUI programming, and web development.
The Ring programming language version 1.10 book - Part 208 of 212Mahmoud Samir Fayed
This document provides a summary of functions in the Ring documentation for Release 1.10. It lists functions for drawing quadrics, normals, orientation, and textures. It also lists functions for scaling images, drawing spheres, starting and ending contours and polygons for tessellation, setting tessellation normals and properties, adding tessellation vertices, and unprojecting coordinates. The document also provides resources for the Ring language like the website, source code repository, contact information, and lists Arabic language resources.
The Ring programming language version 1.10 book - Part 207 of 212Mahmoud Samir Fayed
This document contains listings of over 100 OpenGL functions related to lighting, materials, textures, and rendering. The functions listed specify parameters for lights, materials, texture coordinates, and rendering operations like clearing buffers and drawing primitives.
The Ring programming language version 1.10 book - Part 205 of 212Mahmoud Samir Fayed
This document lists numerous OpenGL constants and enumerations related to textures, blending, shaders, buffers, and other graphics features. It includes constants for texture types and formats, shader variable types, buffer bindings and usages, and more. The listing contains over 200 individual constants and enumerations without descriptions.
The Ring programming language version 1.10 book - Part 206 of 212Mahmoud Samir Fayed
The document lists OpenGL functions and constants added in version 1.10 of the OpenGL specification. It includes over 100 functions and constants for features such as unsigned integer textures, texture buffers, geometry shaders, transform feedback, and more robust context handling.
The Ring programming language version 1.10 book - Part 203 of 212Mahmoud Samir Fayed
The document contains a list of functions and constants related to OpenGL graphics functionality. It includes functions for vertex specification, texture mapping, tessellation, nurbs modeling, quadric surfaces, and more. It also includes constants for OpenGL states, modes, and error codes.
The Ring programming language version 1.10 book - Part 202 of 212Mahmoud Samir Fayed
The document lists over 100 OpenGL functions for querying and retrieving information about OpenGL objects, state, and errors. Some of the functions listed include glGetError() to retrieve OpenGL error codes, glGetUniformLocation() to retrieve the location of a uniform variable in a program, and glGetString() to retrieve version and extension information.
The Ring programming language version 1.10 book - Part 201 of 212Mahmoud Samir Fayed
The document lists various OpenGL constants and functions related to OpenGL graphics functionality. It includes constants for texture and color formats, clipping planes, buffer objects, shader operations, and more. It also lists over 100 OpenGL function declarations for operations like drawing, clearing, texture handling, blending, and shader manipulation.
The Ring programming language version 1.10 book - Part 200 of 212Mahmoud Samir Fayed
This document lists numerous OpenGL constants related to graphics hardware capabilities, state variables, and functions. It includes constants for vertex arrays, texture mapping, blending, multisampling, shader types, and more. The constants are used to query and set the state and capabilities of the OpenGL graphics processing context.
The Ring programming language version 1.10 book - Part 199 of 212Mahmoud Samir Fayed
The document lists over 200 OpenGL constants related to graphics rendering features such as fog, depth testing, blending, textures, and more. It provides the names of constants for configuring various graphics pipeline states and settings in OpenGL.
The Ring programming language version 1.10 book - Part 198 of 212Mahmoud Samir Fayed
The document contains listings of over 100 OpenGL and GLU function declarations related to texture coordinates, uniforms, vertex specification, and tessellation. It provides the function name, return type if any, and parameters for each function for specifying texture coordinates, uniforms, vertices and performing tessellation in OpenGL and GLU.
The Ring programming language version 1.10 book - Part 197 of 212Mahmoud Samir Fayed
The document contains documentation for over 100 OpenGL functions related to rendering, textures, shaders, and more. It lists each function name and its parameters. The functions allow specifying colors, textures, shader programs, and various rendering states and operations in OpenGL.
The Ring programming language version 1.10 book - Part 196 of 212Mahmoud Samir Fayed
This document lists OpenGL constants and functions related to graphics rendering. It includes constants for buffer types, shader data types, texture types, and more. It also lists function prototypes for common OpenGL operations like drawing, clearing, binding textures and buffers, and setting shader uniforms.
The Ring programming language version 1.10 book - Part 195 of 212Mahmoud Samir Fayed
The document lists over 200 OpenGL constants related to textures, vertex arrays, blending, and buffer objects. It provides reference documentation for OpenGL version 1.10 including constants for texture formats and parameters, vertex attribute types, blending functions, and buffer usage flags.
The Ring programming language version 1.10 book - Part 194 of 212Mahmoud Samir Fayed
The document lists various constants used in OpenGL such as GL_FOG_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM, and others related to OpenGL rendering, blending, textures, lighting, and more. It provides definitions for OpenGL enums and related values.
The Ring programming language version 1.10 book - Part 193 of 212Mahmoud Samir Fayed
This document lists over 100 OpenGL functions for specifying textures, lighting, shaders, and other graphics operations. The functions include glMultiTexCoord2iv() for specifying texture coordinates, glNormal3f() for specifying normals, and glUniform1f() for specifying shader uniforms.
The Ring programming language version 1.10 book - Part 192 of 212Mahmoud Samir Fayed
This document lists OpenGL functions and constants that were added or changed in OpenGL version 1.10. It includes over 150 new OpenGL constants for features such as geometry shaders, transform feedback, cube map arrays, and more. It also lists over 80 OpenGL functions, providing their parameters and types.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
CAKE: Sharing Slices of Confidential Data on BlockchainClaudio Di Ciccio
Presented at the CAiSE 2024 Forum, Intelligent Information Systems, June 6th, Limassol, Cyprus.
Synopsis: Cooperative information systems typically involve various entities in a collaborative process within a distributed environment. Blockchain technology offers a mechanism for automating such processes, even when only partial trust exists among participants. The data stored on the blockchain is replicated across all nodes in the network, ensuring accessibility to all participants. While this aspect facilitates traceability, integrity, and persistence, it poses challenges for adopting public blockchains in enterprise settings due to confidentiality issues. In this paper, we present a software tool named Control Access via Key Encryption (CAKE), designed to ensure data confidentiality in scenarios involving public blockchains. After outlining its core components and functionalities, we showcase the application of CAKE in the context of a real-world cyber-security project within the logistics domain.
Paper: https://doi.org/10.1007/978-3-031-61000-4_16
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
OpenID AuthZEN Interop Read Out - AuthorizationDavid Brossard
During Identiverse 2024 and EIC 2024, members of the OpenID AuthZEN WG got together and demoed their authorization endpoints conforming to the AuthZEN API
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
National Security Agency - NSA mobile device best practices
The Ring programming language version 1.7 book - Part 54 of 196
1. Ring Documentation, Release 1.7
y = nY
framewidth = 40
height = 42
nStep = 3 # Used for delay
transparent = true
state = func oGame,oSelf { # Called by engine each frame
oSelf {
nStep--
if nStep = 0
nStep = 3
if frame < 13 # we have 13 frames in animation
frame++ # move to next frame
else
frame=1
ok
ok
}
}
}
}
55.18. Using the Game Engine - Animation and Functions 502
2. Ring Documentation, Release 1.7
55.19 Using the Game Engine - Sprite - Automatic Movement using
Keyboard
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
sprite
{
type = GE_TYPE_PLAYER # Just for our usage
x=400 y=400 width=100 height=100
file = "images/player.png"
transparent = true
Animate=false
Move=true # we can move it using keyboard arrows
Scaled=true
}
} # Start the Events Loop
55.19. Using the Game Engine - Sprite - Automatic Movement using Keyboard 503
3. Ring Documentation, Release 1.7
55.20 Using the Game Engine - Sprite - Keypress event
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
sprite
{
type = GE_TYPE_PLAYER # Just for our usage
x=400 y=400 width=100 height=100
file = "images/player.png"
transparent = true
Animate=false
Move=false # Custom Movement
Scaled=true
keypress = func oGame,oSelf,nKey {
oSelf {
Switch nKey
on KEY_LEFT
x -= 10
on KEY_RIGHT
x += 10
on KEY_UP
y -= 10
on KEY_DOWN
y += 10
off
}
}
}
} # Start the Events Loop
55.21 Using the Game Engine - Sprite - Mouse event
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
sprite
{
type = GE_TYPE_PLAYER # Just for our usage
x=400 y=400 width=100 height=100
file = "images/player.png"
transparent = true
Animate=false
Move=false # Custom Movement
Scaled=true
keypress = func oGame,oSelf,nKey {
oSelf {
55.20. Using the Game Engine - Sprite - Keypress event 504
4. Ring Documentation, Release 1.7
Switch nKey
on KEY_LEFT
x -= 10
on KEY_RIGHT
x += 10
on KEY_UP
y -= 10
on KEY_DOWN
y += 10
off
}
}
mouse = func oGame,oSelf,nType,aMouseList {
if nType = GE_MOUSE_UP
oSelf {
x = aMouseList[GE_MOUSE_X]
y = aMouseList[GE_MOUSE_Y]
}
ok
}
}
} # Start the Events Loop
55.22 Using the Game Engine - Sprite - State event
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
sprite
{
type = GE_TYPE_PLAYER # Just for our usage
x=400 y=400 width=100 height=100
file = "images/player.png"
transparent = true
Animate=false
Move=false # Custom Movement
Scaled=true
keypress = func oGame,oSelf,nKey {
oSelf {
Switch nKey
on KEY_LEFT
x -= 10
on KEY_RIGHT
x += 10
on KEY_UP
y -= 10
on KEY_DOWN
y += 10
off
}
}
mouse = func oGame,oSelf,nType,aMouseList {
55.22. Using the Game Engine - Sprite - State event 505
5. Ring Documentation, Release 1.7
if nType = GE_MOUSE_UP
oSelf {
x = aMouseList[GE_MOUSE_X]
y = aMouseList[GE_MOUSE_Y]
}
ok
}
state = func oGame,oSelf {
oself {
if x < 0 x = 0 ok
if y < 0 y = 0 ok
if x > ogame.width-width
x= ogame.width - width ok
if y > ogame.height-height
y=ogame.height - height ok
}
}
}
} # Start the Events Loop
55.23 Using the Game Engine - Animate - Events
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
animate {
file = "images/fbbird.png"
x = 10
y = 10
framewidth = 20
scaled = true
height = 50
width = 50
nStep = 3
transparent = true
state = func oGame,oSelf {
oSelf {
# Animation
nStep--
if nStep = 0
nStep = 3
if frame < 3
frame++
else
frame=1
ok
ok
55.23. Using the Game Engine - Animate - Events 506
6. Ring Documentation, Release 1.7
# Move Down
y += 3
if y > 550 y=550 ok
}
}
keypress = func ogame,oself,nKey {
oself {
if nkey = key_space
y -= 55
if y<=0 y=0 ok
ok
}
}
mouse = func ogame,oself,nType,aMouseList {
if nType = GE_MOUSE_UP
cFunc = oself.keypress
call cFunc(oGame,oSelf,Key_Space)
ok
}
}
} # Start the Events Loop
Screen Shot:
55.23. Using the Game Engine - Animate - Events 507
7. Ring Documentation, Release 1.7
55.24 Using the Game Engine - Map
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
Map {
blockwidth = 80
blockheight = 80
aMap = [
[0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
55.24. Using the Game Engine - Map 508
8. Ring Documentation, Release 1.7
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
]
aImages = ["images/fbwall.png",
"images/fbwallup.png",
"images/fbwalldown.png"]
state = func oGame,oSelf {
oSelf {
x -= 3
if x < - 2100 x = 0 ok
}
}
}
} # Start the Events Loop
Screen Shot:
55.24. Using the Game Engine - Map 509
9. Ring Documentation, Release 1.7
55.25 Using the Game Engine - Map Events
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
Map {
blockwidth = 80
blockheight = 80
aMap = [
[0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
]
aImages = ["images/fbwall.png",
"images/fbwallup.png",
"images/fbwalldown.png"]
state = func oGame,oSelf {
oSelf {
x -= 3
if x < - 2100 x = 0 ok
}
}
mouse = func ogame,oself,nType,aMouseList {
if nType = GE_MOUSE_UP
oSelf {
mX = aMouseList[GE_MOUSE_X]
mY = aMouseList[GE_MOUSE_Y]
nValue = GetValue(mX,mY)
nRow = GetRow(mX,mY)
nCol = GetCol(mX,mY)
Switch nValue
On 1 aMap[nRow][nCol] = 0
On 2 aMap[nRow][nCol] = 0
On 3 aMap[nRow][nCol] = 0
On 0 aMap[nRow][nCol] = 1
Off
}
ok
}
}
} # Start the Events Loop
55.25. Using the Game Engine - Map Events 510
10. Ring Documentation, Release 1.7
Screen Shot:
55.26 Using the Game Engine - Object and Drawing
We can use the Object keyword (defined by the game engine) to create objects from the GameObject class.
Example:
Load "gameengine.ring" # Give control to the game engine
func main # Called by the Game Engine
oGame = New Game # Create the Game Object
{
title = "My First Game"
Object {
x = 0 y=300 width = 200 height=200
draw = func oGame,oSelf {
oSelf {
for t = 1 to 210
gl_draw_circle(x,y,t,
gl_map_rgb(t*random(255),
t*2,t*3),1)
55.26. Using the Game Engine - Object and Drawing 511