Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Jun 2007
Offline Last Active Yesterday, 07:19 PM

Posts I've Made

In Topic: Overall Strategy For Move-Semantics? [C++11]

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

In Topic: Code before Art? Is it Possible?

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.

In Topic: What's your preferred way of letting objects affect the game?

16 February 2013 - 09:24 PM

I've been implementing a Entity Component System and have found it to be very clean and easy to control.

Entity's store data. Controllers are attached to entities and add or alter the entities data(usually after reading it) they also handle events. Observers act on data changes and fire events.

I currently have an explicit controller, that takes the user input and changes the entitys state.
An implicit controller that takes movement states and turns it into actual movement.

An observer that watches entity movement and fires collision events.
and an observer that watches entity positions and animations and sends updated data to the renderer.

Such a system can require some intermediate techniques to set up, but has many advantages. Controllers and observers each only have one task, and so are very simple. Game data is cleanly split from the renderer(and both can be moved to different threads much easier).

In Topic: What Immerses you into an FPS game?

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).

In Topic: What display mode do you play PC games in?

24 December 2012 - 01:30 AM

Fake fullscreen is my preferred mode. I fall back to real fullscreen if my performance is pushing it. Or sometimes go window for slower paced or casual games(so that I can read or youtube while I wait for stuff to happen biggrin.png).

I think that it's perfectly fine to cut support for real fullscreen. So long as you're still supporting multiple resolutions and fake fullscreen/window mode.