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 ... 12
16
Programming / Re: Roguelike timing systems.
« on: June 30, 2012, 06:50:03 AM »
Stop using grid based movement

17
Programming / Re: Debugging and other helpful things
« on: June 01, 2012, 10:29:28 AM »
Um... is there really a reason to write a human-like AI instead of passing some predefined actions to the player controller in a specific a scenario?

Once you change a single part of the AI to match for a specific solution you can't guarantee that all other cases are not touched - but that is just my opinion.

i prefer the following:

Code: [Select]
@Test
public void shouldTriggerIfPlayerStartsThereButMovesBackAndForth() {
Game testGame = Game.newGame(database, new GameBuilderTestImplementation(false, 0));

Entity player = testGame.getPlayer();
CustomController controller = new CustomController();
controller.addAction(new IdleAction());
controller.addAction(new MoveAction(-1, 0));
controller.addAction(new MoveAction(1, 0));
                controller.addAction(new OpenDoorAction(1, 0));

player.setController(controller);

LocationTrigger toAdd = new LocationTrigger(testGame);
toAdd.setLocation(new Point(2, 1));
toAdd.setActivateCallback(new ActivateCallbackImplementation());
testGame.getCurrentZone().addTrigger(toAdd);

testGame.getLoop().rebuild();
while (testGame.step())
;

Assert.assertEquals(true, wasTriggered);
}

18
Programming / Re: Debugging and other helpful things
« on: May 13, 2012, 12:05:08 PM »
I'm mostly using logs and unit/integration-tests. Of course sometimes i have to change the tests since gameplay changes.

19
I willingly sacrifice control for productivity-- I don't really want to deal with pointers or memory management. I like code-completion and every form of spoiling that Java developers are used to.

Some time ago i really liked messing around with lots of languages like Vala, D, OCaml and so on. But now i'm feeling really tired und lazy, so i keep working with java. Every now and then i'm thinking about using c++ again, but i don't want to work with header files and pimpl-idioms... don't want to talk about compile times in c# / c++ / c ... background compilation ftw. I wanted to try haxe - but where are my refactorings?

Maybe you should just stick with java as i do if you're as lazy as me :-)

Edit:
Since you want to try haxe maybe you can tell me if the tool/ide support is getting better.

20
Programming / Re: Java RL tutorial!
« on: March 11, 2012, 03:52:02 PM »
Its really boring; thats just another tutorial like any c ones, isn't it?

21
Programming / Re: dev blog for android roguelike
« on: March 11, 2012, 03:21:18 PM »
Okay; i was not aware of that. I tried it again and its not intuitive for me either. If i move up and swipe to the right i was assuming that my direction changes to top-right instead of right only.

I would prefer to press anywhere on the screen to get a virtual (invisible) d-pad with the center-point on the location i clicked. Anyway, nice presentation.

22
Programming / Re: dev blog for android roguelike
« on: March 11, 2012, 09:51:36 AM »
Tried it; Gameplay is way too slow, i hate waiting for the battles to be over. Swipe to move is imho very cumbersome but the presentation is fine so far.

23
Other Announcements / Re: 7DRL - web vs. native vs. ssh?
« on: March 06, 2012, 04:54:02 PM »
I prefer a native executable or a flash/java game - though android is much more preferred by me :-)

24
Programming / Re: Code sharing
« on: September 05, 2011, 04:38:24 AM »
Is there a reason you are not going from -5 to 5? Anyway; i'm impressed you both are sharing some of your bad code. SCNR.

25
Programming / Re: Automated testing
« on: September 01, 2011, 02:41:58 PM »
Well yeah; unit tests may be overkill but i write them just for exercise. For example a test which checks that a trigger is activated after the player left the tile and reenters:

Code: [Select]
@Test
public void shouldTriggerIfPlayerStartsThereButMovesBackAndForth() {
Game testGame = Game.newGame(database, new GameBuilderTestImplementation(false, 0));

Entity player = testGame.getPlayer();
CustomController controller = new CustomController();
controller.addAction(new IdleAction());
controller.addAction(new MoveAction(-1, 0));
controller.addAction(new MoveAction(1, 0));

player.setController(controller);

LocationTrigger toAdd = new LocationTrigger(testGame);
toAdd.setLocation(new Point(2, 1));
toAdd.setActivateCallback(new ActivateCallbackImplementation());
testGame.getCurrentZone().addTrigger(toAdd);

testGame.getLoop().rebuild();
while (testGame.step())
;

Assert.assertEquals(true, wasTriggered);
}

They are somewhat essential for persistence because i simply have a unitttest which checks that gamestates are equal after saving/loading. And running a predefined scenario in less then 10ms is worth it instead of manually proving that everything works.

Code: [Select]
@Test
public void shouldBeTheSameGame() throws SQLException {
database.getDatabase().open();
// given
Game toStore = Game.newGame(database, new GameBuilderTestImplementation());

BaseEntity player = toStore.getPlayer();

// when
Game.saveGame(toStore, database);
Game reloaded = Game.loadGame(database, null);
database.getDatabase().close();

// then
Assert.assertEquals(player.getId(), reloaded.getPlayer().getId());
Assert.assertEquals(player, reloaded.getPlayer());
reloaded.testCompareTo(toStore);

}

A neat way to make sure that compatibility and upgrade path for save games work.

26
Early Dev / Re: Warhammer 40000: The Roguelike
« on: August 31, 2011, 01:07:05 PM »
Leider ist dieses Video, das Musik von SME beinhaltet, in Deutschland nicht verfügbar, da die GEMA die Verlagsrechte hieran nicht eingeräumt hat.
Das tut uns leid.

Translation:
I'm not allowed to watch this because it contains music from SME. Don't want to use a slow proxy, maybe you could upload without music? :-)

27
Early Dev / Re: Warhammer, WH40k or Underdark?
« on: August 29, 2011, 05:56:56 AM »
I have read the GW licenses and they did not seem as harsh as I though they would. They have a lot of IP and it is well worth protecting that, but as long as I give credit to GW and don't infringe (too much) on there IP I should be safe. They do encourage their fans to spread the word far and wide, as long as their trademarks remain intact and IP are not challenged. We will be safe as long as they don't intend on making a tile-based roguelike at any stage in the near or grim dark future distance future, that is!

Thats one side; the other side are big companies which have baught a license from GW. The people at "teardown" e.g. surely met the dark side of ip, and i've not seen any space hulk games lately. Maybe you are lucky.

Dark Angels 1st company is ready to kick ass any troublemakers ;-)


28
Early Dev / Re: Warhammer, WH40k or Underdark?
« on: August 28, 2011, 06:42:51 PM »
I guess you get a great fanbase by making a wh40k roguelike. I had stopped all my wh40k 'fangame' efforts (star-quest and space-hulk, for gp2x http://www.youtube.com/watch?v=ImSdcIhbbZg ) since some trouble of fellow gamedevs which were forced to stop their games - though i had always wh40k inspired roguelikes in mind :-(

Anyway, i hope to see a release and i hope noone from games workshop forces you to stop it.

29
Programming / Re: What rpg system are you using?
« on: August 16, 2011, 07:38:32 AM »
I guess the topic is too wide-ranging and too individual for an answer. As for me, i'm doing the 'evolutionary', stats come and go, combat is tweaked every now and then.

30
Quote
In C++ I would probably use a helper function to determine if a point is in an Area of Effect.  But that would be hard for Java.
E.g bool isInAreaOfEffect(AreaOfEffect area, Point reference);
Because I dont believe it is the AreaOfEffect class's job to determine that.

I agree with this.  In my rewriting I created a little class that contains public methods like your bool isInAreaOfEffect(AreaOfEffect area, Point reference).  I do come from C/C++ and I really dislike Java's everything must be a class idea.  Most of my distance from Point to Point, Monster to Player, line of sight methods will be in this little class. 

I strongly disagree.

Well; _distance_ calculation should be the responsibility of a point class, right. But with some static methods like "isInAreaOfEffect(AreaOfEffect area, Point reference)" you are going the wrong way.

Instances of ConeAreaOfEffect, Square..., Circle... should calculate that - discard the enumerations, polymorphism is the way to go. By using enumerations you end with ugly switch case statements.

If you add another area of effect, do you really want to change multiple code locations?

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