Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Jun 2007
Offline Last Active Oct 25 2016 04:59 AM

#5300655 Overall Strategy For Move-Semantics? [C++11]

Posted by on 14 July 2016 - 12:07 AM

You could do this by combining Universal References with std::forward if you don't mind adding templates into the mix.


I haven't tested it but something like this should work:

template<class VectorT>
void Function(VectorT&& vData)
    m_vData = std::forward(vData);

If universal references work the way i understand them too, then it should accept both kinds of references, and forward to the assignment operator preserving the reference type.


You could add a static_assert with a is_vector type_trait style check to make sure you get a clean error message rather than the template type mismatch if you pass the incorrect type.


If you'd prefer not to have templates then i'd go with the multiple functions with overloads. it's cleaner for calling code:

object.Function(vDataFromSomewhere); // reference will copy data
object.Function(std::move(vDataFromSomewhere)); // move will move data

#5071362 Code before Art? Is it Possible?

Posted by on 20 June 2013 - 12:15 AM

Many of my gameplay experiments have no real art. I often open paint.net and create a few coloured rectangles of appropriate sizes, and start added descriptive text to the image if neccisary.


You can do the same with 3d, just open a basic 3d editor, make a rectangle around the size of the object you want to represent and save it. The art doesn't need to be intuitive or descriptive for such early work in a potential project and can be easily replaced later once the general gameplay is impressive enough to attract an artist, or to justify hiring one.


You can can also look around royalty free sprite or 3d model websites for content that you can use as more descriptive and appealing placeholder; even if it doesn't directly suit your theme or art style.


Starting a big passion project is fine, so long as you understand that it will take a long time before it becomes something that will be impressive; and that you understand that as you improve and learn more about game design or programming you will likely want to redo a lot of your work(which can be discouraging for some people, as it will feel like the project is just treading water for a long time(years), before you have the skills needed to make any real progress). In forums, a lot of people don't seem experienced enough to recognise this off the bat(or their posts don't directly demonstrate this experiance), so planning such a large project can be detrimental in the long run if they just end up discouraged and put off due to a lack of tangible progress; thus the common replies advising a different mind set/path.


I don't have any advice about an engine for you, most engines you find should be able to do what you want(with a bit of work, very few will support what you want off the bat unless you choose to make a mod rather than a separate application). It'll be more about finding an engine that you can learn quickly and understand well, it's just a tool after all.

#5020968 What Immerses you into an FPS game?

Posted by on 12 January 2013 - 11:04 PM

Controls, the visible interface and consistency are the things that stick out to me most. If I can't make my character do what I want, or if I find my self frustrated with the HUD, or unable to find what I want on the HUD, I'll immediately lose immersion.

Other than that, immersion is all about consistency, if things behave in a consistent way then the game will be immersive, this is true of both game mechanics, and story elements.

Mechanics should be consistent.
If blue keys open blue doors, and I need to get though a blue door, then their better be a blue key around somewhere; if not, then the game needs to explicitly explain the inconsistency though character dialog or some other kind of notification. For example, tell me that we're not going to get though that door, of present an alternate objective that will allow passage.

And Art should be consistent.
IMO realism has the opposite effect toward immersion regarding this, the more realistic the game is, the more things will stick out when something is slightly less realistic(as we cannot make everything look exactly like reality).

#5005580 SFML application on exit dosent return 0

Posted by on 29 November 2012 - 11:07 PM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.

Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

#4989345 Opinions on resetting difficulty+experiencing the same series of overarching...

Posted by on 11 October 2012 - 08:25 PM

I always liked this idea, my favourite episode of the simpsons follows a similar structure. And provides some interesting material for this kind of scenario.

Looking at it through a story-biased lens:

I think the best way to do this kind of thing is to take as much advantage of it as possible. Players should be rewarded for participating in the different views, they should see and experience things unique to their character.

But they should also find things that are not explained from their play through. Thus adding an additional reward for players who are playing a second or third character as they find story clues that only make sense because of their earlier playthroughs. This could even involve events where the player has to contend with the after effects of actions taken by one of the other playable characters(but they wouldn't know that one of the other characters had caused them, unless they had already finished one of the other playthroughs).

And now to reverse everything I've said, A single playthrough should still feel like a whole complete story. So it should have a sense of accomplishment and should leave the player feeling like they resolved whatever story based threats were revealed to their character. Otherwise, while playing all three characters would be rewarding, playing only one would be disorienting and present an story that feels incoherent.

#4870044 Mana++: A RPG Spell Creation Language

Posted by on 07 October 2011 - 03:44 AM

Perhaps you collect statements as crafting materials? Could you imagine: "If can find one more amulet, I have an idea to make my fireballs homing!".

I think it would be cool if the number of lines to execute represented the channelling time(actual lines executed, so all the cases you skip in a switch wont count). It would leave room for players to create more efficient fireballs, could add a whole meta game to spell-crafting(which I suppose is the point of Mana++ in the first place). Plus it'll stop people from writing monolith spells that slow the whole game down.

I think it's a cool idea. Have you seen the 'Scratch' programming language, its has a cool way of visualising control statements so that they're easier to comprehend. You should probably do something similar for your crafting table, so that programming isn't a required skill to play(but still very beneficial).

#4852283 Can someone test my game?

Posted by on 22 August 2011 - 07:40 AM

I get the same issue as your friend, just the sky, sound and the hello world text.

Intel i5 760
AMD Radeon HD 6800
4GB ram
Windows 7 pro x64

#4804652 The Donald has verified that Obama is an actual American

Posted by on 29 April 2011 - 10:47 PM

Why must he be an american anyway? Most countries don't have that requirement. You have probably missed out on a lot of good leaders because, despite serving in your government for a long time, if they weren't born in america then they must be out to destroy your county.

Even if they find proof that he wasn't born in the US, then what. Does not being born in america really matter that much? You have a two tier system here. Those who obtain citizenship aren't really Americans, they're just being allowed to live there? Only 'true' Americans have the right to participate in your government?

Seriously, you guys wonder why the world looks down on you. This whole birth certificate thing is messed up.