Node JS and Express Routing Tutorial

Node JS and Express Routing Tutorial Lets set up our Express app with some different routes now. Lets make a basic company or personal web site structure. With an about,contact,links and portfolio pages. First lets make the files with Node file system module. Then lets append some basic HTML into the files. Now lets define the routes we want. Now we have a web site up with multiple routes.

Node JS Tutorial | HTTP Server Basic HTML Templates

Node JS Tutorial | HTTP Server Basic HTML Templates REPL Here Today we are adding a basic HTML template to our Node JS HTTP Server project. We are going to first require the file system module within Node. Lets create a .html file named index.html Now append some HTML Then we open the index.html file and pass that as an argument into the server response to render. https://stackoverflow.com/questions/4720343/loading-basic-html-in-node-js As you can see this is going to get a bit unwieldy. In the next Tutorial lets look into an easier way…

Node JS Tutorial | HTTP Server

Node JS Tutorial | HTTP Server REPL HERE First lets install Node in our environment. I’m using A Debian distro. Next lets use the HTTP Module We now have a running HTTP server. Well, that’s it were done. Super simple HTTP server in Node. We should see a basic HTML page being served with “HELLO WORLD” as output. Check out the next tutorial and we will template an HTML page for our server to serve.

MI PYTHON | Phaser JS Tutorial Two | Extending Classes and Sprite Movement

Overview: This lesson focuses on sprite movement within Phaser. The Phaser game engine gives us different choices for movement styles. We have keyboard / joystick and mouse follow type movement today. We will focus on these two movement methods below. Before we do this we will also start organizing our game objects into a class based structure. This will help us in scaling up the game down the road. Extending Phaser Classes: In order to better keep track of our game objects. We are going to implement an Object Oriented…

MI PYTHON Phaser JS Tutorial 1 | Instance The Screen Canvas

OVER VIEW: Today we will be learning Phaser. This first tutorial will allow us to instance a canvas object in our HTML. Along with a text object and a Sprite. Lets create a repl at repl.it . Luckily Repl.it has a Phaser JS template all ready to go for us. https://replit.com/@MANDREWS85/phsertutorial1#index.html You will notice 3 files and a folder created. The index.html file is our loading page for our Phaser app. The style.css file styles our HTML page and Phaser Canvas. Next our script.js file will hold our Phaser game…

Mark Tron 2000 MK1 | Bread Board CPUless Sequencing Computer

Mark Tron 2000 MK1 Bread Board CPUless Sequencing Computer. Started a Ben Eater style Bread Board Computer build a while ago. Dusted off the Mark Tron 2000 Mk1 today. It is a CPUless, micro controller less 8 bit X2 sequencing computer. My first use case was for audio control voltage signals with a step up converter to 12v. Could also be used to sequence a LED array, etc.. The architecture is, from bottom to top: logic gate cheat board, 8bit sequencer section 74hct165n, x2 74HC595N for 16 bit total RAM…

MI Python TXT RPG Adventure Tutorial 4 | More Inventory and the Store

First a little house cleaning. We need to update our Players inventory drop function. Let’s add that in now. Add this to the Player class in the Player.py file. We are updating our nested function within our inventory method. We are doing the same thing we did with items. We just change the Player’s / Room’s object list to remove / append from the weapon and armors lists respectively. Then, the Player can’t “die” in game. Without risk their can be no reward. So, lets add a que_free method to…

MI Python Text Adventure RPG Tutorial 3 |Battle System and Inventory Management

REPL HERE: https://repl.it/@MANDREWS85/pythontextadventuretutorial3#main.py PLAY IT: https://pythontextadventuretutorial3.mandrews85.repl.run Lets start writing out our battle method in our Game class today. We are passing in an attacker and a defender as arguments for our text adventure RPG battle method in Python. Lets explore nested functions while we are at it as well. I wanted to have nested functions in my battle method to better organize. There is an initiative function, and a to_hit function. The initiative function determines who attacks first. Then the to hit function resolves the to hit phase and damage.…

MI Python Text Adventure RPG Tutorial 2 |Add Character and Item Objects

REPL HERE: https://pythontextadventuretutorial2.mandrews85.repl.run Lets refactor our code a bit here. Before our main.py Python file becomes too cumbersome and convoluted. We are going to split all our classes into separate files or “Modules”. We will have one file for the Player, Character, Room and Item. Then import them into our Game class in the main.py Python file. While we are at it we will add some more attributes to our objects. Player and Character objects will have hit points, strength, dexterity, damage, items list, armors list, and weapons list attributes.…