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 - Tigre Pablito

Pages: [1] 2 3 ... 16
1
Graphics / Re: Window to fill all screen and Texture transparent color
« on: March 13, 2025, 05:09:55 am »
Hello!

@Hapax you finished to solved muy issue. Thank you! You're very nice!

Also much thanks to @eXpl0it3r for his before replies, very nice too!

Regards
Pablo

2
Graphics / Re: Window to fill all screen and Texture transparent color
« on: March 11, 2025, 03:10:12 am »
Hello Hapax

I retouched my code to this:

        public void Run()
        {
            View target = new View(new Vector2f(200, 150), new Vector2f(400, 300));
            //Images.window.SetView(target);
            Images.window.SetView(getLetterboxView(target, 400, 300));

            DateTime time = DateTime.Now;

            while (true)
            {
                time = time.AddMilliseconds(20);
                if (exit == true)
                    break;
                Images.window.Clear();
                Images.window.Draw(Images.place);
                player.Update();
                player.Shoots.Update();
                zombies.Update();
                player.Display();
                player.Shoots.Display();
                zombies.Display();
                Images.window.Display();
                Images.window.DispatchEvents();
                while (DateTime.Now < time)
                    ;
            }
        }
 

and now it is a bit better, but this time it fills the whole screen, this is, no black side bars.
What did I do wrong?

Thank you
Pablo


3
Graphics / Re: The problem with the rectangleshape size
« on: March 11, 2025, 02:55:08 am »
Hello

If you want the RectangleShape size equal to the Texture's one, you can get the Texture size and apply it to the RectangleShape.


4
Graphics / Re: Window to fill all screen and Texture transparent color
« on: March 10, 2025, 08:56:33 pm »
Hi

I already got the getLetterboxView() code and I'm using it but I don't get the result I want. What I want is a 400x300 window/View that fills all the screen (yes, keeping aspect ratio 4/3 so with the black side bars). Is it possible in SFML.Net? My current code (not working as I expect) is below (the main loop).

            while (true)
            {
                time = time.AddMilliseconds(20);
                if (exit == true)
                    break;
                Images.window.Clear();
                Images.window.Draw(Images.place);
                player.Update();
                player.Shoots.Update();
                zombies.Update();
                player.Display();
                player.Shoots.Display();
                zombies.Display();
                Images.window.SetView(getLetterboxView(Images.window.GetView(), 400, 300));
                Images.window.Display();
                Images.window.DispatchEvents();
                while (DateTime.Now < time)
                    ;
            }
 

Your help is much appreciated.
Thanks
Pablo

5
Graphics / Re: Window to fill all screen and Texture transparent color
« on: March 10, 2025, 03:50:43 pm »
Hello

Thanks for your reply.

I saw the letterbox effect code. Could you tell me how to connect my RenderWindow object with the function getLetterboxView? In the post/example it is not shown.

Thank you
Pablo

6
Graphics / Window to fill all screen and Texture transparent color
« on: March 04, 2025, 07:14:10 pm »
Hello all

I have two questions:

Is there a way for window with VideoMode(400, 300, 24) to fill all screen? Well, not all the width exactly (because modern screens' widths are more than 4/3) but keeping aspect ratio.

Is there a way to assign transparent color to a Texture without using the Image class? The code I have by now is below, the purpose is to dispense with the Image object/code.

Image image = new Image("file.png");
image.CreateMaskFromColor(color);
Texture texture = new Texture(image);
 

Thank you very much
Pablo

7
Hello, Ladies and Guys from SFML
I'm just making a little Space Shooter game, and now it runs very slow (yesterday it didn't happen). I made the project type Console type because it's the only one that is like an empty project, actually it's not possible to create an empty project excepting you use the .Net Framework (very old), so I use .Net 8. Below I copy the Console message that appears after the slow execution of my app. I'm using SFML.Net 2.6.0, VS 2022, and Windows 10. I think the problem is brave, by what I can read.
I attach the whole project folder in .rar. It's open source, I thought in giving it for beginners learning because it's not a big game.

---------------------------------------------------------------------------------------------------------------------------------------
Warning: Detected "Microsoft Corporation GDI Generic" OpenGL implementation
The current OpenGL implementation is not hardware-accelerated
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.0 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
---------------------------------------------------------------------------------------------------------------------------------
I would appreciate any help to solve this
Thank you in advance
Pablo
PS I removed the runtimes folder from the .rar, for it to fit in limit size, you should add files csfml-graphics.dll and those in the .net8.0 folder.

8
Hi Rogl

Always it is a bit complicated to deal with trigonometry. I made a little sample of your game for you, which I attach. I hope you can translate from C#(C Sharp) to C++(C plus plus).  :)

Here's a video of me playing your game. It's missing to add the enemies, I leave that to you!  ;)



Regards
Pablo

EDIT: You say your player image is size (32, 16) and you set origin to (0, 8); Why not to (16, 8)? Wouldn't that be causing problems?

9
Hello, IsDaouda

Thank you very much for your feedback! I really appreciate it, more coming from you, that I know you are one of the best developers here.

I hope I'll be finishing World 3 soon!

Regards
Pablo

10
Hello, ladies and guys of the SFML Community!

World 2 is already designed and added to the Super Mario Brothers Fan Game.

Download link: https://www.dropbox.com/scl/fi/3cpk1sbb0lh5xd2a7958l/Super-Mario-Brothers-Fan-Game.rar?rlkey=whmd0tnky48rds7ps8v35b1vs&dl=0

Here I give you some videos of me playing some World 2 levels:







I hope you enjoy the game. World 3 coming soon!

Happy new year 2024 for everyone!
Regards
Pablo

11
Hello, ladies and guys of the SFML Community!  :)

Hoping you are all fine, I'm happy for coming here again, to present you my very very much improved Super Mario Brothers Fan Game. It has been developed with the C# (C Sharp) language, Microsoft .Net, Visual Studio 2022, and the SFML.Net. Maybe some of you remember my previous presentations of my Super Mario Bros. game, but this time, if you are one of those members, you won't recognize it; playability, physics, player and enemy attitude, level design and art, are very much improved, new enemies and power ups are added, and scenery objects (such as water lakes), background effects, and too many details (such as conducting by pipes) were fixed and retouched. This renovated game is mostly for those fans of the Super Mario Brothers, and for everyone who wants to have fun for a while, in general.

Here I give you some videos of me playing some game levels:







By now, you can only play the World 1, the other seven are not yet designed. You know, designing good levels takes some time; for that, I used my own developed (WinForms) level editor. World 2 coming soon!

Here is the download link:
https://www.dropbox.com/scl/fi/3cpk1sbb0lh5xd2a7958l/Super-Mario-Brothers-Fan-Game.rar?rlkey=whmd0tnky48rds7ps8v35b1vs&dl=0

I would accept and appreciate any kind of advice, critics, bug or error reports, tips, or any feedback or suggestions on how to get the game better. Ideas would be welcome, mostly in what is conceptual, not in the programmatic because now the project is not open source (Sorry).

There is something, maybe very interesting, which might be very much improved in the game: the graphics. As some members may remember, I just take graphics from the Internet for the game, I'm not an artist, just a programmer; You can hit me for that! Yeahhh! As someone did some time ago the last time I presented the game. The matter is I remember having read some time ago here in this forums that maybe some members (who are artists) could contribute with better graphics and sound for free, just for being credited in the game. So, if there is anyone who would like to, please contact me.

I hope you like the game. World 2 levels and the other ones will be coming soon.
 
For the last, I don't mind personal comments, but please, if you do, make them positive and constructive.
For the very last, please, forgive my English, I'm not a native speaker.
For the very very last, I want to thank Laurent and the SFML Team for SFML and, especially, the SFML.Net creator and maintainer. It is very important and nice that you were and you are there working for us, for we being able to make our games in a fast, efficient, and easy way. Thank you!

Thank you for reading.  :)
Best regards
Pablo Marty
Buenos Aires, Argentina

12
Audio / Re: "SFML.Audio.pdb was not loaded" message when app crashes
« on: November 24, 2023, 12:44:37 am »
I did what you told me, eXpl0it3r, I enabled native code debugging and also I fixed my MusicManager class that it was missing Music.Dispose() calls. It seems that now the Exception/error has disappeared.
Thank you very much for your help.  :)
Regards
Pablo

13
Audio / Re: "SFML.Audio.pdb was not loaded" message when app crashes
« on: November 20, 2023, 10:49:18 pm »
Hi eXpl0it3r
Sorry, I forgot to say: I'm using Visual Studio 2022, the C# language, Microsoft .Net, and SFML.Net. I'm not building SFML myself, I have the .dll files (downloaded directly, you know, using .Net and VS is much easier than C++ and other languages and IDEs) all in the same folder than the .exe, they are SFML.Audio.dll and csfml-Audio.dll and all the other ones like that. I don't know if there is an exact part of the code where the Exception/error occurs (or I would never be able to find it, the code is huge, it is a complete Super Mario Bros. game), but, although there was, how can it be that for some course of the program execution it does not produce the error and then past certain time it does? It has no sense. May it be a memory problem or something like that? I don't remember having had this issue before. But, I repeat, this happens very few times. Should I care about the .pdb file, or not and just having the DLLs as I have?
Again, thank you very much for your help.
Pablo

14
Audio / "SFML.Audio.pdb was not loaded" message when app crashes
« on: November 18, 2023, 02:49:25 pm »
Hello, ladies and guys from SFML community!
Currently I'm finishing the last details of my Super Mario Brothers fan game (which will be presented soon in the SFML projects subforum), and very few times it crashes with the message "No se cargó SFML.Audio.pdb" ("SFML.Audio.pdb was not loaded"). If anyone of you could help me to solve this issue, I would thank you very much. I imagine that this might not be strictly an SFML issue, but, anyway, I know there are many people in this forum whose knowledges are much higher than mine and surely they can help me. Thank you!
Regards
Pablo

15
General / "AccessViolationException" when my game ends, SFML.Net, C#
« on: October 06, 2020, 10:33:17 pm »
Hello Ladies and Guys from SFML

My "wonderful" game I'm currently working on (about Super Mario Bros. - much better than before ones) throws an AccessViolationException when I quit the application. I'm using SFML.Net, C#, on Windows 7 64 bit.

Could someone tell me what could be the causes of this, on what SFML is concerned? I think the cause must be an SFML object. The Debugger doesn't show me the part of the code that produces this Exception.  :(

I'll be posting the game in the projects forum when I finish designing levels ... and solve this issue.  :)

Thanks in advance
Pablo
PS: Note I didn't use the word "poor".  ;)

Pages: [1] 2 3 ... 16
anything