r/Limeoats • u/Limeoats • Sep 15 '15
r/Limeoats • u/Limeoats • Sep 15 '15
Remaking Cavestory in C++ - Episode 2 - Creating the game window
r/Limeoats • u/Limeoats • Sep 15 '15
Remaking Cavestory in C++ - Episode 1 - Introduction
r/Limeoats • u/Limeoats • Sep 22 '15
Remaking Cavestory in C++ - Episode 4 - Drawing our character
r/Limeoats • u/Limeoats • Oct 14 '15
Remaking Cavestory in C++ - Episode 17 - Enemies
r/Limeoats • u/bangingalltheway • Nov 02 '15
Hey Limeoats, I am losing my motivation to learn game development. What should I do?
I loved this series, thanks to Limeoats. But as a complete beginner, I am facing a lot of difficulty. Are there other tutorials or materials that I can also follow in order to understand game development. Specially the SDL2 concepts.
r/Limeoats • u/Limeoats • Oct 20 '15
Remaking Cavestory in C++ - Episode 18 - Enemies - Part 2
r/Limeoats • u/Limeoats • Oct 06 '15
Remaking Cavestory in C++ - Episode 12 - Animated Tiles
r/Limeoats • u/Limeoats • Sep 29 '15
Remaking Cavestory in C++ - Episode 10 - The level class - Part 4
r/Limeoats • u/Limeoats • Sep 25 '15
Remaking Cavestory in C++ - Episode 8 - The level class - Part 2
r/Limeoats • u/Limeoats • Sep 23 '15
Remaking Cavestory in C++ - Episode 6 - The player class
r/Limeoats • u/Limeoats • Sep 22 '15
Remaking Cavestory in C++ - Episode 5 - Animating our sprites
r/Limeoats • u/Limeoats • Oct 08 '15
Limeoats website revamped! Check it out!
r/Limeoats • u/Limeoats • Oct 08 '15
Remaking Cavestory in C++ - Episode 14 - The HUD - Part 1
r/Limeoats • u/Limeoats • Sep 29 '15
Remaking Cavestory in C++ - Episode 9 - The level class - Part 3
r/Limeoats • u/Limeoats • Sep 24 '15
Remaking Cavestory in C++ - Episode 7 - The level class - Part 1
r/Limeoats • u/Limeoats • Jun 19 '18
[Tutorial] Creating static C++ libraries in CLion with CMake
Hey everyone.
I created a tutorial on how to create static C++ libraries in CLion using CMake. There is a text version and a video version, both linked below.
This tutorial goes into detail about why CLion is a great IDE for C++ development, as well as the steps required to set up the project, build your static library, and then link to it from another C++ application.
Text version: http://www.limeoats.com/clion-and-cmake
Video version: https://youtu.be/CqjokCekMM8
If you have any questions, feel free to leave a comment here, on the video or blog post, tweet at me @limeoats, or find another way to contact me on my website.
Hope this helps and enjoy!
r/Limeoats • u/Limeoats • Oct 07 '15
Remaking Cavestory in C++ - Episode 13 - Looking up and down
r/Limeoats • u/Limeoats • Oct 02 '15
Remaking Cavestory in C++ - Episode 11- Slopes
r/Limeoats • u/Limeoats • Oct 10 '15
Remaking Cavestory in C++ - Episode 16 - Doors
r/Limeoats • u/Limeoats • Nov 04 '15
Twitch streaming beings today @ 4:30PM EST!
Hey everyone.
I'm going to be starting to stream the development of my new game today on Twitch! Information about the game, language, and everything else can be found by clicking here to read the FAQ.
Come check out the stream, chat with me, and watch some exciting programming live. I look forward to seeing you all!
r/Limeoats • u/Limeoats • Oct 09 '15
Remaking Cavestory in C++ - Episode 15 - The HUD - Part 2
r/Limeoats • u/NoFaTe121 • Oct 03 '15
Calculate the position of the a in a tileset
Hey, I just wanted to let you know of a problem i ran into.
In episode 9 you wrote this code in level.cpp to calculate the position of a tile in a tileset. Everything works fine with the cave level you created, but it doesnt work for all corner cases when loading a map.
I made a test level with this test_tileset.png and this map. Loading my map with your code looks like this: http://imgur.com/R4Qhmc1
If you compare that to the tileset image you can see that the last column is missing. That is because you get negative values for tsxx.
Here a little fix for that:
int tsxx = (gid - 1) % (tilesetWidth / tileWidth);
tsxx *= tileWidth;
int tsyy = 0;
int amt = ((gid - 1) / (tilesetWidth / tileWidth));
tsyy = tileHeight * amt;Result: http://imgur.com/DofIyGL
This also probably doesn't work with more than one tileset, but that's another problem.
Also, keep up the good work.
r/Limeoats • u/Limeoats • Oct 21 '16
Lime2D: In-game Map/Animation Editor
Hi everyone.
I am officially releasing Lime2D, which is an in-game map / animation editor for games being developed in C++ with SFML.
Screenshots
Many people (myself included) like to see screenshots of whatever is being discussed right from the beginning, so here you go:
Map Editor
The main benefit of using Lime2D instead of a different map editor is that it is integrated right into your game. All you need to do is press a key on your keyboard while the game is running and Lime2D will appear.
A video of Lime2D integrated with a game
How does it work?
Lime2D saves maps in a custom XML format that I created. When a map is loaded into Lime2D, the XML is read, parsed, and the map is rendered to the game screen. Changes can then be made to the internal representation of the map. When the user saves the map, Lime2D rebuilds the XML for that map and saves it to the map folder. When Lime2D is turned off, the actual game's code can automatically reload the map without reloading the player, thus making the map update in "realtime" (without needing to restart the game or change maps).
Animation Editor
Lime2D also comes with an in-game animation editor. When the user creates a new animation, he or she is given a bunch of options (choose a spritesheet, the animation's x and y coordinates on the spritesheet, the size of the sprite, the number of frames, etc). As the user fills in those values, the animation starts appearing in realtime on the animation editor's screen. This allows you to build the animation exactly as you'd like to see it in your game.
Saving the animation builds a Lua file which simply contains all of the parameters. You can then build code in your game to read these Lua files and draw the animations to the screen based on this.
Why is this useful? You can update any sprite's animation while in-game, save it, and then close Lime2D and see the updated animation instantly without restarting, recompiling, or doing anything else.
How do I get started?
You can get started with Lime2D by going to the official Lime2D website. There is an installation section with links to a video tutorial and a text tutorial, depending on which you prefer.
If you find any bugs or think of any features you'd find useful, please create an issue on Github. I will get started on fixing the issues as soon as possible.
What's next?
I am about to start working on a project that I am very excited about. Similar to my old YouTube series, Remaking Cavestory in C++, I will be making a new YouTube series where I remake a game in C++. There are two key differences here though:
I will be remaking A Note For Lime, which is a game I originally made in Unity a few years ago. This time around, I will be making it in C++ with SFML.
I will be using Lime2D throughout the entire series for maps and animations.
This series will have a number of benefits for you as a viewer:
You will learn how to make a game in C++
Your C++ skills will improve
You will learn how to master Lime2D
Much, much more
More details on the new series will be coming in the very near future.
Important information
If you would like to support me / Lime2D, please go to http://www.patreon.com/limeoats and consider pledging. Any amount goes a long way and it is greatly appreciated.
Also, please follow me on Twitter for updates.
Very important links
Here are some very important links that I would appreciate you checking out:
r/Limeoats • u/Limeoats • Apr 05 '18
Making a camera
Someone recently asked me to elaborate on the theory behind creating a camera in a 2D game, so I'm going to attempt to do that here.
So you need a way to change what section of the "map" is being shown in your window at any given time. You can represent a "section" of a map as a rectangle that is the size of your window, since that's how much you want to show.
Now, you only want one Camera to ever exist in the entire game, so you're going to make the Camera class static. In C++, you can't explicitly declare a class as static, so you can accomplish this by making all of the functions static.
A simple example:
class Camera {
public:
static void Init(); // Use this instead of a constructor
static sf::FloatRect GetRect(); // FloatRect is SFML. Use SDL_Rect or something like that for SDL2.
static void Update(float elapsedTime);
};Then, in your .cpp file, you'll want to create a static variable
static sf::FloatRect m_rect; // Again, use SDL_Rect or something else for SDLAnd that's it. You now have a static camera class that doesn't do anything.
I won't write any more code, but the basic idea is to initialize m_rect to x = 0, y = 0, width = WINDOW_WIDTH, height = WINDOW_HEIGHT.
Then, in your update function, you're just going to move the rectangle around based on how you want the camera to function in your game. You might want to check if the player is halfway across the rectangle, for example. If it is, start moving m_rect to the right to follow it.
You could also check keypresses to manually move m_rect (and thus move the camera around) if you want.
Now the camera is done. All you need to do is only draw what's located inside Camera::GetRect(). This part will differ depending on which framework you're using to draw, but the idea is the same across the board.