limeoats / cavestory-development Goto Github PK
View Code? Open in Web Editor NEWAll of the source code from my Remaking Cavestory in C++ youtube series can be found in this repository.
All of the source code from my Remaking Cavestory in C++ youtube series can be found in this repository.
How do I compile this with g++?
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!
When I use an invalid path for the level file, the background is black and Quote can still move around, however, specifying the correct path to my .tmx file causes a Segmentation fault (core dumped)
and the window never opens.
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
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)
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.