Posts

My Vocabulary App Privacy Policy

Privacy Policy Viktor Pukman built the My vocabulary app as a Commercial app. This SERVICE is provided by Viktor Pukman and is intended for use as is. This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service. If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy. The terms used in this Privacy Policy have the same meanings as in...

JavaScript vs. CoffeeScript for...in and for...of loops

I write in CofeeScript and new JavaScript (ES6) as well. I found myself stuck every time when I need to write a simple iteration throught an array or object. Why? Well, probably because the definition is totally opposite in these languages. Here are notes and code examples to clear it up:   JavaScript (ES6) The for–in loop is for looping over object properties.  The for–of loop is for looping over data—like the values in an array . From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of const array1 = ['a', 'b', 'c']; for (const element of array1) { console.log(element); } // expected output: "a" // expected output: "b" // expected output: "c" From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in const object = { a: 1, b: 2, c: 3 }; for (const property in object) { console.log(`${property}: ${object[property]}`); } // expected output: // "...

Peggle game in Godot 3 > Tutorial 02 - Rotate cannon by mouse move

Image
In this part, we will create a cannon and make it react to mouse movement. The behavior will be programmed in the cannon script. There are many ways to implement rotating by mouse logic and we will cover the most essential of them.  First, let's create a new 2d scene and call it Cannon . Attach a script to it, call it canon.gd Now add a Sprite and assign this texture to it The whole texture size is 128x128 but the round base size is 120 only. To make it rotating smoothly set Y offset to 4 Now spawn cannon scene to Game main scene Then set the cannon position to x: 512 and y: 80. Run the game. You should get this result Great! Now let's write the script and make it interactive! This is an important moment that the cannon's muzzle looks down (this is equal to Vector2.DOWN ). The programmed behavior depends on this and the program be a little different for the other directions.  Basically, all we need here is a couple of trigonometric functions .  Trigonometric funct...

Peggle game in Godot 3 > Tutorial 01 - Create a new project

Image
Hello, everyone! Peggle is an awesome game. It looks simple but it's so engaging and entertaining. If you have never played it, I strongly recommend trying it. You will like it. Also, there is a new version called Peggle Blast for mobile platforms, but I played the old PC version and will base this tutorial on that experience.  The main goal is to implement the core mechanics that the original Peggle game has.  In this tutorial series, I will reveal the creating process and hope it will be interesting for you. Let's call our clone version of the game  Pegball . Sounds cool, isn't it? Ok, let's start. As you may guess already,  we will use Godot Engine . It's free, open-source, and has many cool features. If you don't have it, just download it. The current version of the engine is 3.2.  Start Godot and create a new project.  For the project name let's go with  Pegball Tutorial :  First, Go to Project -> Project Settings -> Display -> W...