🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

game advice

Started by
16 comments, last by pbivens67 3 years, 10 months ago

I am working on an old project that is like a 2d platformer, I have drawn two animated sprites and and one can jump in parabolic fashion. I have also drawn three flowers and some brick wall. what I would like to know is what I should add to my game. here is a screen shot

https://imgur.com/LFurDXm

Advertisement

pbivens67 said:
what I would like to know is what I should add to my game

That's for you to decide yourself, Phil. What do you want to add to your game?

-- Tom Sloper -- sloperama.com

  1. Add multiplayer (or cooperative) modes using sockets. Make very simple chat to start and make the Tic-Tac-Toe Game using sockets. And you will have everything to make MMORPG and 2D platformers with multiplayer/cooperative.
  2. Try to add physics in your game using Box2D.
  3. Study how to make GUI. Make your first button to start your game. Make a text edit element to enter a player name, a port and a host address.
  4. Practice a lot by making simple games and examples and have a fun.

@8Observer8well to keep things simple I am working on getting the sprites to face either left or right and to move and jump in that direction, do you have any advice?

Phil, “do you have any advice” is not a good question. What is stopping you from making your sprites face left, right, and move in two directions? You must be specific with your questions.

-- Tom Sloper -- sloperama.com

pbivens67 said:
@8Observer8well to keep things simple I am working on getting the sprites to face either left or right and to move and jump in that direction, do you have any advice?

Okay, I will try to make a simple example using Qt C++ OpenGL 3.3 for practice. Qt just have a few helper classes to simplify working with shaders, VBO's, textures, resources, events and so on. But I think you will be able to translate my code to GLFW, SDL2, FreeGLUT and so on.

pbivens67 said:
I am working on getting the sprites to face either left or right

I change a face direction by changing the sign of “x scale” in model matrix:

    
    if (m_isRightDir)
    {
        m_playerModelMatrix.scale(16.0f, 16.0f);
    }
    else
    {
        m_playerModelMatrix.scale(-16.0f, 16.0f);
    }

This is a current of my example. I want to add jumping and collision. I did not made it in pure C++ and OpenGL 3.3. I will not use Box2D for this example.

well I have got my sprite to move to right but not to the left, I am using a boolean as a directional toggle, here is my code

void renderScene(void)
{
	glClear(GL_COLOR_BUFFER_BIT);
	glPushMatrix();
	drawBkgnd();
	drawBkgndone();
	drawBkgndtwo();
	drawWallone();
	drawFlowerone();
	drawFlowertwo();
	drawFlowerthree();
	if (move_left == true)
	{
		drawSpriteone();
		move_right = false;
	}
	else if (move_right == true)
	{
	drawSprite();
	move_left = false;
	}
	drawEnemySprite();
	glPopMatrix();
	glutSwapBuffers();
}

pbivens67 said:
well I have got my sprite to move to right but not to the left, I am using a boolean as a directional toggle, here is my code

And what is your question, Phil?

-- Tom Sloper -- sloperama.com

pbivens67 said:
glPushMatrix();

Do not use legacy/deprecated version of OpenGL. Use OpenGL 3+. This tutorial is good to start: https://learnopengl.com/​​​ Read the tutorial and rewrite your code to modern OpenGL.

This topic is closed to new replies.

Advertisement