Posts

Showing posts from July, 2021

Connecting to the Open Web DB from Processing 3

Image
  // This scatch helps you to understand the basics of connecting to the Marker Soft Site.  //Copy and paste. Don't forget to change the access key to yours! //The registration is free. You may use three keys to connect your devices to this network //This is the link  https://markerbank.com/cab.php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// String txOut="";  int dl=100; void setup(){      size(400,300);   background(255,255,0);   txOut=txMCWeb();   textSize(24);   fill(0);   text(txOut,width/2-(textWidth(txOut)/2),120);       } void draw(){   background(255,255,0);   if (dl<0){   txOut=txMCWeb();   dl=100;   }   textSize(24);   fill(0);   text(txOut,width/2-(textWidth(txOut)/2),120);      String txOut2="";   fill(255,0,0);   textSize(18);   dl--; ...

Connecting Wemos (ESP8266) to MB 4 Bot

Image
You need a WEMOS card or ESP32 with Arduino Board and Arduino IDE to load scetches for this example. 1. Download Arduino IDE from here - https://arduino.cc 2. Open Arduino IDE properties and in the new window insert this link: http://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional link for Boards' Manager section 3. Then open the Tools menu and choose Board Manager in the Board submenu. 4. Type WEMOS in the search string of the Board Manager Window and install ESP8266 and ESP8266 Community drivers. 5. The Last step is going back to Tools Menu and selecting your board in the submenu Boards. In my case, it was LOLIN (WEMOS R1 D2) This is a code example you may copy and paste for your WEMOS. 

Draw Dollar effect

Image
The dollar sign was created by my online Pixel Art editor. It is not a picture. It is a code suitable for P5 (processing 5) GUI. This example has been created to show the way of creating graphics inside a web application, using only code and no graphic files. The first 8-bit games were created in the times when there were no graphic editors. It is not impossible to do the same now. I used a cycle "for" to place multiple signs in the window, and the math function Cosine to produce scale in and out effect in this example. Some functions are used only with the p5js library.  Here is the code for P5JS Editor. Be free to copy and paste and use in your own P5JS application. // The Code :   let stepX; let stepY; let sW=80; function setup() {   createCanvas(400, 400);     stepX=round(width/sW);   stepY=round(height/sW); } function draw() {   background(220);     for (var i2=0;i2<stepY;i2++){   let y=sW*i2+sW/2;   for (var ...

How I fixed BWAPP

Image
 First off all two words about this web application. BWAPP is the most insecure application ever. Sounds silly and for most users has no sense at all. This app was created to train programmists and administration. It can spot different application issues which are common for programmers beginners. One day my friend decided to make a ZOOM festival for young students. We created some legends to make tasks interesting. I wrote a small program for moderators and participants to understand and explain the progress and log users' actions, who may attack our fake server inside a virtual machine. Everything was ok before I upgrade PHP. New PHP appeared more secure than previous, BWAPP stoped work secure issues were blocked. That was a problem, I don't want to install the old PHP version, so I started checking. Finally, I found the issue in the PDO class connection, and rewrite the main BWAPP class.

Forward, Backward, Left and Right

Image
 This is a topic about realizing the movement function inside my pseudo-class for the Java Script application. Here it is: GameObject = function() {       this.x = 0;     this.y = 0;     this.cx = 0;     this.cy = 0;     this.w=20;     this.h=20;     this.pic='';       this.idx=0;       this.pics=[];       this.go=0;       this.right=[];     this.left=[];     this.up=[];     this.down=[];     this.frame=0;     this.delay=0;     this.sdelay=5;     this.ofx =0;     this.ofy =0;     this.go=0;     this.col=0;        this.IniArr =function(){         this.w=this.left[0].width;     this.h=this.left[0].height;                    }...

Pixel Art Editor. What is this?

Image
This editor was created for my programming courses Java Script and Java for beginners.  The aim is to bring a clear example of creating graphics for the game by using a built-in GUI. A student can draw art by the grid, use different colors. Then he may get the code of his work and insert it into the user function of his application.  The application may be complicated. It is possible to use frames. In this example, I use two functions (two frames) of the helicopter. https://editor.p5js.org/kirzh2020/present/MXWJmQWhC The link to the editor is here -> https://markerbank.com/games/PAEdit/