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

Pages: [1]
1
Graphics / Views for online multiplayer
« on: May 05, 2014, 08:33:02 pm »
I was looking at the tutorial for handling views. I tried thinking of how views would work in some games.

In a fighting game online would one player have an advantage if their resolution is larger than their opponent? Say the view is made to be the edge, the player entities can't move outside the view. The view will stay centered between the two player entities unless they move to the edge of the level. The view zooms out slightly as the player entities get further apart but to a certain distance.

Would this cause one player to move off the screen of the player with a smaller resolution or aspect ratio or some other issue?

What are some common issues in dealing with varying view sizes and aspect ratios?

2
General / How to handle config files?
« on: May 03, 2014, 02:45:41 am »
So I've been wondering how to handle config files. I looked through various games' config files. Saw some were .ini others were .xml and some .dat

What I don't understand is when I changed configurations meant for gameplay it wouldn't take affect. I'm not quite sure I understand why. But then there's the setting config files which did work if I changed them.

For example divekick has gems which it has an xml config file for text that appears. But changing the text in that file doesn't change anything. So I'm kind of wondering, what's the point of these xml, ini, dat, etc. files if they don't actually change anything?

GemText.xml
<?xml version="1.0" encoding="utf-8" ?>
<gemText>
        <DiveGem>
                <jumpEffect>+20% JUMP</jumpEffect> <!-- I changed this from +10% JUMP -->
                <kickEffect></kickEffect>
                <meterEffect></meterEffect>
                <bonusEffect></bonusEffect>
        </DiveGem>
        <KickGem>
                <jumpEffect></jumpEffect>
                <kickEffect>+10% KICK</kickEffect>
                <meterEffect></meterEffect>
                <bonusEffect></bonusEffect>
        </KickGem>
        <StyleGem>
                <jumpEffect></jumpEffect>
                <kickEffect></kickEffect>
                <meterEffect>+10% METER</meterEffect>
                <bonusEffect></bonusEffect>
        </StyleGem>
        <ManlyGem>
                <jumpEffect>+10% JUMP</jumpEffect>
                <kickEffect>+10% KICK</kickEffect>
                <meterEffect>+10% METER</meterEffect>
                <bonusEffect>BEGIN MATCH WITH CONCUSSION</bonusEffect>
        </ManlyGem>
        <PumpedGem>
                <jumpEffect></jumpEffect>
                <kickEffect></kickEffect>
                <meterEffect></meterEffect>
                <bonusEffect>BEGIN MATCH WITH 30% METER</bonusEffect>
        </PumpedGem>
        <AdvancedDiveGem>
                <jumpEffect>+20% JUMP</jumpEffect>
                <kickEffect>-10% KICK</kickEffect>
                <meterEffect></meterEffect>
                <bonusEffect></bonusEffect>
        </AdvancedDiveGem>
        <AdvancedKickGem>
                <jumpEffect>-10% JUMP</jumpEffect>
                <kickEffect>+20% KICK</kickEffect>
                <meterEffect></meterEffect>
                <bonusEffect></bonusEffect>
        </AdvancedKickGem>
        <AdvancedStyleGem>
                <jumpEffect>-10% JUMP</jumpEffect>
                <kickEffect>-10% KICK</kickEffect>
                <meterEffect>+20% METER</meterEffect>
                <bonusEffect></bonusEffect>
        </AdvancedStyleGem>
        <ManliestGem>
                <jumpEffect>+30% JUMP</jumpEffect>
                <kickEffect>+30% KICK</kickEffect>
                <meterEffect>+20% METER</meterEffect>
                <bonusEffect>PERSONAL SUDDEN DEATH</bonusEffect>
        </ManliestGem>
        <AdrenalineGem>
                <jumpEffect></jumpEffect>
                <kickEffect></kickEffect>
                <meterEffect>-50% METER</meterEffect>
                <bonusEffect>BEGIN MATCH IN KICKFACTOR</bonusEffect>
        </AdrenalineGem>
</gemText>

3
Graphics / How would I handle displaying cards?
« on: April 01, 2014, 02:25:29 am »
There were a couple things I was wondering. How would someone make a card, like applying the textures and displaying it? I don't think there would be a texture of every single card, that seems inefficient. Let's say for this card from weiss schwarz card game.
http://images.littleakiba.com/tcg/weiss-schwarz/cards/card10699.jpg

I figured something like this would be a shape, maybe something else if it works better. Then a layer of various textures applied. Where the only different texture would be the main image of the card with the rest being the icons. Then text applied appropriately. I'm not sure if that's right or if I'm even on the right track. But also something that has me scratching my head is handling the text boxes. They shrink and expand based on the amount of text. Would that just be stretching or shrinking the texture vertically?
Here's an example of a card with less text.
http://images.littleakiba.com/tcg/weiss-schwarz/cards/card10712.jpg

I'm just using these cards as examples since I like the design of the text boxes and it really maximizes the image.


4
General / What are scenes as described by this article?
« on: January 25, 2014, 12:01:28 pm »
So I knew about game objects, game loop, and cohesion I think. But I didn't know about scenes and I don't quite understand what they are or how they interact with everything based on the article. Could anyone help me understand what scenes are?

http://www.gamedev.net/page/resources/_/technical/game-programming/making-a-game-engine-core-design-principles-r3210

To me it sounds like it has a list of all the game objects that interact with each other. But it doesn't really describe how it does that I think, maybe I'm just missing something in the code excerpt.

Does SFML handle scenes or how would I implement scenes with sfml?


5
Window / GameLoop and checking if window has been closed
« on: October 23, 2013, 02:43:44 am »
How should I handle checking if an event, such as closing the window, has occurred if I also need to be able to go through the game loop?

int main()
{
        MyGame game;
        game.setIsRunning(true);

        sf::RenderWindow gameWindow(sf::VideoMode(MyGame::width * MyGame::scale, MyGame::height * MyGame::scale), "My Game!");
       
        while (gameWindow.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (gameWindow.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                gameWindow.close();
        }
        }
       
        while ( game.getIsRunning() == true)
        {
                game.gameLoop();
        }

        return 0;

If I'm constantly running through a loop while the window is open I'll never get to the game loop until the window is closed. Sorry if this is a stupid question, I'm still new to SFML and game programming in general. Thanks for any advice or help.

6
Audio / No music when trying to call a method from a class.
« on: October 21, 2013, 09:46:25 pm »
So right now I'm trying to get a basic idea of how to set things up.
game.cpp
#include "stdafx.h"
#include "Game.h"
#include "GameMusic.h"

int main()
{
    // create the window
    sf::RenderWindow gamescreen(sf::VideoMode(800, 600), "Legend of Link");
       
        // create texture and sprite
        sf::Texture texture;
        sf::Sprite sprite;

        // play the audio
        GameMusic ingamemusic;
        ingamemusic.PlayMusic();


        if (!texture.loadFromFile("res/graphics/Link.png"))
{
    // error...
}
        else
                sprite.setTexture(texture);

    // run the program as long as the window is open
    while (gamescreen.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (gamescreen.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                        {
                                //music.StopMusic();
                gamescreen.close();
                        }
        }

        // clear the window with black color
        gamescreen.clear(sf::Color::Black);

        // draw everything here...
        // gamescreen.draw(...);
                gamescreen.draw(sprite);

        // end the current frame
        gamescreen.display();
    }

    return 0;
}

GameMusic.cpp
#include "GameMusic.h"

int GameMusic::PlayMusic()
{
        sf::Music music;
        if (!music.openFromFile("res/audio/music/Vengeance.ogg"))
                return -1; // error
        music.setVolume(100);
        music.play();
}

So when I take the PlayMusic() and put it into Game.cpp it runs fine. But when I try to call the method for it to do the same thing it doesn't play the music. Am I forgetting something? I feel like it would be something super simple too.

Pages: [1]
anything