Jump to content

  • Log In with Google      Sign In   
  • Create Account


_greyfox()

Member Since 01 Jul 2011
Offline Last Active May 25 2014 01:24 AM
***--

Topics I've Started

What do call/ret opcodes in assembly (NASM) actually do?

30 December 2013 - 10:46 AM

Very quick question here. I tried searching for it on google, but I can't find direct answer, and my debbuger is acting weirdly for some reason.

 

So I don't know if I'm right or not, but am I correct saying that CALL opcode pushed return address onto the stack, and goes to the specified routine? While RET opcode pops that return address from the stack and returns back to where CALL left off?

 

Thank you in advance.


Correct 4x4 orthogonal matrix implementation.

21 November 2013 - 09:50 AM

Hi, could anyone send me a link to a picture of CORRECT orthogonal 4x4 matrix implementation? I can't seem to find it on the google. Not sure if I did it right myself.

 

This is the code I got for the matrix:

#include "Matrix4.h"

Matrix4::Matrix4()
{
	m_data = new float[16];
	loadIdentity();
}

void Matrix4::set(const float matrix[16])
{
    for(int i = 0; i < 16; i++){
        m_data[i] = matrix[i];
    }
}

void Matrix4::loadIdentity()
{
    m_data[0] = 1.0f;
    m_data[1] = 0.0f;
    m_data[2] = 0.0f;
    m_data[3] = 0.0f;

    m_data[4] = 0.0f;
    m_data[5] = 1.0f;
    m_data[6] = 0.0f;
    m_data[7] = 0.0f;

    m_data[8] = 0.0f;
    m_data[9] = 0.0f;
    m_data[10] = 1.0f;
    m_data[11] = 0.0f;

    m_data[12] = 0.0f;
    m_data[13] = 0.0f;
    m_data[14] = 0.0f;
    m_data[15] = 1.0f;
}

void Matrix4::setFrustum(float left, float right, float bottom, float top, float near, float far)
{
	// TODO implement this
}

void Matrix4::setOrtho(float left, float right, float bottom, float top, float near, float far)
{
    m_data[0] = 2.0f/(right-left);
    m_data[1] = 0.0f;
    m_data[2] = 0.0f;
    m_data[3] = -((right+left)/(right-left));

    m_data[4] = 0.0f;
    m_data[5] = 2.0f/(top-bottom);
    m_data[6] = 0.0f;
    m_data[7] = -((top+bottom)/(top-bottom));

    m_data[8] = 0.0f;
    m_data[9] = 0.0f;
    m_data[10] = 2.0f/(far-near);
    m_data[11] = -((far+near)/(far-near));

    m_data[12] = 0.0f;
    m_data[13] = 0.0f;
    m_data[14] = 0.0f;
    m_data[15] = 1.0f;
}

Matrix4 Matrix4::operator*(const Matrix4 & matrix)
{
    Matrix4 outMatrix;

    for(int y = 0; y < 4; y++){

        for(int x = 0; x < 4; x++){
            float outVal = 0;

            for(int i = 0; i < 4; i++){
                outVal += getData(i,y)*matrix.getData(x,i);
            }
            outMatrix.setData(x,y,outVal);
        }
    }

    return outMatrix;
}

void Matrix4::operator=(const Matrix4 & matrix)
{
    set(matrix.toArray());
}

std::ostream& operator<<(std::ostream& os, const Matrix4& matrix)
{
    for(int y = 0; y < 4; y++){
        for(int x = 0; x < 4; x++){
            os << matrix.getData(x,y) << "\t";
        }
        os << std::endl;
    }
}

float * Matrix4::toArray() const
{
    return m_data;
}

float Matrix4::getData(int col, int row) const
{
    return m_data[(row*4)+col];
}

void Matrix4::setData(int col, int row, float data)
{
    m_data[(row*4)+col] = data;
}

Matrix4::~Matrix4()
{
    delete [] m_data;
}

Does this look good? The multiplication part seems to work fine. But I'm not sure about setOrtho method.


So... I think I quit game development :(

13 November 2013 - 11:15 AM

After 4 years of learning how to program and making games, I'm starting to realize that game development is not my thing. For few months I was struggling, I had the skills, but I had NO ideas for games, and I realized that I'm not that interested in games, or at least in those AAA games like COD or Battlefield or other shit. When I was younger, yes. I liked playing games, and loved making them. But now, it seems like I've grown out of it. And it's sad. I started programming JUST because I wanted to make games. But the spark inside my is getting dimmer. I still LOVE programming in general though. I like doing stuff with my arduino, I like doing graphics with OpenGL, I like writing terminal ascii tetris game. But I can't seem to force myself to do a bigger project.

 

But I don't even know why I'm writing this here. Maybe I just want the world to know how I feel. Maybe there are more people like me who just need to stop forcing themselves to do what they don't want. 

 

 

Edit: I just want to tell that my "depresion" cloud is gone. My mood swings sometimes get the best of me. Now I'm trying to plan my game from ground up, and don't start programming until I have my basic sctech on paper. During the days I was thinking a lot about games, and game design in general. I want to screate something absolutely different, break those stupid standarts that big companies are making. I now know that my game is going to be very simplistic in graphics, slow gameplay, calm music (not sure where I will get that) and vivid colors. I feel like I should express myself in my game. I still don't have an idea for an actualy gameplay, but I'm working on it.

 

So I was scrolling through "Top" games at google play, and found out 40% of them are clones. Minecraft clones, mario clones, clones of other popular mobile games, counter strike clones and many more. Other 59% are games with shitload of ads and spam. And less than 1% are actually good games. I'm sick of all the games on mobile phones, they just copy a game from PC or console, add the virtual joystick controls, pump it with adds and sell it as "mobile game". You just can't do that. Mobile gaming is not just portable PC or console gaming, it's absolutely different category. And I'm talking about touch screen games. Game devs do not see full potential in all the sensors they are given to use. I will try think differently. I hope I will not fail misserably, I want to at least finish my game, and publish it to the public for free, without ads (if I won't become greedy while making that game)


Place to find amateur/hobbyist graphical artists for my game.

26 October 2013 - 10:45 AM

So I'm working on this mario clone game right now. Everything is going pretty fine, because I have all the graphics, sounds, level design, game mechanics in front of me and I don't need to create anything new. But after I finish this clone, I think I should create something of my own. My personal game.

 

The problem that I have is I don't know where will I get all the assets? I can find some generic sounds on Freesound.org, but for graphics I need something more unique. I can't just rip few sprites of other games, or draw my own (because I suck at drawing). At best I could make simple tiles. But no animation, or anything else.

 

So I came here asking you guys where could I possibly hire amateur graphical artist. I choose amateur because I would probably need bunch of money for professional one, and I'm just a starting single game developer with no team so I don't want to risk putting much money into it right now.

 

Maybe I could even find someone who would be kind enough to do it for free. After all, most of us here are just making games for fun, so it would be nice if someone could help me out smile.png

 

So what sites or forums I could search to find something that would like to help me?


Forgot the name of the game top-down fighting game for PS1

20 October 2013 - 01:58 AM

Hello GDNet,

 

so I thought you guys might help me out. I installed PSX emulator on my android, and now I want to play this game. Last time I played it was 10 years or so ago. I know that this game isn't popoular. I haven't heard anyone talk about it, and haven't seen any videos of it, nor reviews.

I can't remember almost ANYTHING. But few things I do (kind of) know:

 

It is some kind of fighting game, it is in 3D, it is in birds eye view. You can fight with different monsters (or maybe robots) in 2 player mode, for some reason I can't recon playing it in single-player mode. Maps were small, and square shaped. I think the whole map fits in the screen, but there may be little scrolling around. One map I think had a huge tree in the middle. My memories are very blurry. But I remember all the fun I had with that game.

 

So if someone might know game I described here for PS1, please share the name with me. 


PARTNERS