Post History

Saturday, July 20, 2013

C++ Challenge: Visual Studio C++, SDL, and Games

I think I've got a hold of this programming thing; the logic, thought process, the intense planning. So that is why I'll be moving on to a more difficult language to try and expand my horizons. That's right, the infamous beginner code killer - C++.

I learned much more about programs and games and that you don't always have to build everything from the ground up. There are many pieces of software out there that will give you the tools to build what you want and the best part, a lot of them are free. Not just free to use, but also free to commercially release. Here's a list of many game engines(payed, and free) that could get you started now. Game Engines

But how will I start?

I've begun to take lessons on learncpp.com and found a series of tutorials from "Lazy Foo' Productions"  on how to use SDL to create graphics for applications.

The parameters of the challenge are unclear so far but I will try to come back with a basic game made using Visual Studio and SDL.

Later.

Thursday, July 18, 2013

Python GUI (Graphics User Interface) for Prime Finder Program

    I've wondered, how the heck do I get something on screen!? Pretty much every program I've worked with used text in the Python Shell or command line. And so, I found this -- Python GUI

    There are many Python GUIs that will help you get your program up and running in a window, and I chose Tkinter.

Why?

Well, it comes with Python and it seemed like the simplest one to start out learning.

So here is the code for making my Prime Finder function work in a window:


And the result should look something like this:


Here is the copy pasta:

import sys
from tkinter import *

def Prime_finder():
    mtext = ment.get()
    if mtext < 2:
        return False
    else:
        count = 0
        for i in range(1, mtext + 1):
            if mtext % i == 0:
                count += 1
        if count == 2:
            l = Label(mGui, text="True").pack()
        else:
            l = Label(mGui, text="False").pack()
    return

mGui = Tk()
ment = IntVar()

mGui.geometry("450x500+400+200")
mGui.title("$$$$Prime Number Finder$$$$")

mlabel = Label(mGui, text="Enter Your Prime Number").pack()

mbutton = Button(mGui, text = "Check", command = Prime_finder).pack()

mEntry = Entry(mGui, textvariable=ment).pack()


I learned this from a youtube user: TheReimber

Here is the video that made my little program possible. Enjoy!