Let Cleverbot do all the Tinder messaging

This may be one of my most interesting weekend projects ever… I wrote a Python program that lets Cleverbot do all the Tinder messaging for me. Why? I’m too busy swiping on Tinder (which probably should also be automated, openCV maybe?), therefore don’t have time to chat with my matches. Besides, Cleverbot is my best friend, so why not have it talk to the ladies for me? What does the script do? [Read More]

IoT data visualization: Listening on both TCP and UDP

I want several Raspberry Pis to send some data to my Unity game. Why? Because I want to do some 3D real-time sensor data visualization in Unity, possibly in VR. Those data are collected from sensors, including a button, a magnetic switch, an ultrasonic ranger, and an temperature sensor. I started off by writing a TCP server, that invokes a callback function whenever data is received and parsed. Since Unity API is not thread-safe, I had to use a thread-safe queue to queue up the data, which is only dequeued when the game updates. [Read More]

GTAV: Running mods on the web front-end

Traditional mods If you ever used script mods, you probably know how they work. You download them from the internet, drop into some directory, and they get loaded when the game starts. Those in a sense are back-end scripts. They either override or create new game behaviors. Second-screen experiences Some recent games are shipped with second-screen experiences, aka companion apps. Fallout 4 has its Pip-Boy app, Dying Light also has its companion app. [Read More]

I wrote a fishing mod for GTA5

You can play golf, darts, tennis in GTA5, but what if you say you really want to fish? Well now you can! Download Fishing Mod from GTA5-Mods. Yes it lets you fish Yes, a fishing mod. It’s currently WIP, but it looks pretty good already. I had to write all the classes in one .cs file - I know it’s not the best practice, but Script Hook V .NET automatically compiles it and I don’t have to distribute a pre-compiled . [Read More]

[XNA / MonoGame] A simple Sprite class to draw spritesheet animations

I guess it’s not exactly animation - it’s more like GIF. Not sure why I’ve never made one before, but here it is. Feel free to copy and paste. using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace FA2Engine.Graphics { public class SpriteAnimation { #region Fields Texture2D spriteSheet; Point sheetDim; Point frameSize; int frameInterval; Point currentFrame = new Point(0, 0); double currentTime; Texture2D frameTexture; #endregion #region Properties /// <summary> /// Gets the size of one frame in the spritesheet. [Read More]

Why can't I hold all these frames

Turning off the Vertical Sync and uncapping the framerate, then look at the glorious framerate! Do this in Game1’s constructor to disable VSync and FixedTimeStep. public Game1() : base() { Content.RootDirectory = "Content"; graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferHeight = 720; graphics.SynchronizeWithVerticalRetrace = false; this.IsFixedTimeStep = false; } but it will sometimes become a disaster… Of course, you already know that you cannot have framerate dependent calculations during Update() calls. [Read More]