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.


Messages - purestrain

Pages: 1 2 [3] 4 5 ... 12
31
Much better, i would skip those empty lines. Your distance calculation e.g. is unecessary long:

Code: [Select]
public double distanceTo(Point otherPoint) {
return Math.sqrt(Math.pow(x - otherPoint.x, 2) + Math.pow(y - otherPoint.y, 2));
}

public double manhattenDistanceTo(Point otherPoint) {
return Math.max(Math.abs(x - otherPoint.x), Math.abs(y - otherPoint.y));
}

Maybe introduce a temporary variable or two in the above two lines.

Skip the enumeration and make discrete classes for cone/circle/square area of effects which share a common class/interface.

32
Ok, personal opinion:

Too much documentation and unnecessary documentation., very bloated. Methods are bloated too, usually distance calculation is made within <3 loc. Is this empty-line thing because of pasting it to a forum or do you have so much empty lines in your original code?

I don't like it.

33
Programming / Re: rl oriented scripting language features.
« on: June 27, 2011, 10:57:57 AM »
That's not even to mention the fact that scripts can be edited and saved while the program's already executing, which also saves you the time of having to restart your application.  Good luck doing that with C/C++, regardless of how modern your IDE is.

I'm not taking any sides here, but I do want to point out that Microsoft's Visual Studio has had an edit-and-continue feature for quite some time...

Which doesn't work under 64Bit-Systems if you don't specifically target 32bit. And compile times are horrible in c#/.net compared e.g. to java =) Its very annoying if you practice tdd.

34
Programming / Re: Slow Attack/Movement Speed
« on: June 16, 2011, 07:14:59 PM »
I would suggest that movement commands are executed after a postduration so they could be aborted. This way a slow monster could counter attack if the player moves adjacent to them. I'm mostly using actions which can be aborted by environmental conditions.

E.g. if you choose an attack which is really hard it takes time and can be interrupted by fast attacks.

Any drawbacks which i'm not seeing here?

35
Programming / Re: Slow Attack/Movement Speed
« on: June 16, 2011, 06:43:32 AM »
Well; if there is a monster that moves faster, why shouldn't there a monster which moves slower? If you can transform into the faster one, then its obvious that others can act only evey two or three turns (in the players point-of-view).

But maybe you can tell my why there is some point-accumulation system necessary? Doesn't an action just take n seconds of time and after n seconds its your turn, regardless of how many other actions occured within that timespan? I can't remember any game where i have actively skip turns because i'm slowed down.

36
Off-topic (Locked) / Re: Warm weather
« on: June 09, 2011, 07:11:36 PM »
You're doomed.

37
Off-topic (Locked) / Re: Alternate Keyboard Layouts
« on: May 29, 2011, 04:46:51 PM »
Hi,

i'm using the neo-layout (http://neo-layout.org/, http://neo-layout.org/grafik/druckvorlage/neo-druckvorlage.png) ; its optimized for german text but handles english equally or even better then qwertz/qwerty imho. The best thing about it:

There is a total of 6 different layers and the forth layer provides numpad and cursor-keys on the main keys.

Greetings
Michael

38
Programming / Re: Handling deaths/corpses
« on: May 27, 2011, 06:35:00 AM »
Hi,

my recommendation: remove the distinction between mobile/item. That makes everything a lot easier. If you can't do this i would propose the second one...

Are you able to pick up a monster like an item und put it in your bag? No? Maybe with workarounds and duplicated code? Then rethink my recommendation ;-)

39
Programming / Re: throwing objects
« on: May 09, 2011, 03:00:55 PM »
You should take the angle of throwing and possible wind speed / directions into account.... maybe it makes the game more fun  ::)

SCNR

40
Programming / Re: developing a roguelike with a functional language
« on: April 26, 2011, 05:46:48 AM »
I did it (Scala) and remember some other roguelikes. Stopped it because IDE-Support was limited and the scala library on android is quite big.

41
Programming / Re: HTML5 RougeLIke
« on: April 08, 2011, 06:36:25 AM »
And the problem is you don't want to add size/count functionality?  ::)

42
Programming / Re: HTML5 RougeLIke
« on: April 07, 2011, 05:48:21 PM »
Code: [Select]
var foo= new Array()
foo["z1"]="x1";
foo["z2"]="x2";
foo["z3"]="x3";

Should work in javascript afaik

43
Programming / Re: RL for Android
« on: April 04, 2011, 06:10:50 AM »
I am working on a sci-fi themed game, targetting a htc hero with android 2.2 (only because of the JIT-Compiler for my phone, would work on everything > 2.0). Currently i'm testing/developing on a htc tattoo (seems not powerfull enough and 1.6 only), htc hero (my device), lg optimus p500 and a archos 70 internet tablet.

What device do you have? Would you mind running some losely coupled tests (e.g. save/load speed) and test the game later on? Savestates could get broken every now and then currently :-(

44
Programming / Re: C# Automatic XML Deserialization
« on: March 31, 2011, 06:57:06 AM »
What is the difference/advantage of your library compared to the already existing one in .net? Afair you could serialize/deserialize almost any objects using some attributes?

45
Programming / Re: OO roguelike design
« on: March 30, 2011, 04:40:12 PM »
Well, thats a good way to go i guess :-) I'm not using a decorator pattern though but i ask for specific components or let the method (e.g. Entity.getActions(Entity inflictor)) loop through each available component.

I'm also delegating the actions to the specific components, e.g:

Code: [Select]
PickupComponent() : AbstractComponent()
{
  Entity host;

  private int weight;
  private int volume;

 ....

  List<EntityAction> getActions(Entity inflictor) {
    List<EntityAction> result = new ArrayList<EntityAction>();
    if (host.getParent().IsCreature())
      result.add(new StealAction(host));
    if (host.getParent() == null)
      result.add(new PickupAction(host));
  }  
}

So basically if the parent of "sword" is a orc, you could steal it.... if it doesn't have a parent you could pick it up. Its way more complex then this simple example.

Edit:
That example is not that good and i did't implement stealing that way... and i modified the first sentence to avoid discussions about the ultimate way

Pages: 1 2 [3] 4 5 ... 12