Git Product home page Git Product logo

raymario's People

Contributors

jubalh avatar victorfisac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

raymario's Issues

Collision Detection Question

Hey i've been working on my own version of your the ray mario, and im been trying to get my player to prevent colliding into the right and left boundaries of the floor/platforms (stair steps). My player is successfully walking on top of the platform/floor without collision, but i'm going through the platform/floor thats intended to be stairs/steps, or random platform/objects on the floor. Could you give my any advice, I have my code snippet below..

`

Rectangle player = { 400,320,40,40 };
Rectangle oldPlayer = player;
Camera2D camera;
Camera2D oldCamera = camera;

while (!WindowShouldClose())    // Detect window close button or ESC key
{
            oldPlayer = player;
	oldCamera = camera;

		if (IsKeyDown(KEY_RIGHT)) {
			player.x += 2;                  // Player movement
			camera.offset.x -= 2;       // Camera displacement with player movement
		}
		else if (IsKeyDown(KEY_LEFT)) {
			player.x -= 2;                    // Player movement
			camera.offset.x += 2;       // Camera displacement with player movement
		}


		// Collision
		for (int i = 0; i < MAX_FLOOR; i++) {

			if (CheckCollisionRecs(Rectangle{ player.x, player.y, player.width, player.height }, Rectangle{ (int)platforms[i].position.x, (int)platforms[i].position.y,(int)platforms[i].scale.x, (int)platforms[i].scale.y })) {
	
				// player and camera gets updated/starts fresh
				player = oldPlayer;
				camera = oldCamera;		
				
				if (IsKeyDown(KEY_RIGHT)) {
					player.x += 2;              // Player movement
					camera.offset.x -= 2;       // Camera displacement with player movement

				}
			}
			
		}

}
`

What tools did you use for map?

Hi, awesome game, I was wondering what tools did you use to make your tilemap, and .bmp files for the game. I'm creating a basic side scroll game using raylib, and I'm drawing it out using arrays, and a text file for the map, which is a bit tedious. Can you give me any advice on how did you create your map???

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.