Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Jul 2004
Offline Last Active Oct 25 2016 10:08 AM

#5249163 What do you guys use as a key in RPG data structures?

Posted by on 27 August 2015 - 07:25 AM

Wrapping usually means creating a class that exposes at least one of the same interfaces as the wrapped class does. That wrapper class will hold a reference to an instance of the wrapped class. When you call a method on the wrapper it will perform some additional behavior or modification to the arguments, then call the wrapped class method. The result will be passed back to the original caller, perhaps even being modified also. Wrapping is a way to add behavior to a class without modifying that class. You can pass around the wrapper instead of the wrapped class and consumers of the class will not know any different as long as the wrapped class still behaves in a way that is rational.

A contrived example would be a logging wrapper. You could wrap some class with your logging wrapper and pass that around instead. Your logging wrapper will log before and after any method is called. It doesn't change the result of the call as far as the consumer is concerned, except that it will slow the call down.

#5249087 What do you guys use as a key in RPG data structures?

Posted by on 26 August 2015 - 06:18 PM

An attack is an action, a verb.  You should not model verbs as nouns, or else you end up with anathemata like attack.do(hero, enemy) instead of a more natural hero.attack(enemy).  Attack handlers, attack events, attack objects:  what do those look like in real life?

Modeling your code components after real life, physical objects is, in my view, an antipattern. In a good design some components may conceptually align with an object in the physical world or the simulation you are creating, but whether or not a component correlates with one of those objects should not be a requirement. After all , what does a database transaction look like? What does a file stream look like? What does a dependency injection container look like?

#5248700 What do you guys use as a key in RPG data structures?

Posted by on 25 August 2015 - 12:45 AM

What's wrong with just having strongly typed fields? Will you be inventing new stat types at run time? I think that in the quest to build the I-can-build-any-game-with-my-custom-engine engine people go overboard with the dynamic data structures. That code isn't as reusable as you think it is. And you probably won't want reuse it anyway because you'll find 100 reasons during your first implementation that you'll feel it necessary to build your RPG engine 2.0 from scratch. Also when choosing to go dynamic, you're not taking advantage of the facilities of the c++ language such as static typing that will help you avoid some bugs and enables certain types of developer productivity tools like refactoring helpers built in to Visual Studio.

#5242392 Good Scripting Language for C

Posted by on 24 July 2015 - 07:48 AM

I wouldn't recommend embedding Python either. However if you are going to go the other route of embedding C/C++, Python is a great choice as it has a simple interface to compiled C code.

#5229959 Massive Python Example Script

Posted by on 19 May 2015 - 09:26 PM

Also if someone is going to use this for a reference it should be well indexed. If I need to scan through your mega script for more than 5 seconds to find what I'm looking for in going to google instead.

#5229941 Massive Python Example Script

Posted by on 19 May 2015 - 06:46 PM

It may be more effective to break it up into smaller, more concise scripts that are easier to digest.

#5189002 So many programming positions available...

Posted by on 24 October 2014 - 05:50 PM

I don't know the nuances of the game industry, but I can tell you from the perspective of hiring for business app development. It is very difficult to find good talent. Many applicants simply don't have good software development skills. On paper they look good, but in person they cannot demonstrate or speak to the skills on their resumes.

#5174757 What game companies hire remote programmers?

Posted by on 19 August 2014 - 10:14 AM

I would check Monster and Gamasutra job postings. I wager you'll be limited to mostly indie studios, as larger studios will likely be able to find talent who are willing to relocate.

#5166289 would you create an Android-only game

Posted by on 11 July 2014 - 02:38 PM

No, since there are a few frameworks that enable you to target multiple platforms without too much effort. Marmalade (c, c++, or lua) and Cocoonjs are decent.

#5165256 Communicating "scariness" without openly showing the enemy

Posted by on 07 July 2014 - 08:15 AM

That would be another thing you could do: cause the environment to rot and decay in the area of the monster. Plants shrivel and die, wood rots, paint peels away, metal rusts, etc.

#5165254 Communicating "scariness" without openly showing the enemy

Posted by on 07 July 2014 - 08:11 AM

If the monster is supernatural, you could do something to change the environment depending on how close the monster is. Think Harry Potter's dementors: a local area of effect freeze of the environment. It would be cool if you could use vertex shaders to cause plants to shrivel up and die.

#5157933 WebGL engine?

Posted by on 03 June 2014 - 02:53 PM

What sorts of things have you found to be missing from Three? Is it possible you're implementing features that aren't typically the responsibility of a 3D engine?

#5144440 Estimating the revenue of a mobile game?

Posted by on 04 April 2014 - 03:05 PM

Add up your costs, then multiply by negative one. That's your revenue estimate.

Until you have sales or presales data you cannot possibly extrapolate revenue. There's nothing to extrapolate.

#5142998 Browser-Based Game: Best Language?

Posted by on 28 March 2014 - 10:11 PM

I also must disagree with Karsten about staying away from jQuery. Jquery is very well supported by current AND older browser versions going back to IE 8. If you want prior to IE 8 support that is available too by using the 1.9 branch of jQuery. Its API is the same as the 2.0 branch but with the cruft for crappy browsers left in. Keep in mind that using jQuery electors does incur overhead, so be sure to cache them and to profile when you suspect jQuery might be a performance issue. My experience is that in the few cases when jQuery is a bottleneck, caching selectors or direct DOM manipulation closes the gap. Use jQuery when it helps (95% of the time), and direct dom when it doesn't. Simple.

#5142996 Browser-Based Game: Best Language?

Posted by on 28 March 2014 - 10:03 PM

I recommend JavaScript with node for the server side. All you need is a text editor (notepad++, gedit, etc.).

As far as compatibility, you're OK. All modern browsers support canvas (2D context, not webGL) and JavaScript. The challenge is performance, screen size and input. Three of the four current versions of the popular browsers (Firefox, Chrome, Safari) perform pretty well on the desktop and mobile. Of course IE lags behind but is still OK for all but the most demanding of work, such as fluid Canvas animation.

Obviously the physical size of the screen and whether or not there is a keyboard or other physical input device attached will have a strong influence on how your game will be experienced on different platforms.