Jump to content

  • Log In with Google      Sign In   
  • Create Account

ferrous

Member Since 19 Nov 2013
Online Last Active Today, 11:55 AM

Posts I've Made

In Topic: collision and astar maps, variable entity radius

Today, 11:55 AM

Sounds about right.  You can also have single tilemap of your smallest unit type, but each tile then holds a 'clearance' value.

https://aigamedev.com/open/tutorials/clearance-based-pathfinding/

 

haa-brushfire_tankfail.png


In Topic: When should I use int32_t ranther than int

Today, 11:31 AM

Also correct:

for ( auto i = 0; i < someVec.size(); ++)


In Topic: character creation screens and other learning curve issues

26 September 2016 - 02:57 PM

Yeah, I've always hated having to put points into a skill or stat that I really don't know how useful it will be.  Deus Ex and swimming for example.  There are only a tiny handful of spots where you can swim in the game, it's a mostly pointless skill.  Fallout, if you've never played it before, you have no idea how fast or slow one will get access to Energy Weapons.  It's the same with lots of their skills, it's really hard to determine how much the designer(s) thought of having useful situations for the Science, Repair or Doctor skill  I kind of prefer the learn by doing method, with some minor fudging to let me specifically put points in a skill that I'm not doing because it's too low and a pain in the rear to increase by doing.  


In Topic: MVC understanding

26 September 2016 - 02:47 PM

I don't use MVC for that, I tend to do something where the various HUD elements listen for an "ObjectSelected" event, then when that event is fired, they look at the object that is currently selected (or passed as part of the event), query for the things they are interested in.  (either looking for interfaces or components), and then use that data to update themselves.

 

Ie, your health display, be it a bar, or text like 156/255, would subscribe to OnObjectSelected, when that event is raised, it would query that object for a Health component, if found it would then look at Health and MaxHealth, and update itself to display it appropriately.

 

It does mean that the View needs to know about whatever it is it's viewing, and there isn't much in the way of a Controller.


In Topic: MVC understanding

26 September 2016 - 09:30 AM

Yeah, as Kylotan said, I could see having two instances of a PlayerController, one for each player, but not strictly necessary in a turn based game.  As for tying things together, I like event systems for MVC or MVVM.  So the input/controller changes the model, and then the model raises an event that it's data changed, and the view, which has subscribed to that event, receives the event and updates itself accordingly.

 

Concrete example:  "Players clicks the left mouse button on the mouse"  --> Controller receives that input, translates it into which square was clicked on, and changes the model, which then raises the event for the view.  (Though I have no qualms with the controller also raising events, like for the instance where the user clicked on an invalid square, no data has changed, but you still probably want to play a noise or have the view react in some way)


PARTNERS