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.


Topics - Tigre Pablito

Pages: 1 [2] 3 4
16
General / SetPixel() method throws AccessViolationException (VS)
« on: December 02, 2017, 07:43:48 pm »
Hello Ladies and Guys

SetPixel() method from Image class throws an AccessViolationException in my poor Super Mario Game, and that had never happened before. I tried to think why it happens, and thought maybe it could be because the image which pixels are drawn to is inside a Texture that is currently in use in the game. But why now, if it had never happened before? The issue occurs when Mario hits a block and it remains out of items (coins, mushrooms, etc), that the program stops drawing the "animated" block and draws the empty hard block (draws on the level image that is in memory) and sets the level hardness attributes of all its pixels to SOLID. And this happens not at the first block, but at the 5th or 6th.

Any help will be appreciated

 

17
Audio / I need Music restarting on an specific offset from 2nd loop
« on: November 12, 2017, 06:10:40 pm »
Hello

Is there an easy way to restart a Music from a specific offset from the 2nd loop?


18
General / Please how to do to run my poor SFML game on a 64 bit system?
« on: November 11, 2017, 09:47:17 pm »
Hello everyone!

I'm now at a friend of mine's place who has a more powerful CPU, and want to make a gameplay video of my poor Super Mario game, but the system is 64 bit. I have already tried running my x86 app with the 64 bit DLLs and the x64 app with the 64 bit DLLs and both fail. It is Windows 10.

Can anyone tell me how to do? Thanks

19
General / Problem with Text class
« on: November 05, 2017, 02:10:06 am »
Hello!

I'm having problems with Text class, I'm trying to use a wrapper to handle writting on the screen easier, and my app frequently ends up with a "Access violation exception: Attempting to read or write from the protected memory. Often this says that there is another memory damaged".

I think remember having read something about this issue a time ago, like that the problem is in the Font.
I'm creating the Font from a Byte[] array (my assets are packed into a file).

I don't know if writting this

Text text = new Text(string, new Font( byte[] array ));

or making the Font as an attribute of the class

Can anyone please help me or tell me where is the answer?
Thanks

20
SFML projects / My last and best Super Mario game version
« on: November 03, 2017, 02:23:53 am »
Hi Ladies and Guys

Now I'm working on a new Super Mario remake, much better than before ones. By now, you can choose from level 1-1 to 2-6. There is better level design, new enemies, and you can choose all of the classic power ups and suits (except the frog suit). The engine is very improved too. In most levels you can go to a bonus level through a pipe (where there's no piranna plant).
It's made with C# and SFML.Net 2.2

Download link
https://www.dropbox.com/s/ueyugzpyktbtrad/Super%20Mario%20Game%20Coded%20By%20Fan.rar?dl=0

(you can take knocked shells with pressing RAlt, and kick it or throw your weapon with RCtrl)

Hope you like it, and feel free to criticize and give feedback

EDIT: It's built for x86

EDIT (Nov-8) UPLOAD: Now there are levels up to 4-4 (?-6 is Kuppa level) ... may I finish 4-5 and 4-6 today or tomorrow

EDIT (Nov-9) UPLOAD: Now game is completed up to 4-6

Pablo
(Bs As)

21
General / How set window focus? SFML.Net
« on: October 31, 2017, 06:24:33 pm »
Hello

How can I focus my window from code? I have to click on it to make it work normally (capture events)

I call window.SetActive(true) after assigning event handlers and before the main loop starts but doesn't work

I'm using SFML.Net 2.2

Thanks

22
Hello Ladies and Guys of the Forum

Is it possible that I have my .EXE (SFML.Net C#) without need that it is accompanied by any DLL? And that my SFML games may run without any changes on both 32 and 64 bit systems?

Another thing: is it possible to choose an image for my SFML forum account from a disk file?

Thanks in advance

23
General / Physics Engine: Box2Dx or what? Please help!
« on: October 21, 2017, 03:35:46 am »
Hello Ladies and Guys,

Could someone tell me what physics engine to use with C# and SFML, and how, or where to look for? I searched and saw very much, but nothing works, by now. I suppose that what there should be is a few nice DLLs, as SFML.Net has, and that's all. Or whatever is needed to be able to use classes of objects for implementing physics in my poor SFML.Net projects. Last I saw is Farseer, someone said it was simpler than Box2D, I tried it (it's really written in C#) but there were over than 2500 errors in a sample project. Again, there aren't any DLL (or I don't know how to find them).

Thanks in advance
Pablo

24
SFML projects / A poor PAC-MAN
« on: October 20, 2017, 03:48:01 am »
Hello, Ladies and Guys of SFML

Here I give you a poor PAC-MAN game I'm writting since a few days ago (or clone, as many members say). But there is (at least) one difference: the mazes are not all the same. I plan to continue with it. Those who enjoy and/or want the code, it will be uploaded soon, cos I have to get it tidier. Any opinion will be appreciated.

download link (it is already built for x86)
https://www.dropbox.com/s/jelzowhfr5bxfrp/PAC-MAN.rar?dl=0

25
SFML projects / Massacre. A poor 2D Space Shooter.
« on: September 27, 2017, 01:01:43 am »
Hello, Ladies and Guys of SFML

Here I give my poor 2D Space Shooter. It's still in development, but works fine. Perhaps those who play it, if they collect available power ups, will guess why I called it Massacre.

Criticism, advice on how to improve the game, questions, and whatever you want to say, will be appreciated. Anyway, please note that some not very important features (such as the options screen) is not finished yet.

The app can be downloaded from here:
https://www.dropbox.com/s/a7wknigdjzg53to/SpaceShips.rar?dl=0

Story of this poor game:
Some time ago, about an year or a bit less, I don't remember exactly, a member of the forums asked for help about how to shoot projectiles from a ship, maybe he/she had been planning some game like Massacre, I don't know. So I hurried to make a little example and post it, but that member never replied so I never knew if my reply was helpful for him/her. The matter is that, from that minimal example (that can be downloaded from here https://www.dropbox.com/s/8qv6s5r6kk826sh/SpaceShips%20before.rar?dl=0) I got enthusiastic and went ahead completing the game





26
Graphics / How to slant (place obliquely) a Sprite or Drawable?
« on: August 20, 2017, 01:30:33 am »
Hi Ladies and Guys

Could you tell me how to slant a Sprite? I suppose it should be something related to the Transform class, but I googled and there's no info. I don't even know if it's possible. If it is, could you give me an example?

Thanks

27
General / KeyPressed Event not firing in SFML.Net C# (with code)
« on: August 18, 2017, 07:40:28 pm »
Hi Ladies and Guys

I did what eXpl0it3r told me in my last post, use Events instead of real time input. For my surprise the Keypressed Event is not working in my MenuBox class. I had never got this issue before. Here is the code. I pass the window reference from the main loop to the constructor.

using SFML.Graphics;
using SFML.Audio;
using SFML.Window;
using SFML.System;
using System;

namespace SpaceInvaders
{
    class MenuBox
    {
        private Text[] options;
        private int y;
        private IntRect board;
        private string title;
        private int chosen;
        private bool returnValue;
        private RenderWindow window;

        public MenuBox(string[] options, int y, RenderWindow window)
        {
            int a;
            this.options = new Text[options.Length];
            for (a = 0; a < options.Length; a++)
            {
                this.options[a] = new Text(options[a], new Font("data files\\fonts\\Arial.ttf"), 30);
            }            
            this.y = y;            
            this.window = window;
        }

        public MenuBox(string[] options, int y, IntRect board, string title, RenderWindow window) : this(options, y, window)
        {
            this.board = board;
            this.title = title;
        }

        public int DoMenuBox()
        {
            int a;            
            this.chosen = 0;
            this.returnValue = false;
            this.window.KeyPressed += new EventHandler<KeyEventArgs>(window_KeyPressed);
           
            if (this.board != null)
            {
                RectangleShape board = new RectangleShape(new Vector2f(this.board.Width, this.board.Height));
                board.OutlineThickness = 6;
                board.OutlineColor = new Color(128, 128, 128);
                board.FillColor = new Color(192, 192, 192);
                board.Position = new Vector2f(400, 300);
                board.Origin = new Vector2f(this.board.Width / 2, this.board.Height / 2);
                Text title = new Text(this.title, new Font("data files\\fonts\\Arial.ttf"), 30);
                title.Origin = new Vector2f(title.GetLocalBounds().Width / 2, title.GetLocalBounds().Height / 2);
                title.Position = new Vector2f(400, 200);
                title.Color = Color.White;
                this.window.Draw(board);
                this.window.Draw(title);
            }
           
            while (true)
            {
                for (a = 0; a < this.options.Length; a++)
                {
                    this.options[a].Position = new Vector2f(400, y + 40 * a);
                    this.options[a].Origin = new Vector2f(this.options[a].GetLocalBounds().Width / 2, this.options[a].GetLocalBounds().Top);
                    this.options[a].Color = new Color(255, 255, 0);
                    if (a == chosen)
                        this.options[a].Color = new Color(0, 128, 255);
                    this.window.Draw(this.options[a]);
                }
                if (returnValue)
                    break;
                this.window.DispatchEvents();
                this.window.Display();
            }
            this.window.KeyPressed -= window_KeyPressed;
            return chosen;
        }

        private void window_KeyPressed(object sender, KeyEventArgs e)
        {
            if (e.Code == Keyboard.Key.Up && this.chosen > 0)
                this.chosen--;
            else if (e.Code == Keyboard.Key.Down && this.chosen < this.options.Length - 1)
                this.chosen++;
            else if (e.Code == Keyboard.Key.Return)
                this.returnValue = true;
            else if (e.Code == Keyboard.Key.Escape)
            {
                this.chosen = -1;
                this.returnValue = true;
            }
        }
    }
}
 

Thanks for your help
If I solve this issue I'll be uploading my poor space shooter to the project forum soon

28
General / How check if "ANY" key is pressed (real time) in SFML.Net (C#)
« on: August 17, 2017, 11:44:21 pm »
Hi Ladies and Guys

I would need to check if "ANY" key is pressed, and if so, then see which of them is; but if no key is pressed, then ignore the "if" block.

I tried with "Keyboard.Key.Unknown" as argument of the "Keyboard.IsKeyPressed()" function, but if always returns false.

Is there any solution for this, that is not checking in the outer "if" block, one by one the possible keys that might be pressed?

The "if" block is into a "while (true) {}" loop, that ends depending on the input (it´s a menu).

29
Hi Ladies and Guys

I'm trying to make a video of my new poor Super Mario Game, so i downloaded Game Cam V2. But if i start it, and then start my game, it crashes immediately with an Exception of the class System.AccessViolationException. When i run my poor game without having started Game Cam V2, it works correctly.

I attach the command window where you can see the Exception that was thrown.
Can anyone send me an idea of how to solve this?

Thanks

30
General / Audio Issue in my new poor Super Mario game? [SOLVED]
« on: June 01, 2017, 10:43:41 pm »
Dear Ladies and Guys of SFML

I'm working on a new version of Super Mario, that has many advanced features, such as the hammer and rakoon suit, and that the assets are packaged into an unique file.

I don't know if this has or not to do with what i'm experiencing with music. It happens, that sometimes while playing my poor Mario game, the music has to change. For example, when Mario takes the invincibility star, so as when its power ends up. Or when you go into a sub level.

I tried using the Stop() method and Play() to (re)start the music, but i got several crashes that hadn't even a letter with the Exception letter informing what was up.
Then I switched to use the Dispose() method and to re instantiate the next Music to be played. Anyway, but less, the crashes continued.

Could anyone please tell me how to handle the Music object correctly?
Thanks in advance

I SEARCH IN THE DOCUMENTATION AND FOUND THE PROBLEM. IF YOUR SOUNDS AND MUSICS GET THEIR SOURCE FROM A BUFFER (NOT FROM A DISK FILE), IT HAS TO REMAIN IN MEMORY WHILE PLAYING

Pages: 1 [2] 3 4
anything