• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
LAURENT*

My game's beta is finished but it won't run on other comptuers

17 posts in this topic

I've come so far and now I'm almost ready to release my first beta. my beta doesn't work on other computers. I'm mainly talking about the application file. Anyways here some info. I used visual studios 2010 to create my game. The extension library is SDL 1.5 from lazy foo. When I run the application I can't seem to move my character with key press. How do you make visual studios 2010 applications run on other computers?

 

 

EDIT!

 

Here is my game source code included. This is a isometric platformer tic tact toe game. If you're looking to make tic tact toe or a isometric platformer use my source code for whatever you want. I don't really care.

 

https://www.mediafire.com/?9natkpirh64aded

Edited by LAURENT*
1

Share this post


Link to post
Share on other sites
#include <stdlib.h>
#include <stdio.h>
#include <SDL.h>
#include <SDL_image.h>
#include <time.h>
#include "tictactoe.h"

void Game::showMovement(int x, int y, SDL_Surface* screen, SDL_Surface* source, SDL_Rect* clip = NULL)
{
	//Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, screen, &offset);
}


void Game::showCharacterMovement(int fakeX, int z, SDL_Surface* screen, SDL_Surface* source, SDL_Rect* clip = NULL)
{
	//Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = fakeX;
    offset.y = z;

    //Blit
    SDL_BlitSurface( source, clip, screen, &offset);
}


void Game::hub(SDL_Surface *screen)
{
	x = 0;
	y = 0;
	fakeX = x;
	z = y + YS_HEIGHT;
	
	bool quit = false;
	//While the user hasn't quit
    
	while( quit == false )
    {
        //While there's events to handle
        while( SDL_PollEvent( &event ) )
        {
            //Handle events for the dot
            buttonInput();

            //If the user has Xed out the window
            if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
				break;
            }
        }
		
		move( get_ticks() );
		if ((x > 100 + 11) && (x < 100 + 31) && (y < 100 + 64 ) && (y > 100 + 58 )) 
		{   y = 0;
			x = 0;
			z = 0;
			xVel = 0;
			yVel = 0;
			zVel = 0;
			break;
			

		}
		start();
		SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 255, 255, 255));

		showMovement(100, 100, screen, Door1 );
		showMovement((int) x, (int)y, screen, LandPad );
		showCharacterMovement((int) fakeX, (int) z, screen, Ysguy1);
		SDL_Flip( screen );

		
	} 
	play(screen);
}


void Game::buttonInput()
{		
	//If a key was pressed
    if( event.type == SDL_KEYDOWN )
    {
        //Adjust the velocity
        switch( event.key.keysym.sym )
        {
			case SDLK_UP: yVel -= YS_VEL_WALK; zVel -= YS_VEL_WALK; break;
            case SDLK_DOWN: yVel += YS_VEL_WALK; zVel += YS_VEL_WALK; break;
            case SDLK_LEFT: xVel -= YS_VEL_WALK; break;
            case SDLK_RIGHT: xVel += YS_VEL_WALK; break;
			case SDLK_SPACE: if(grounded == true){z -= 3; zVel -= YS_VEL_WALK + 20;} break; 
							// if(grounded == false) {}
        }
    }
    //If a key was released
    else if( event.type == SDL_KEYUP )
    {
        //Adjust the velocity
        switch( event.key.keysym.sym )
        {
            case SDLK_UP: yVel += YS_VEL_WALK; zVel += YS_VEL_WALK; break;
            case SDLK_DOWN: yVel -= YS_VEL_WALK; zVel -= YS_VEL_WALK; break;
            case SDLK_LEFT: xVel += YS_VEL_WALK; break;
            case SDLK_RIGHT: xVel -= YS_VEL_WALK; break;	
        }
    }
}


void Game::move( Uint32 deltaTicks )
{	
	landpadCoords.x = x;
	landpadCoords.y = y;
	landpadCoords.w = x + LANDPAD_WIDTH;
	landpadCoords.h = y + LANDPAD_HEIGHT;
	
	
	
	fakeX = x; 
    //Move the dot left or right
    x += xVel * ( deltaTicks / 1000.f );

    //If the dot went too far to the left
    if( x < 0 )
    {
        //Move back
        x = 0;
    }
    //or the right
    else if( x + YS_WIDTH > SCREEN_WIDTH)
    {
        //Move back
        x = SCREEN_WIDTH - YS_WIDTH;
    }

    //Move the dot up or down
    y += yVel * ( deltaTicks / 1000.f );

    //If the dot went too far up
    if( y < 0 )
    {
        //Move back
        y = 0;
    }
    //or down
    else if( y + YS_HEIGHT > SCREEN_HEIGHT)
    {
        //Move back
        y = SCREEN_HEIGHT - YS_HEIGHT;
    }

	
	
	if (z + YS_HEIGHT > y)			
	{ 
		grounded = true;	
	}	
	else if (z + YS_HEIGHT < y)
	{
		grounded = false;
	}
		

	if (grounded == true)
	{
		zVel = yVel;
		z = y - YS_HEIGHT + 1;
	}		
	else if (grounded == false)
	{	
		zVel += ACCELARATION * ( deltaTicks / 1000.f );
		z += zVel * ( deltaTicks / 1000.f );
	}

	
}


Header file

#include <string>

class Game
{	 
	public:	
		//Game();

		Game::Game()
		{
			circle = IMG_Load("circle.jpg");  
			croix = IMG_Load("croix.jpg"); 
			board = IMG_Load("board.jpg"); 
			horizontale = IMG_Load("horizontale.jpg");
			verticale = IMG_Load("verticale.jpg");
			diagonale1 = IMG_Load("diagonale1.png");
			diagonale2 = IMG_Load("diagonale2.png");
			button = IMG_Load("button.png");
			Door1 = IMG_Load ("Door1.png");
			// Characters
			Ysguy1= IMG_Load("Ysguy1.png");
			LandPad = IMG_Load("LandPad.png");
			//Timer variables and functionality
			startTicks = 0;
			pausedTicks = 0;
			paused = false;
			started = false;

			//Const numbers that should never change
			 YS_VEL_WALK = 100;
			 YS_HEIGHT = 25;
			 YS_WIDTH = 19;
		     SCREEN_WIDTH = 589;
			 SCREEN_HEIGHT = 404;
			 ACCELARATION = 300;
			 LANDPAD_WIDTH = 19;
			 LANDPAD_HEIGHT = 7;
		};

		void meun (SDL_Surface* screen);
		void characters(SDL_Surface* screen);
		void play(SDL_Surface* screen); //F1
		int check_victory(SDL_Surface* screen); //F2	
		/***************************************************************************************/
		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////MOVE PUBLIC FUNCTIONS///////////////////////////////////
		/////////////////////////////////////////////////////////////////////////////////////////
		/***************************************************************************************/
		
		void buttonInput();
		void hub(SDL_Surface* screen);
		void move (Uint32 deltaTicks);
		void showMovement(int x, int y, SDL_Surface* screen, SDL_Surface* source, SDL_Rect* clip);
		void showCharacterMovement(int x, int z, SDL_Surface* screen, SDL_Surface* source, SDL_Rect* clip);
		/***************************************************************************************/
		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////TIMER PUBLIC FUNCTIONS///////////////////////////////////
		/////////////////////////////////////////////////////////////////////////////////////////
		/***************************************************************************************/
		void start();
		void stop();
		void pause();
		void unpause();

		//Gets the timer's time
		int get_ticks();

		//Checks the status of the timer
		bool is_started();
		bool is_paused();
			
		Game::~Game()
		{
			SDL_FreeSurface(horizontale);
			SDL_FreeSurface(verticale);
			SDL_FreeSurface(diagonale1);
			SDL_FreeSurface(diagonale2);
			SDL_FreeSurface(croix);
			SDL_FreeSurface(circle);
			SDL_FreeSurface(button);
			SDL_FreeSurface(board);	
			SDL_FreeSurface(Door1);	
			SDL_FreeSurface(LandPad);	
			SDL_FreeSurface(Ysguy1);	
		};

		//~Game();
		


	private:
		SDL_Event event;
		enum {EMPTY, CIRCLE, CROSS};
		
		/***************************************************************************************/
		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////IMAGE PRINTING PRIVATE VARIABLES/////////////////////////
		/////////////////////////////////////////////////////////////////////////////////////////
		/***************************************************************************************/
		SDL_Surface *board, *circle, *croix, *horizontale, *verticale, *diagonale1, *diagonale2, *button, *Ysguy1, *LandPad, *Door1;
		
		
		int meunSelect;
		int continuer,  turn,  end, nowinner, xCoordinate, yCoordinate;
		int space1, space2, space3, space4, space5, space6, space7, space8, space9;  
		SDL_Rect boardPosition, positionforme, positionwon;
		SDL_Rect button1, button2, button3, button4, button5, button6, button7, button8, button9;
		bool quit;
		/***************************************************************************************/
		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////TIMER PRIVATE VARIABLES//////////////////////////////////
		/////////////////////////////////////////////////////////////////////////////////////////
		/***************************************************************************************/
		//The clock time when the timer started
		int startTicks;

		//The ticks stored when the timer was paused
		int pausedTicks;

	    //The timer status
		bool paused;
		bool started;

		/***************************************************************************************/
		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////MOVER PRIVATE VARIABLES//////////////////////////////////
		/////////////////////////////////////////////////////////////////////////////////////////
		/***************************************************************************************/
		float x, y, z;
		float fakeX;
		float xVel, yVel, zVel;
		float ACCELARATION;
		int YS_VEL_WALK;
		int YS_HEIGHT;
		int YS_WIDTH;
		int SCREEN_WIDTH;
		int SCREEN_HEIGHT;
		int LANDPAD_WIDTH;
		int LANDPAD_HEIGHT;
		int leftA, leftB;
		int rightA, rightB;
		int topA, topB;
		int bottomA, bottomB;

		bool grounded;
		
		SDL_Rect landpadCoords;
		
};


2

Share this post


Link to post
Share on other sites

I think I might have mixed up the terms. I still have a long ways to go. Anyways here is the game ready to be played.

 

 

https://www.mediafire.com/?9natkpirh64aded

 

Step 1: Extract files zip file
Step 2: Open prototype folder
Step 3: Open second prototype folder
Step 4: Open third prototype folder
Step 5: Find "Prototype" Application file within the mess of other files
Step 6: Double click and run

1

Share this post


Link to post
Share on other sites

Just FYI my browser says "prototype.zip" is malicious and has been blocked. Not saying you had bad intentions lol.

I assume most of the executables that we people create and don't have signed officially by MS might be blocked by AV's or Chrome.

0

Share this post


Link to post
Share on other sites

Hi all,

 

I tested your game Laurent, it worked and I did liked smile.png

 

It remembered to me when i was younger and I programmed some games and it made me feel so nice.

 

I just entered the door and played Tic Tac Toe winning two times in the same game to the IA.

 

Thank you so much for this beta game guy biggrin.png

Edited by #Include Graphics
2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0