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

Pages: 1 ... 3 4 [5] 6 7 8
61
SFML projects / Re: Witch Blast (dungeon crawl shooter)
« on: September 07, 2015, 01:41:00 am »
Nice to see that you are still working on this. Awesome job so far ;)

62
SFML projects / Re: pseuthe - casual survival game
« on: July 01, 2015, 02:45:30 am »
I've played for a little bit (thanks Exploiter for the Windows build  ;)).

While the gameplay itself was not my cup of tea, I was really impressed with the presentation: the game looks fantastic, it sounds nice, it runs well, and you even managed to add a resolution option, which is something that I'll always appreciate.

Good job!  ;)

63
Graphics / Re: Transparent Image Help
« on: May 15, 2015, 08:51:37 pm »
Using GIMP, I changed the color mode from Indexed to RGB :)

Does it load now?

64
Graphics / Re: Transparent Image Help
« on: May 15, 2015, 08:11:06 pm »
"arrow.png" is an 8 bit PNG, which are not supported. Transform it to 24 bit and it should work.

Here's a transformed version:

65
Graphics / Re: Scale an image, what's wrong in this code?
« on: May 12, 2015, 07:54:05 pm »
I don't think I fully understand your problem, but you could try drawing your sprite in a RenderTexture and then obtain the image.


// Create the RenderTexture.
sf::RenderTexture renderTexture;
renderTexture.create(200, 200);
renderTexture.clear(255, 255, 255, 255);

// Draw an scaled sprite on the RenderTexture.
sf::Sprite sprite;
sprite.setTexture(someTexture);
sprite.scale(0.5, 0.5);
renderTexture.draw(sprite);

// Obtain the image from the renderTexture
renterTexture.display();
sf::Image myImage = renderTexture.getTexture().copyToImage();

// Then you may save the image on a file.
myImage.saveToFile("image.png");
 

Documentation about RenderTexture: http://www.sfml-dev.org/documentation/2.0/classsf_1_1RenderTexture.php

66
General / Re: Game resolution dilemma
« on: February 01, 2015, 07:49:27 pm »
Like the guys said, yes, the function receives the window size, not the view's. Also, you *should* be calling the function only after the Resized event, but calling it every time you create the view will also work if you are creating the view every frame instead of having it as a member.

Like Hapax said, the viewport values are between 0 and 1, and you shouldn't be using this when creating the view, just use 0 and 0. Remember, when creating a view using a rectangle, the first two numbers indicate the position while the other two numbers indicate the size.

I think something like this should work, and you won't need to call the function after the Resized event because the view is created on the fly:

void UserInterface::Draw()
{
    int viewWidth = _renderService.Window.getView().getSize().x;
    int viewHeight = _renderServide.Window.getView().getSize().y;
    int windowWidth = _renderService.Window.getSize().x;
    int windowHeight = _renderService.Window.getSize().y

    sf::View interfaceView( sf::FloatRect(0, 0, viewWidth, viewHeight) );
    interfaceView = _renderService.getLetterboxView(interfaceView, windowWidth, windowHeight);

        _renderService.Window.setView(interfaceView);
        _renderService.Window.draw(BottomBar);

        (...)
}

I still think that having the view as a member would be better, but whatever :P

67
General / Re: Game resolution dilemma
« on: January 30, 2015, 04:51:57 am »
You need to use the function of the letterbox effect to both your game view and your interface view.  Make sure you are doing that.

I don't think I understand your last code (I'm a little sleepy right now, sorry :D), but I noticed you are getting the viewport of the window view and use that to create your interface view and honestly I don't know why.

The thing is not that complicated: create two views at the start of your program, one for the game and other for the interface, and both should have the same size (your UserInterface class could have its view as a member, and you set its size in the constructor). Before drawing your game stuff you set the game view, and before drawing the interface stuff you set the interface view. Also, don't forget to apply the function to both views when you create them and also when you resize the window. That's it.

Cheers! :D

68
SFML projects / Re: Screenshot Thread
« on: January 14, 2015, 04:32:42 am »
I thought this topic was going to be more popular  ???

Anyway, I'm working on a little open-world shooter, and I'm keeping the graphics very basic. Here's a little screenie, with the blue thing representing the player character.


69
SFML projects / Re: Faux Car
« on: December 03, 2014, 07:52:12 pm »
Nostalgia ... Just remember "Top Gear" :)

Oh man, Top Gear 2. I have fond memories of playing this game with my brother when I was a kid. Also, dat music.




Anyway, interesting project, Hapax, hopefully it evolves into something great... like a Top Gear remake :P

70
SFML wiki / Letterbox effect using a view
« on: November 27, 2014, 01:59:10 am »
Hello.

I added a little code example to archieve a letterbox effect when resizing the window, having black bars on the sides in case the aspect ratio of the window is different than the aspect ratio of the view.

https://github.com/SFML/SFML/wiki/Source:-Letterbox-effect-using-a-view

I was unsure whether this is "wiki material" or not, but I decided to post it regardless. Maybe someone finds it useful.

Any corrections or suggestions are welcome, of course.

Cheers!

Edit: typo.

71
Graphics / Re: Preserve aspect ratio / letterboxing?
« on: November 26, 2014, 01:18:50 am »
Pay attention to this part (as Hapax said) and also on this one. The solution is a combination of the examples shown there, and it's not as hard as it seems ;)

72
SFML projects / Re: A video of a little shooter I made
« on: November 14, 2014, 08:38:14 pm »
Hi AFS,
I've watched the video, it looks like a well done top-down shooter with movement freedom.
How do you play exactly ? Turn right and left, accelerate and brake, and fire ? (Every player enjoys launching bombs on enemy structures  :P)

Hey Cirrus, thanks for checking this out  :P

The controls by default are W,A,S,D plus the left and right click of the mouse, but you can rebind them. You use W and S to change your speed, A and D to rotate left or right, and left click to shoot, pretty straightforward. The "special" part is the right click; when you hold it, you can rotate on your own axis without changing your direction, so you can shoot while going backwards and stuff like that, as seen on the video. If you release the right click you go back to "normal" movement.

Oh, and also you use Q and E to view and switch your current objective. A little yellow arrow will indicate the direction of the objective selected. The actual list of objectives will dissappear after a few seconds, but will appear again if the objectives are updated or if you press Q or E.

I think you could make a fun game with it. Of course, you will need more content (weapons, planes, missions, ...) but the engine and some of the GUI are already done.

Thanks. Yeah, it lacks stuff, this was just a prototype. I wanted to get the gameplay right before starting making content :P

What do you want to do ?

Well, the idea was to make a game were you have your team of pilots that you use to "liberate" (ha!) a country. The thing was meant to be satirical.

You have a list of pilots that are randomly generated, with different stats and stuff, and you send them on missions that are also randomly generated. In the video, the black screen in the beginning (on which you can see your pilots on the left side) was meant to be a map of the country, and random missions pop up on it. However, you can't choose all the missions: choosing one means not being able to pick the other, and each mission offers different rewards and has a consequence on the country, so you need to choose wisely. Heck, you may succesfully complete all the missions you picked and still lose the game, so there was meant to be some "meta" game involved instead of just shooting stuff.

On missions your pilots can scavenge parts to improve the planes once your pilot comes back, but if a pilot dies on a mission, not only you will lose your pilot for good, but also lose the parts that you installed on his/her plane, so you also need to be careful regarding equipment before each mission; you need to think twice before sending a pilot using your best, hard earned equipment on a Very Hard mission.

Oh, and you can abort missions by going to the bottom of the map at any time, as seen on the video :P, although you will fail the mission of course, but your pilot will survive.

The missions were supposed to be randomly generated, but in the video the mission was made "by hand" because I didn't finish the generator (they are hard to make!). In consequence, the mission is very scripted, but I did that on purpose the test "events" (that is, if you finish objective A you unlock objective B, or if you finish objective B you unlock a new area of the map or trigger a cutscene, and so on, as seen on the video). The events work OK, but they have some bugs (for instance, there's a little cutscene halfway through the video that triggers when the song is at a specific time, but one time while testing the song kinda skipped that part for some reason and the cutscene never triggered, thus breaking the mission, and I couldn't replicate the error  :-\ )

So yeah, when it comes to code I think I have almost everything done (poorly, but done regardless), so now I actually need to improve the gameplay and create content, but unfortunely I don't have the time or energy to continue. Maybe in a few years I get motivated again  :P

Thanks for the interest, and sorry for the long answer.

(Tip: use http instead of https on your youtube address to have it embedded)

Thanks, I didn't know ;)




This looks pretty nice and well done :)

I must suggest that you reconsider the player sprite, though. Due to the way it can move, it should not be an aeroplane. They can't fly sidewards or backwards! Maybe a helicopter would work better, although the controls look they are closer to spaceship and thruster based.

Thanks!

Yeah, a normal plane rotating like that doesn't make any sort of sense, but hey, videogames, right?

Indeed, when I got the idea of this kind of "rotating on your own axis while keeping your direction" controls the game was meant to be set in space, using thrusters on the sides, but now I decided to set in on Earth but still test the controls just for fun. Still, this was just a test, because as of now I think the gameplay is not very original. I really want to have some unique feature that makes the combat interesting, but I can't think of anything so I'll just leave the controls like that, at least for now.  ;)

73
SFML projects / A video of a little shooter I made
« on: November 14, 2014, 04:27:55 am »
Hello.

I tried to make a little shooter four months ago, and made some things here and there like randomly generated pilots with different stats, and a level with some scripted events. Most of this was done reusing code from previous projects and making very simple placeholder graphics.

Anyway, I got busy with other stuff and forgot about the project. Only yesterday, three months later, I remembered the thing and decided to make a video of it because I never showed it to anyone and I would really appreciate some honest opinions.



(Watch at 60 FPS if you can ;) )

The idea was to have a list of pilots with different stats and send them on missions, and if they die they die for good, and they gain experience and salvage parts to make their planes better and, well, you get the idea. Hopefully someday I'll finish it, but right now the project is on hold.

Anyway, I would really appreciate some opinions if you have the time, thanks  ;D

74
SFML projects / Re: sfml space invaders type of game
« on: November 14, 2014, 02:19:55 am »
Screenshots doesn't make the game justice. In the screenshots the game looked pretty rough but in motion it looked and felt great, especially with the scrolling background and the particle effects. Good job!

Just a few minor things:

- The enemies are purple and black. With the black background it's hard to tell the black part of the enemies, so they just looked like purple balls. Maybe you should change the color of the enemies a little bit.

- You might want to use a more "universal" way of giving the player instructions, instead of text. Using romanian (or english, or french or whatever) alienates some of the players. You could use symbols to explain the controls, for instance.

- The music still plays if I close the window manually instead of pressing the "x" key, at least on my PC (Windows 7 64 bits)

Anyway, good job, keep it up  ;)

75
SFML projects / Re: Dwell - A Retro Sandbox Survival MMO
« on: October 26, 2014, 02:22:28 am »
The main character reminds me of The Flesh from Action League NOW!





The game is looking awesome. Good luck with the Greenlight!

Pages: 1 ... 3 4 [5] 6 7 8
anything