Coder Social home page Coder Social logo

cavestory-development's People

Contributors

limeoats avatar

Stargazers

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

Watchers

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

cavestory-development's Issues

tiled level is not rendering

hello, thanks for the tutorial. i'm having a problem with it though.
i'm not getting errors, it compiles fine, i can move the hero sprite around but,
the tiled level is not rendering. please see screenshot.
below is my "content" and "maps" directories. i don't think i'm missing a file ?
also the map shows correctly in tiled.

MBP: cavestory-development
$ tree content/ maps/
content/
├── backgrounds
│   └── bkBlue.png
├── sprites
│   ├── MyChar.png
│   ├── NpcCemet.png
│   └── TextBox.png
└── tilesets
    ├── NpcSym.png
    └── PrtCave.png
maps/
├── Map 1.tmx
└── Map 2.tmx

3 directories, 8 files
MBP: cavestory-development

screenshot_20190112_200247

tagging each episode

Hey man,
as a suggestion maybe look into git tagging your repo as you continue to evolve the codebase for each episode. That way you can fetch the state of the repository for that particular episode.

If it's interrupting your workflow too much though, don't bother. Just a suggestion.

git tag -a v0.1 -m 'episode 1'
git push --tags origin

game followed by int is illegal

Just doesn't work. I can't find a solution.

Visual studio 2019.

and in graphics.h i get an unexpected token struct.

Main.cpp

/*
    Main.cpp
    Entry point for the program.
*/

#include "game.h"

int main(int argc, const char* argv[]) {
	Game game;
	return 0;
}

graphics.h

#ifndef GRAPHICS_H
#define GRAPHICS_H

struct SDL_Window;
struct SDL_Renderer;

class Graphics {
public:
	Graphics();
	~Graphics();
private:
	SDL_Window* _window;
	SDL_Renderer* _renderer;
};

#endif

Error in level.cpp

Vector2 Level::getTilesetPosition(Tileset tls, int gid, int tileWidth, int tileHeight) {
	int tilesetWidth, tilesetHeight;
	SDL_QueryTexture(tls.Texture, NULL, NULL, &tilesetWidth, &tilesetHeight);
	int tsxx = gid % (tilesetWidth / tileWidth) - 1;
	tsxx *= tileWidth;
	int tsyy = 0;
	int amt = ((gid - tls.FirstGid) / (tilesetWidth / tileWidth));
	tsyy = tileHeight * amt;
	Vector2 finalTilesetPosition = Vector2(tsxx, tsyy);
	return finalTilesetPosition;
}

Why tilesetWidth and tilesetHeight is always 0?
gdb:

(gdb) run
Starting program: /home/ivan/Gamedev/cavestory-development-master/cavestory 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeced0700 (LWP 18708)]

Program received signal SIGFPE, Arithmetic exception.
0x000000000041c3e9 in Level::getTilesetPosition (this=0x7fffffffd830, tls=..., 
    gid=34, tileWidth=16, tileHeight=16) at source/src/level.cpp:409
409		int tsxx = gid % (tilesetWidth / tileWidth) - 1;
(gdb) print tilesetWidth
$1 = 0
(gdb) 

What license is this under?

This would be very helpful to include a license for your code so we know the terms of using it. Can we re-use it legally(even in proprietary stuff)?(MIT) Does it have to be open-source(GPLv2 or GPLv3)? Thanks for all your hard work!

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.