Thomas  Granger

Thomas Granger

1686119515

Game Development with LÖVE 2D and Lua – Full Course

Game Development with LÖVE 2D and Lua – Full Course

Learn how to create games using LÖVE 2D and Lua. LÖVE is a framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android and iOS. In this course, you will first learn how to program in Lua. Then you will learn how to use Love2D with Lua to develop amazing games.

⭐️ Course Contents ⭐️
-- LUA BASICS --
⌨️ (0:00:00) Intro to Lua
⌨️ (0:02:28) Installing Lua
⌨️ (0:09:51) Running Lua (VSCode)
⌨️ (0:11:03) Printing and Comments
⌨️ (0:19:42) Variables & Data Types
⌨️ (0:29:51) Strings
⌨️ (0:36:59) Math
⌨️ (0:46:22) If Statements
⌨️ (0:58:49) Loops
⌨️ (1:03:37) User Input
⌨️ (1:05:34) Tables
⌨️ (1:23:27) Functions
⌨️ (1:31:44) Working with Files
⌨️ (1:39:12) Custom Modules
⌨️ (1:43:10) OOP
-- LOVE 2D BASICS --
⌨️ (1:56:42) Setup and LUD basics
⌨️ (2:06:35) The Config File
⌨️ (2:25:13) Drawing & Moving Shapes
⌨️ (2:45:57) Keyboard Input
⌨️ (2:55:36) Working with Sprites
-- CREATING SAVE THE BALL GAME --
⌨️ (3:21:44) Game Setup
⌨️ (3:38:03) Creating the Enemy
⌨️ (4:09:02) The Menu Screen
⌨️ (4:51:11) Adding a Point System
⌨️ (5:11:44) Game Over Screen
-- CREATING THE ASTEROIDS GAME --
⌨️ (5:31:24) Game Setup
⌨️ (5:40:02) The Player
⌨️ (6:10:32) The Thruster
⌨️ (6:31:59) The Game State
⌨️ (6:38:47) Game Text
⌨️ (7:02:40) Asteroids
⌨️ (7:41:32) Lasers
⌨️ (8:03:46) Laser Collision Detection
⌨️ (8:29:10) Player Collision Detection
⌨️ (8:41:17) Player Lives
⌨️ (8:57:54) The Menu
⌨️ (9:30:51) Installing & Running LuaRocks
⌨️ (9:42:18) The Score System
⌨️ (10:03:12) Game Over
⌨️ (10:11:56) Invincible PLayer & Infinite Levels
⌨️ (10:31:07) Game Reset & High Score
⌨️ (10:44:38) BGM & SFX

⭐️ Resources and Code ⭐️
🔗 Lua: https://lua.org 
🔗 Love2D: https://love2d.org 
🔗 LuaRocks: https://luarocks.org 
🔗 Running Boy Sprites: https://github.com/WeebNetsu/YouTube-Projects/tree/main/Lua/Love2D/Sprites%20Tutorial 
🔗 Save the Ball Source Code: https://github.com/WeebNetsu/YouTube-Projects/tree/main/Lua/Love2D/Save%20The%20Ball%20Game 
🔗 Asteroids Game Source Code: https://github.com/WeebNetsu/YouTube-Projects/tree/main/Lua/Love2D/Asteroids%20Game 
🔗 Sound Effects & BGM: https://github.com/WeebNetsu/YouTube-Projects/tree/main/Lua/Love2D/Asteroids%20Game/15.%20Adding%20BGM%20and%20SFX/src/sounds 
🔗 Creator's GitHub: https://github.com/WeebNetsu/

#gamedev #gamedevelopment #lua 

Game Development with LÖVE 2D and Lua – Full Course
Donato  Roob

Donato Roob

1614783840

I accidentally Wrote a Lua Game Engine

Lately I’ve been working on SIMple Physics, a set of educational physics simulators meant to help teach and learn physics intuitively without expensive lab equipment or in person classes. Each simulator allows users to import and export scenes and potentially add some more advanced functionality through Lua.

Until recently, the Lua scripting was fairly limited. It could be used to add/remove objects and change variables such as but crucially it could not affect objects once they were created.gravity, and there was also an update() function which ran every frame.

-- this example instantiates a multicolored grid of circles
for row = 1,HEIGHT do
    for col = 1,WIDTH do
        color = {
            r = (row * col) / (WIDTH * HEIGHT) * 255,
            g = col / WIDTH * 255,
            b = row / HEIGHT * 255
        }
        add_shape{
            shape = "circle", 
            x = col * OFFSET + START_X_OFFSET, 
            y = row * OFFSET, 
            r = RAD, 
            mass = 1, 
            color = color
        }
    end
end

Crucially, there was no way to affect individual objects directly once they had been instantiated. By now, you can probably see where this is going.

I’ve been in contact with my physics professor about this project, and he told me that he would like for students to be able to code the equations we learn in class. For example, basic position integration through Euler’s method or the collision equations. With that, I decided to implement a way for the Lua interface to be able to update individual objects.

#lua #programming #rust #physics

I accidentally Wrote a Lua Game Engine
Anda Lacacima

Anda Lacacima

1605079781

Implementing a sliding log rate limiter with Redis and Golang

Introduction

I work on an application that communicates with multiple payment providers. Each provider has their own rate limit for us. We did not want to exhaust our rate limit with any of the payment providers, while also making the most of what limits we are allowed. We could afford to delay requests to the payment provider for a small amount of time, as bulk payments are processed offline as async jobs.

During an average billing day, we run a large number of payments in a short span of time. Are we breaching our payment processors’ rate limits? Should we do something about that? I’ve heard about something called a rate limiter.

What is a rate limiter? A rate limiter caps the number of requests a sender can issue in a specific time window. It then blocks requests once the limit is reached.

Usually the rate limiter component is at the receiving system, but since we depend so heavily on third party processors, it also makes sense to accommodate the provider’s rate limit and control outbound requests so as to not get too many — or optimistically, even a single

We started designing the rate limiter with these requirements in mind:

  1. It should limit the number of requests in a given time period to a particular payment provider
  2. Since our systems run on a cluster (as opposed to a single server), the rate limit should apply on the sum total of requests made, and not per application process.
  3. Our late limiting logic should be atomic, and not fail even if multiple requests land on our systems concurrently

#rate-limiting #golang #lua #redis

Implementing a sliding log rate limiter with Redis and Golang
Houston  Sipes

Houston Sipes

1597672800

Detect Ransomware With Hyperionix

Ransomware has been plaguing the world for years. The dark web has a whole industry dedicated to creating on-demand ransomware variants. There are actually programs you can buy that can help you generate a brand new ransomware that won’t be detected by existing anti-virus solutions in a few clicks. This is why most ransomware prevention solutions focus on catching the behavior rather than the signature. Instead of looking for known ransomware variants, most successful solutions look for specific chain of operations. An example of this behavior chain is a user downloading an executable in a browser, the user starts the executable which immediately creates an encryption key, opens many files and rewrites them.

In this blog post we will show you how easy it is to use Hyperionix to detect such a behavior, block it and even save the encryption key so any missed files can be easily decrypted. Hyperionix makes it easy to monitor and modify low-level system behavior. Hyperionix gives you an agent and a central online management console. You can use it to deploy probes written in Lua that can monitor and modify the behavior of systems on your network. In this case, we will use it to monitor cryptographic key usage and file operations. Hyperionix will terminate processes it determines to be ransomware based on their behavior. It will also send events to Splunk notifying you of this detection. As part of the event we will include the decryption key that will allow us to unlock any files encrypted by the ransomware.

For this demo we will use the gandcrab ransomware. It is recommended that you go over the tutorial before trying to run this demo yourself.

We will be looking for this specific chain of events to detect ransomware behavior:

  1. A file is created with the “Zone.Identifier” alternate data stream. All major modern browsers add this stream to downloaded files to let Windows know the file didn’t originate on the system.
  2. The file was moved, renamed or copied.
  3. A process was created with the downloaded file as the backing file.
  4. This process exports a cryptographic key. Ransomware does that so they can send the key to their servers and give it back to you for a ransom.

It is possible to detect the actual file encryption too, but we will stop at detection of the cryptographic key for brevity.

Detect File Download

To detect file operations we hook all the relevant functions in ntdll.dll. Here we only need the NtCreateFile function which is called for creating files. This function will also be called when creating an alternate data stream. To catch the file download we can filter for creations of “Zone.Identifier” alternate streams and report them.

The resulting code defines a hook probe that installs onExit handler to be called when the probe detects an exit from a call to NtCreateFile. The interesting logic part goes into the onExit handler, where it checks the filename to see if it’s ADS, and then if it’s “Zone.Identifier”. Finally it sends an event to Splunk with the details.

#lua #cybersecurity #hacking #endpoint-security #ransomware

Detect Ransomware With Hyperionix

Rodrigo Senra - Jupyter Notebooks

Nosso convidado de hoje é diretor técnico na Work & Co, PhD em Ciências da Computação, já contribuiu com inúmeros projetos open source em Python, ajudou a fundar a Associação Python Brasil e já foi premiado com o Prêmio Dorneles Tremea por contribuições para a comunidade Python Brasil.

#alexandre oliva #anaconda #apache zeppelin #associação python brasil #azure notebooks #beakerx #binder #c++ #closure #colaboratory #donald knuth #fernando pérez #fortran #graphql #guido van rossum #ipython #java #javascript #json #jupyter kenels #jupyter notebooks #jupyterhub #jupyterlab #latex #lisp #literate programming #lua #matlab #perl #cinerdia #prêmio dorneles tremea #python #r #rodrigo senra #scala #spark notebook #tcl #typescript #zope

Rodrigo Senra - Jupyter Notebooks