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 - euscar

Pages: [1] 2
1
General discussions / Re: Just to thank eXpl0it3r.
« on: August 26, 2023, 11:44:03 am »
Cool! :)

Thank you.
I went through dozens of tests before I found the right image.

Quote
Maybe you can also have a look at the Italian C++ Community, maybe there are more people than you'd have expected

I will look into this further, thank you.

2
General discussions / Re: Just to thank eXpl0it3r.
« on: August 24, 2023, 05:23:04 pm »
I made a draft for the cover of my user guide, which you can find here:
https://leanpub.com/sviluppo-applicazioni-con-dev-cpp

It could go well? Otherwise any suggestions are welcome.

For now I'm still behind with the user guide, but I plan to complete it by October, hoping that it will be of interest to someone.
I'd also like to write a guide on SFML, again in Italian, but I have no idea how many people might be interested.

3
General discussions / Just to thank eXpl0it3r.
« on: August 22, 2023, 05:21:04 pm »
Hi eXpl0it3r.
I wanted to thank you for putting this code in the public domain:
https://github.com/eXpl0it3r/Fractal

Since I love pure code and for my programs I use "Orwell Dev-C++" with which I am very comfortable, I am writing a user guide for the Dev-C++ IDE (for now only in Italian) and I decided to create the cover image with Mandelbrot set. In this guide I will also devote a chapter to SFML hoping to live up to it.

Again, thank you.

4
General / Re: 32 bit sfml can't be used when on 64 bit system.
« on: December 03, 2022, 09:23:49 am »
I did some testing and the following error

[Error] SFML/Graphics.hpp: No such file or directory.

appears to me when I change the name of the directory containing the SFML library. Are you sure you typed the path names correctly or that there is not some strange character? Also watch out for blank spaces, which are not welcome.
By the way, I use windows7.

5
General / Re: 32 bit sfml can't be used when on 64 bit system.
« on: December 03, 2022, 01:00:38 am »
I forgot to tell you to check the pre-entered inclusion entries, which should be the following in the directories tab under libraries (the first part of the path depends on the installation folder on your pc, just check the bold text):

C:\Program Files (x86)\Dev-Cpp\MinGW64\lib
C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib32

If you find errors in the first line you need to correct them. Apparently there was an autodetecting error,

"Fixed use of invalid library directories when autodetecting 32bit GCC 4.9.2."

reported at:

https://sourceforge.net/p/orwelldevcpp/code/ci/master/tree/NEWS.txt

It refers to a 5.12 version, which I think one has to self-compile, because so far I have only found Orwell's 5.11 as an executable.

If you have set the path to your SFML library correctly, I can't think of anything else.
At most manually check the devcpp.ini file located in the hidden folder:

C:\Users\your_user\AppData\Roaming\Dev-Cpp

where instead of your_user the name of your user appears.
There may be errors or extra characters in the paths.


6
General / Re: 32 bit sfml can't be used when on 64 bit system.
« on: December 02, 2022, 10:35:11 am »
Hello.
I too use Dev-C++ 5.11 (by Orwell), however with SFML version 2.4.2.

As already asked by eXpl0it3r, did you set up all the include directory correctly?
Be careful that you have to do this for each "Compiler set to configure".

I did some testing and on my PC equipped with windows 7 it works.
Last thing, if you use dynamic linking, as I do too, remember to copy the correct .dll files, the 32-bit ones.

For static linking, I have no idea how to do it.

7
General / Re: Screens goes black after some time
« on: November 25, 2022, 10:09:35 am »
I confirm what kojack wrote.

I tested the program by inserting an if statement in the Player::update causing the program to terminate with an error message: well, the program terminates at that point whenever the mouse pointer is over the red dot of the spacecraft, causing a division by zero.

You are a great kojack  ;)


P.S. As I continued testing the program, I noticed that division by zero happens even when the pointer is far from the spacecraft, and I deduced that this depends only on the two Y coordinates - I could have gotten there even earlier, how careless I am  :-[

8
General / Re: Where to start learing ? (intermediate c++ programmer)
« on: November 03, 2022, 10:21:44 am »
Hello.

It is not easy to find good tutorials on the net.
But if you are willing to read a good book, I recommend this:
https://www.packtpub.com/product/beginning-c-game-programming-second-edition/9781838648572
is in its second edition (2019) and contains 5 examples of videogames written in C ++ and SFML.
I find it very useful.

Then there are also those recommended on the official site:
https://www.sfml-dev.org/learn.php
but I'm better off with John Horton's book.

P.S. You can find further examples of videogames in one of the books recommended on the "Learn" page of the official site, precisely:
https://www.packtpub.com/product/sfml-blueprints/9781784398477

In reality, almost all the recommended books contain examples of 2D videogames  ;)


9
Graphics / Re: Issue with drawing convex shape
« on: October 31, 2022, 08:09:30 am »
Usually the minimum number of points for drawing a figure is three.
Furthermore the points must be entered in a certain order.
From the tutorial:
Quote
The order in which you define the points is very important. They must all be defined either in clockwise or counter-clockwise order. If you define them in an inconsistent order, the shape will be constructed incorrectly.

See the example:

// create an empty shape
sf::ConvexShape convex;

// resize it to 5 points
convex.setPointCount(5);

// define the points
convex.setPoint(0, sf::Vector2f(0.f, 0.f));
convex.setPoint(1, sf::Vector2f(150.f, 10.f));
convex.setPoint(2, sf::Vector2f(120.f, 90.f));
convex.setPoint(3, sf::Vector2f(30.f, 100.f));
convex.setPoint(4, sf::Vector2f(0.f, 50.f));

Link to the tutorial page: https://www.sfml-dev.org/tutorials/2.5/graphics-shape.php

10
Graphics / Re: Alternative to drawing all of an array.
« on: October 25, 2022, 10:37:18 pm »
If you are just a beginner in C++ I recommend the following book which introduces you to both C++ and SFML:

https://www.packtpub.com/product/beginning-c-game-programming-second-edition/9781838648572

11
General discussions / Re: SFML not working
« on: October 25, 2022, 04:03:16 pm »
I have tried your code with Orwell Dev-C ++ and it works fine.

Which IDE are you using?
Did you set the dependencies correctly?

P.S. the "return 0" statement must be placed after the penultimate closing curly brace (}).

12
Graphics / Re: Alternative to drawing all of an array.
« on: October 25, 2022, 03:48:41 pm »
Usually a for loop is used with arrays.

Isn't it enough to draw each frame with the window.draw () function? In reality this function places them only in the frame being created, then the window.display () function intervenes to display the result.

13
General discussions / Re: Where to learn SFML from?
« on: August 28, 2022, 05:24:54 pm »
I agree with Lukas.
Better to use the tutorial from the official site and the books.

I myself am writing a guide in Italian for personal use because I don't chew English very well (sorry, I'm using google translator) and I'm learning a lot of things.
When I have finished it I will make it available, if it will be of interest to some Italians of course.

P.S. In addition to the 5 books listed on the official website, there is another book that deals with SFML:
https://www.packtpub.com/product/beginning-c-game-programming-second-edition/9781838648572

14
General / Re: Trying to build with DEV-C++, getting linked errors
« on: August 28, 2022, 04:45:56 pm »
Hello.

I'm going back to this discussion to say that I'm using Dev-C ++ (Orwell version mentioned above) with SFML 2.4.2 because Dev uses the TDM-GCC 4.9.2 build set and so far everything is ok.

I know there is a new version Dev-C++ 6.3 (which uses TDM-GCC 9.2.0 32 / 64bit) maintained by Embarcadero at this web address https://www.embarcadero.com/free-tools/dev-cpp , but I have never tried it.
Maybe someday I'll do some testing to see if it supports SFML 2.5.1

15
General discussions / Re: Italian members?
« on: August 14, 2022, 11:39:33 am »
Here I am.

Do you use SFML?
To do what?
I'm curious.  :)

Do you know other Italians who attend the forum?

Pages: [1] 2