C++ :: Making A Space Game Using SFML 2.0?
Sep 14, 2013i am making a space game using sfml 2.0. i want it to move depending on its rotation. so if it is rotated 20 degrees it move in the direction it is facing. how do you do it?
View 17 Repliesi am making a space game using sfml 2.0. i want it to move depending on its rotation. so if it is rotated 20 degrees it move in the direction it is facing. how do you do it?
View 17 RepliesI'm trying to make a menu object in SFML. So far all I've added is the ability to add buttons with text inside of them. I store the buttons in a vector and then loop through that vector to draw the buttons.
The error stems from line 24 of the 2nd piece of code.
Here's what I've got:
//MenuTest.h
#include <SFML/Graphics.hpp>
#include <string>
#include <vector>
class Menu1 {
class Button1 {
sf::RectangleShape body;
[Code] ....
This causes an error at the line window.draw(text); in Menu::Button::drawButton(). With the error "Access violation reading location (some memory address)".
Everything up to trying to draw the text works fine.
I'm currently working on a 2D space shooter game in C++ using SFML library. What I need to know is how make an object (ex:laser) fire up from object (ex:player) when a user press button??
View 1 Replies View RelatedI'm really new to SDL and i've been trying to make a spaceshooter game, so far I've got a ship you can move around in using the arrow key (square shaped) and a scrolling background. I'm up to making my ship fire bullets at the moment and it's really not working, i've finished lazy foo's tutorials on SDL and there's nothing on this.
Here's my code
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_mixer.h"
#include "SDL_ttf.h"
#include <string>
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
[Code] .....
Here's my game, what do I need to learn to make a basic GUI? (Easiest way possible for now).
--NOTE, the code was a bit too long for me to post. I can add it if it is necessary. Basically all I want are 4 buttons on the main screen, one that says "Arena," "Store," "Stats," and "Exit."
There will of course be sub menus to each option, but we will get to that later.
I am making an open world RPG game. I have already done the graphics rendering (with directx 11 on windows 8). I am a bit confused of how to load all of this data in, and I looked into how the game Skyrim did it. I didn't find much information about it at all, apart from it uses cells for each bit of the game, and if you character were to kick a pumpkin (for example) it would record the new location in the player's save file. The same goes for spells, perks, quests, etc.
My problem is, I'm not sure how to implement something similar in code!
Making/Building 3D Game Engines, Do I need to know anything related to ART or graphics in order to make them ? I mean, I do know that having a know how about vectors is VERY important, But I am no good at art, I suck. I have thought of getting a separate guy to do the art, as I'm more interested in writing code and then implementing it making use of the art that has been made, I'm just worried if I need to or not need to know anything about sketching or art in order to write a 3D Game engine ?
View 8 Replies View RelatedI have a sword(25 damage), spear(20 damage), arrow(15 damage), dagger(10 damage) and knife(5 damage). I want to make a class for them so that I can equip one of them in battle and use them to inflict damage.
View 1 Replies View RelatedI'm trying to make a very simple game in SFML, and i have a problem. Whenever i try to create sf::Sprite for the class where all properties of Player (his sprite, health, speed, etc.) It gives me error.
#include <sfml.h>
#include <list>
class Playerclass{
public:
int xspeed, yspeed;
float health;
sf::Sprite entsprite();
[Code] ....
The error is with player.entsprite.setTexture(texture) : "'player.Playerclass::entsprite' does not have class type".
I'm working on my first video game. So far I have a few classes in the game starting with the Game class which includes a list of GameObjects (another class). There are several classes that inherit from GameObjects used to implement things like bullets, explosions, various enemy types, etc.
The game essentially iterates through the list of GameObjects to update/render them. I would like to provide access to the Game's list of GameObjects inside another class (like the Bullet class) so I can put new objects on the list. For example, when a bullet hits, I want to add an explosion to the Game's GameObject list it can be updated/rendered.
How this should be setup? I was considering adding a pointer to the Game or GameObject list to the GameObject class (and methods to access it), but I was wondering if there is a better way to set this up?
I would like to make a program for calculating the total price of a game station, and a game. I made a program like this for just the price of a game in class, but I want to make one that does the game system as well.
View 7 Replies View RelatedI use visual studio 2012. When I asked what I should use in order to put graphics into my program, I was told by the community that SFML works well. My only problem is that now I have SFML, where and how do I unpack it?
View 6 Replies View RelatedHow to change what the cursor is in sfml 2.0?
View 1 Replies View Relatedso im trying to make a blinking cursor to give it a terminal feel, but it is speradic, since it is going at cycles instead of seconds. how can i fix this?
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow App(sf::VideoMode(900, 750), "Fuck it. Uploads Happen.");
sf::Font
Font;
[Code].....
So I have the following code using [URL] ..... It compiles correctly, but does not display the map on the screen. Is it an issue with my code or an issue with the map file itself?
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <level.h>
int main(){
sf::RenderWindow window(sf::VideoMode(640, 480), "");
[Code] ....
using SFML in visual studio 2012 ... this code gives blinking window.
#include<iostream>
#include<SFMLGraphics.hpp>
using namespace std;
sf::RenderWindow window (sf::VideoMode(800,600),"GAME");
[Code]....
How to make a red and black tree using SFML ....because i really need...I really don't know how to use SFML i only know how to use win32 console.
View 3 Replies View RelatedI want to change the alpha of a sprite without changing any other colours
View 4 Replies View RelatedSo this is my first try animating on my own, without a reference right in front of me. It's not working, I did check some of the projects I've made in the past, but for one those were done with Allegro, and really it should be able to move over to SFML quite easily, but it's not. It does display on the window in the correct place, but there are 3 pictures in the file and I want it to cycle through them, but it shows all three at the same time, and it only works once. if I press space a second time, only one of the pictures shows up, and it doesn't cycle at all. Here is my .cpp file :
#include "headers.h"
#include "SwordSprite.h"
int top = 0;
int left = 88;
int right = 132;
int bottom = 35;
SwordSprite::SwordSprite() {
[Code] .....
I am having trouble setting up SFML 2.1 to run with the eclipse IDE for c++ development. I use MinGW for my compiler.
When I link my include folder, lib folder and dll's it will not run a simple SFML program.
I wrote some Code with SFML c++ and OGL that should display a rotatable Cube ....... it doesnt .. WHY?
#include<SFML/OpenGL.hpp>
#include<SFML/Graphics.hpp>
#include<iostream>
void display();
void specialKeys();
[code]....
I have the code and it compiles fine but it doesn't work. (i am using the coding made easy sfml 2.0 tutorials)
Code:
#include <SFML/Graphics.hpp>
#include <iostream>
#include <algorithm>
#include <vector>
class Player {
public:
sf::Sprite player;
[Code] ....
I have screen scrolling working but i want to have text scroll with the screen. because at the moment my player moves and the screen scrolls but the text doesn't.
View 15 Replies View RelatedAny way in sfml of changing the font style and/or size used in the window title for RenderWindow?
As a secondary point - can the colour and size of the title bar itself be changed?
So I did read, however it said also that it was memory intensive and I had a question... I also came across this:
Window.pushGLStates();
Window.draw("Sfml Text");
Window.popGLStates();
The problem here is that none of these commands exist!
Window.draw should exist and even though I have all the proper includes I still get it telling me that 'Draw' is not a member of sf::Window
I have encountered that error many times everywhere across my sfml related code, it's not like they removed all those features in the update (Which they did not) but, why then would it not be a member?
How can i made a Drop down list in SFML ? This drop down list contains names of different animals...
View 10 Replies View Related