Tuesday, August 16, 2011

SDL to SFML

After testing the lonespace demo on more and more hardware I decided to move to a different API. I was using SDL and it seemed great, but I think mainly due to syncing issues, I would get these hiccups randomly on certain machines. This maybe could have been something with my code but also I was looking for a more c++ oriented solution, so I searched and found SFML. So far its great and I am re-writing to fit the API style and less pure C oriented style I had adopted initially.

Thursday, June 16, 2011

Gamedev Feedback

So I posted a link on reddit of some game footage of lonespace. I got some nice info from the people there and have already implemented the correct parallax scrolling after reading it. This was a great exercise in raw feedback and the community over there seems nice and willing enough to give useful comments. I am working to get a more polished version ready now, but I think joining online communities centered around game development is going to help me get this game fine-tuned.

Monday, June 6, 2011

Been Busy

I have been busy with school finals and also working on video games.  My first attempt is located here: UnColor. This was something I did over the course of 3 days before finals. Since then I have moved into 2d shooter and tiling engines for sprites, etc... Here is my latest attempt at making a video game lonespace.com . This is a 2d shooter type video game. More info when I have more working.

Tuesday, March 8, 2011

Web Portfolio

I updated my portfolio website with a current profile and an overview of the work I've done over the years. I will be graduating in the summer of 2012 and decided it's never too early to get a jump on presenting myself to the job market. Here is the new site, my portfolio .

Sunday, February 13, 2011

Java Cards

I was just messing around with Java and made a small GUI to push some cards around on the screen. Here is the source for the whole thing. card_test.zip I was mainly testing out the JLabels on a layered layout type scenario. Next I'll be working on a full fledged Solitaire app, but this is just messing around on the screen, more or less a HELLO WORLD with cards.


import javax.swing.*;
import java.awt.*;
import java.awt.event.*;


/**
 *
 * @author nick
 */
public class NewGui extends JFrame implements MouseListener , MouseMotionListener {

  
    private JLabel[] card = new JLabel[52] ; // Deck of Cards
    private int saveX, saveY,r_card; // temp save vars
    private boolean card_down = false; // for state
    private String[] card_list = new String[52];

    NewGui(){


        this.setTitle("Card Test");
        getLayeredPane().setLayout(null);
        for (int i = 0; i< 52; i++){

            // load the image
            Image image =Toolkit.getDefaultToolkit().getImage("./images/cards/" + (i + 1) + ".png");
            ImageIcon imageIcon = new ImageIcon(image);
            // Create our card
            card[i] = new JLabel(imageIcon);
            card[i].setBounds(0, 0, 80, 123);
            card[i].setOpaque(true);
            card[i].setBorder( BorderFactory.createLineBorder(Color.LIGHT_GRAY));
            // offset it by 1 pixel
            card[i].setLocation(0 + (i),0 + (i));
            // add it to the next layer
            getLayeredPane().add(card[i],i);

        }
        // for actions
        addMouseListener(this);
        addMouseMotionListener(this);

    };


    public void mouseDragged(MouseEvent e) {
        if (card_down){
            for (int j = 0; j < 7 ; j++){
                card[(r_card + j)%52].setLocation(e.getX() - 40 , e.getY() - 61 + (j*29));
                 getLayeredPane().moveToFront(card[(r_card + j)%52]);
            }
        }
    }

    public void mousePressed(MouseEvent e) {
        card_down = true;
        // grab a random card
        r_card = (int)(52.0 * Math.random());
    }
    public void mouseReleased(MouseEvent e) {
        card_down = false;
    }

    public void mouseMoved   (MouseEvent e) {}  // ignore these events
    public void mouseClicked (MouseEvent e) {}
    public void mouseEntered (MouseEvent e) {}
    public void mouseExited  (MouseEvent e) {}

    public static void main(String[] args) {
        // open a single frame and minimal setup
        NewGui frame = new NewGui();
        frame.setSize(800,600);
        frame.setLocation (100,100);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}

Saturday, January 22, 2011

The Social Network

I watched The Social Network last night and it got me thinking that I needed to get more digital content out on the net. So I started my own blog to talk about tech and computers and will start it off with a little about myself as far as computers and technology goes. I have been programming computers on and off since I was 8 years old on a Commodore 64. Since then my interest in computers has continued and I have professionally been developing business software since the mid 90's. I am now also finishing up my BS in CS and will be graduating May 2012 from UNA . I have learned many languages on and off over the years mostly informally on my own, and some in school, but the latest classes I am taking are in Java and so I will probably be focusing on that for the moment.