Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sykestech

Pages: [1]
1
General / Re: Installing SFML for VS Code
« on: January 24, 2020, 09:54:44 am »
You aren't linking to the SFML libraries in that command. You need to use -L{SFML LIBRARY PATH} and -lsfml-graphics-d.lib -lsfml-network-d.lib etc, etc so it loads those libs into it.

You'll also need to copy the dll's from the sfml bin folder to the output of your compiled code (i.e. where the exe is), or statically link to those libraries using the -s command and setting the SFML_STATIC preprocessor command.

- On a note, I would probably look at some tutorials around compilers and how to use them, etc, this will help you in getting comfortable and understanding how to setup libraries. Alternatively, as I said in my previous post, use an IDE like Visual Studio/Code::Blocks as this will do a lot of the leg work for you, especially if you are inexperienced with such things.

2
General / Re: Installing SFML for VS Code
« on: January 23, 2020, 02:25:02 pm »
Hi there,

There is a few ways you can go about it, now I don't use Visual Code much beyond file editing and small websites, but you should be able to use it alongside some tools.

CMAKE

CMake is the way I would do it, but can be a little complex if you are new to all this. You can download SFML to some location and setup a CMakeList.txt to specify your project, files and dependencies, etc. You might need to download or create an FindSFML.cmake or sfml-config if one doesn't already exist (it probably does).  In fact, there is a tutorial on how to do it here: https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php right from the SFML page. There are plenty of tutorials to get Cmake to work with MinGW, in fact, one of the generated projects can be  MinGW32-makefile.

Also a note, make sure that MinGW and CMake are in your PATH environmental variable, otherwise you'll run into not found command errors.

Manually

You can use the MinGW on the command line to build your code. I think the command is mingw32-g++. Bare in mind you'll have to specify all your source files and the command can become unwieldy when it grows, which is why CMake or an IDE is better for building if you don't want to manage this. Alternatively, you can add the command to a .BAT file and append source files to it as your project grows.

This might help: http://www.mingw.org/wiki/MinGW_for_First_Time_Users_HOWTO

and this snippet here:

https://stackoverflow.com/questions/19980043/how-do-i-use-the-mingw-compiler-from-the-command-line-on-windows


and here as well: https://courses.cs.washington.edu/courses/cse326/00wi/unix/g++.html

The above link shows -I and -l which can be used on the command line to link to the SFML libraries and inludes.


Use an IDE

IDEs can make your life easier and if you are new to software (or new to C++) this can just make it easier for you to get started. I can appreciate Visual Studio/CodeBlocks can feel bloated, but they do a lot of the leg work and the debugger in Visual Studio is top notch.

Hope this at least points you in the right direction.


3
SFML projects / Project Arcanus
« on: January 22, 2020, 02:00:48 pm »
Hi all, i'm new to both SFML and the forums here, but wanted to share something I am currently working on.
I've been a developer now for around ten years, but I mostly work in web. I wanted to get my feet wet with C++ and Game Development after a long hiatus from doing anything related to game dev and was shuffled along to SFML by recommendation and so far, I love it.

I wanted to create something that would be fun to me and taking inspriration from games like Terraria, I decided to begin development of this project a couple of days ago.

So far, I have this:

If it's hard to see you can go to the direct link here: https://sykestech-cdn.fra1.cdn.digitaloceanspaces.com/rendering.png

Basically I have some very simple terrain generation, it's built of chunks, at the moment 10x10 of 16x16 blocks. Each chunk is 100 blocks in size.  I can render infinitely if I wanted, but at the moment I just render 100,000 blocks. To keep the app from slowing down, I load chunks in and out when they come within viewable range of the camera. You can move left and right, albeit very choppily.

This is very much a work in progress and something i'll be developing over the coming year in my spare time. I've created a public github: https://github.com/sykestech/arcanus, so feel free to look at my code and tell me off for anything I am doing that isn't quite right or could be improved. Also feel free to contribute if you wish.

Again, just wanted to share what I have and looking forward to hearing your feedback.

Thanks





Pages: [1]
anything