Turtle Graphics 🐢 implementation for Android Platform with Code Editor, Preview Screen and packages

Overview

Turtle Graphics

Download

Get it on Google Play Amazon App Store Samsung Galaxy Store Huawei AppGallery

Turtle is an Android Application inspired from the original Turtle Graphics and Logo, Logo is an educational programming language designed in 1967 by Computer scientists Wally Feurzeig, Seymour Papert, and Cynthia Solomon and it known for its use of turtle graphics, this project has a simple tree walking interpreted language called Lilo (Inspired from Logo too :D), with declarations statements, control flow, collections, and instructions for control the turtle in 2D Space which is our case a custom Android Canvas View and also control colors

Screenshots

Features

  • Free And open source with no ads.
  • Full Text Editor that support auto complete, snippets, highlighter for Lilo.
  • Clear diagnostics messages with line number and column position.
  • Supports Lexer, Parser errors and Runtime exceptions
  • Preview custom view with turtle that show the current direction.
  • Full documentation view that teach you how to write your script.
  • Save and Update your current script into packages with name.

Declarations

  • Let Declaration to declare variables
let c = BLACK
  • Function Declaration to declare function with 0 or more parameters
fun f1 (n) {
   return n * 2
}

fun f2 {}

fun f3 (n) = n * 2

fun f4 = 1000

Control flow

  • If statement to execute block if the condition is true
if condition {}
elif condition2 {}
elif condition3 {}
else {}
  • Repeat statement to execute block n times
repeat n {

}
  • While statement to execute block while the condition is true
while condition {

}
  • Speed statement, take time in ms to wait before each next instruction
speed 100
  • Sleep statement, take time in ms to wait before the next instruction
sleep 100
  • Show statement, to show turtle pointer
show
  • Hide statement, to hide turtle pointer
hide
  • Stop statement, to stop the current execution
stop

Collections

  • List to collect values
let colors = [RED, BLUE, WHITE]
  • Access list element by index
color colors[0]
  • Update list element
colors[0] = YELLOW

Movement instructions

  • Rotate used to add value to the current turtle pointer degree
rotate 90
  • Forward used to move forward n space
forward 90
  • Backward used to rotate and move backward n space
backward 90
  • Right used to rotate and move right n space
right 90
  • Left used to rotate and move Left n space
left 90

Drawing Instructions

  • Circle used to draw circle around the current position with radius r
circle 50
  • Cube used to draw Cube around the current position with value v
cube 50

Coloring instructions

  • Color Instruction to change the current color
color BLUE

License

MIT License

Copyright (c) 2022 Amr Hesham

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
A file manager,apk editor....
A file manager,apk editor....

A file manager,apk editor....

A truly hackable editor: simple, lightweight, understandable
A truly hackable editor: simple, lightweight, understandable

kanvas A very simple editor built in Kotlin and intended to be extended and hacked. It is very simple to customize it to handle a language defined usi

JBytedit - Java bytecode editor
JBytedit - Java bytecode editor

JBytedit - Java bytecode editor JBytedit was a free, fully featured graphical Java Bytecode editor made by (Matthew Dupraz). This is an archival copy

Instagram-like story editor in compose
Instagram-like story editor in compose

Story Editor Instagram-like story editor to add content to your pictures. Note: this is still a WIP Setup First, add jitpack in your build.gradle at t

Android cutout screen support Android P. Android O support huawei, xiaomi, oppo and vivo.

CutoutScreenSupport Android cutout screen support Android P. Android O support huawei, xiaomi, oppo and vivo. Usage whether the mobile phone is cutout

Android samples built using Jetpack Window Manager for foldable and dual-screen devices like Microsoft Surface Duo.

Jetpack Window Manager samples for dual-screen and foldable devices like Microsoft Surface Duo Android app samples that use Jetpack Window Manager to

Happy-Birthday - Design and implement a single screen app that displays information
Happy-Birthday - Design and implement a single screen app that displays information

Happy Birthday Android App | Android Basics in Kotlin Course Solution code for t

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Ionic Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a sin

Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private EOSIO blockchains

Tonomy ID is the cross-platform mobile wallet (Android and iOS) for public and private EOSIO blockchains. This application allows you to sign transactions on the block chain, share your DID and Verifiable Credentials containing your identity with others in a consensual way and log into web2 and web3 applications. If you lose your phone several mechanisms exist to allow you to recover your account without trusting anyone with custody of your private keys.

Comments
  • Function return

    Function return

    Describe the bug Functions don't properly resume from where called. Causes issues with recursive functions, like fractal trees

    To Reproduce Simple fractal tree: move 375, 500 let colors =[RED, BLUE, GREEN, YELLOW] let angle =30 rotate 90 fun y(level){ if(level >0){ color colors[level %4] forward level10 rotate 360-angle y(level-1) rotate 2angle y(level - 1) rotate 360-angle backward level *10 } } y(10)

    Expected behavior Should make a fractal tree, not a simple spiral.

    Screenshots If applicable, add screenshots to help explain your problem.

    Smartphone (please complete the following information):

    • Device: moto pure
    • OS: Android 10
    • Version [e.g. 22]

    Additional context Add any other context about the problem here.

    bug 
    opened by kseiders 2
Releases(1.4.3)
  • 1.4.3(Oct 25, 2022)

  • 1.4.2(Oct 21, 2022)

  • 1.4.1(Oct 11, 2022)

    • Add support for execution seek bar
    • Add support for pause and consume menu icons
    • hide consume menu icon when execution is finished
    • Improve parse logical, factor and term expression
    • Add Vibrate circle to the preload examples
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Sep 22, 2022)

    • Fix Issue #1
    • Fix the Number of parameters when parsing function declaration
    • Fix Control flow execution Scope
    • Fix Recursion functions
    • Add support for show keyword
    • Add support for hide keyword

    https://user-images.githubusercontent.com/23631699/191815136-62942f10-05e1-4769-bd96-96e5c9f167b5.mp4

    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Sep 21, 2022)

    • Change the turtle pointer design to be a small turtle on the screen
    • Add support for stop and re-execute actions
    • Add support for speed keyword
    • Add support for sleep keyword
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Aug 30, 2022)

  • 1.2.0(Jul 12, 2022)

  • 1.1.0(Jul 8, 2022)

    New Features and improvments

    • Increase the auto complete item width.
    • Add support for array, with index operator.
    • Add support for else if and else branches.
    • Add support for special assignments *=, -=, *=, /=, %=.
    • Add support for reminder operator %
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jul 6, 2022)

Owner
Amr Hesham
Software Engineer interested in Android Development and PL Design
Amr Hesham
Android-splash-screen-demo - Sample application to demo the various features provided in android-splash-screen

Android Splash screen API demo This is a sample application used to demonstrate the various features provided in android-splash-screen. More details c

Sridhar 1 Jan 3, 2022
Linux GUI for Kuri's userspace tablet drivers. Supports non-wacom (XP-Pen, Huion, Gaomon) graphics tablets and pen displays

Kuri's Userspace tablet driver utility (GUI) This is a new GUI implementation for the userland driver I've written here: https://github.com/kurikaesu/

Aren Villanueva 12 Jan 4, 2023
Parsing and re-packing Android boot.img/vbmeta.img, supporting Android 12(preview)

Android_boot_image_editor A tool for reverse engineering Android ROM images. Getting Started install required packages Mac: brew install lz4 xz dtc Li

null 615 Dec 30, 2022
This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shadows etc...

Android L preview example Description This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shad

Saul Molinero 165 Nov 10, 2022
🌄 Photo editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and PhotoEditor (Android)

React Native Photo Editor (RNPE) ?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and Ph

Baron Ha. 242 Dec 28, 2022
Multi Roots TreeView implementation for Android Platform with a lot of options and customization

TreeView Multi Roots TreeView implementation for Android Platform with a lot of options and customization Demo Features: - No Custom Views. - Easy use

Amr Hesham 74 May 10, 2022
An advanced DEX editor for Android.

An advanced DEX editor for Android.

Mike Anderson 75 Jan 3, 2023
Android Kotlin Fundamentals: 02.3 ConstraintLayout using the Layout Editor

ColorMyViews Android Kotlin Bootcamp from Google Developer website Android Kotli

Marcelo Viana 0 Feb 13, 2022
A capable — pixel art editor for Android.

A capable — pixel art editor for Android.

thebluepandabear 128 Dec 31, 2022
APK Explorer & Editor, an open-source tool to explore the contents of an installed APK

APK Explorer & Editor, an open-source tool to explore the contents of an installed APK, is strictly made with an aim to inspect an installed APK file.

APK Explorer & Editor 270 Dec 25, 2022