Results 1 to 10 of 10
Like Tree2Likes
  • 1 Post By SurfMan
  • 1 Post By chaucer345

Thread: Game applet tester request

  1. #1
    chaucer345 is offline Member
    Join Date
    Dec 2012
    Posts
    44
    Rep Power
    0

    Default Game applet tester request

    Hello All!

    So, I've been hard at work for an extended time on a text adventure based on my MLP fanfic The First Prince, which can be found on Equestria Daily. It's said that you are the worst possible person to test your own game, so I thought it would be a good idea to get comments on an early (prealpha, or whatever the proper name is) build so I can make sure I'm not coding myself off a cliff.

    I'm looking for comments about:

    Runtime (I still don't know how long it takes to get from start to finish in this build of the game)

    Bugs (I know there is at least one path in the game that completes the current main quest, but I'm not sure about the alternate paths)

    Story (If something seems too darn weird or boring, just tell me)

    General Design (different colors, more ascii artwork)

    Anything else you can think of.

    Again, it should be noted this is a very early build. Not only does it stop in the middle of the game's story, but there are a lot of typos and likely a lot of bugs to iron out. If you're interested in seeing how the text adventure turns out long term and are looking to play a more finished, polished product, I would recommend waiting until a later build to play through it.

    Note, this is based off a dark fanfic, viewer beware. The game is not likely to be higher than pg-13 rated though

    If an error message appears, that's just because I'm currently using the old style of calling an applet. Just click the play button and I think it should work, I've attached the source code if anyone wants to play it by compiling it in Eclipse or something.

    I would really appreciate any comments at all, including if the link won't load (I fear the website may be one of my major technical problems).

    The current build of the game can be found here:

    http://firstprincepr...rg/Wounded.html

    I hope you find it fun!
    Attached Files Attached Files

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Game applet tester request

    Moved from Java Applets

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    947
    Rep Power
    2

    Default Re: Game applet tester request

    Server not found
    Firefox can't find the server at firstprincepr...rg.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Game applet tester request

    Quote Originally Posted by SurfMan View Post
    Server not found
    Firefox can't find the server at firstprincepr...rg.
    A fitting result for a copy-paste crossposter.
    Need Help Testing My Game - Creative Resources - MLP Forums

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    947
    Rep Power
    2

    Default Re: Game applet tester request

    I like the idea. I would advice you to download a Commodore 64 emulator and download some text based adventures. You might get some inspiration from there...

    Now for the comments:
    1) When I enter 1 and press enter nothing happens (besides the textfield growing one line)
    2) When I then press the Choose button, I get a "Not a valid choice, choose again:" message. That keeps popping up until I delete all the extra enters.
    3) If this is a text adventure, I would expect full keyboard input. Grabbing the mouse to input any answer is out of the question.
    4) I got the feeling all I can do is put in numbers. When I am in the clinic, I want to open the cabinet. Typing "open cabinet" apparently not a valid choice.
    5) My inventory shows 1) Healing potion. At the same time I have to enter 1 to exit the clinic. I am now confused I will use the potion when typing 1.

    In conclusion, looking at your sourcecode, I think you will have a problem expanding the game in the future. If you have thousands of story lines consisting of if (input == 1 && internalTime == 1) and the likes, then you're heading for disasterous, unmaintainable code. You should go for a more OOP appraoch to make this work.

    For example, this part where you print the inventory:
    Java Code:
    		newText = newText + this.location() + "\n\n INVENTORY:";
    
    		if (healingPotion) {
    			itemCount++;
    			newText = newText + itemCount
    					+ ") Healing Potion (Sets Health to 10)\n";
    		}
    		if (halfHealingPotion) {
    			itemCount++;
    			newText = newText + itemCount
    					+ ") Half Healing Potion (Sets Health to 5)\n";
    		}
    		if (shieldAmulet) {
    			itemCount++;
    			newText = newText + itemCount + ") Sheild Amulet (Out of Power)\n";
    		}
    		if (letterOpener) {
    			itemCount++;
    			newText = newText + itemCount + ") Letter Opener (Dull)\n";
    		}
    		if (scalpel) {
    			itemCount++;
    			newText = newText + itemCount + ") Scalpel (Dull)\n";
    		}
    		if (helpingHoof) {
    			itemCount++;
    			newText = newText + itemCount + ") Hard Knock's Strength\n";
    		}
    		if (glowLamp) {
    			itemCount++;
    			newText = newText + itemCount + ") Glow Lamp\n";
    		}
    		if (mushroom) {
    			itemCount++;
    			newText = newText + itemCount + ") Mushroom\n";
    		}
    Here's a very, very rudamentary example of the above in OOP. This is cooked up in 5 minutes with much detail (it's your game anyway), but it should give you an idea what is possible.
    Java Code:
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    
    public class Inventory implements Iterable<InventoryItem> {
        private List<InventoryItem> items;
    
        public Inventory() {
            items = new ArrayList<InventoryItem>();
        }
    
        public void addItem(InventoryItem item) {
            items.add(item);
        }
    
        public int getSize() {
            return items.size();
        }
    
        @Override
        public Iterator<InventoryItem> iterator() {
            return items.iterator();
        }
    }
    
    
    
    package game;
    
    public abstract class InventoryItem {
        private String name;
    
        protected InventoryItem(String name) {
            this.name = name;
        }
    
        public String getName() {
            return name;
        }
    }
    
    
    package game.items;
    
    import game.InventoryItem;
    
    public class HealingPotion extends InventoryItem {
        private int healAmount;
    
        public HealingPotion(int size) {
            super("Healing potion");
            this.healAmount = size;
        }
    }
    
    
    package game;
    
    import game.items.HealingPotion;
    
    public class Game {
    
        public static void main(String[] args) {
            Inventory inventory = new Inventory();
            inventory.addItem(new HealingPotion(10));
    
            for (InventoryItem inventoryItem : inventory) {
                System.out.println(inventoryItem.getName());
            }
        }
    }
    As you can see, you now have an Inventory object which takes InventoryItems as contents. Once you decide to introduce a new item, it can automatically be added to your Inventory without running through 2000 lines of code making adjustments.

    Same goes for game logic. Try to find all verbs and create objects of those. This approach doesn't work all the times obviously, but it will get you a long way. For instance, Game, Scene, Player, Enemy, Room. A Game has Scenes. A Scene has a next Scene, or multiple next Scenes. Player has health, and an Inventory. Player meets Enemy with a certain strength and weapon. (Possible fields are in italic).

    Try separating all the game objects ("The Model") from the way they are displayed ("The View"). Also, don't put any game login inside a Model, but create specialized classes for that ("The Controller"). When you do that, you can later create a nice graphical game (a new view) without ruining the original models. Google for Model-View-Controller in Java. That should keep you busy for a while.

    Let us know how you progress, and how we can help.

    Cheers!

    SurfMan
    Last edited by SurfMan; 06-29-2013 at 09:32 AM.
    Fubarable likes this.

  6. #6
    chaucer345 is offline Member
    Join Date
    Dec 2012
    Posts
    44
    Rep Power
    0

    Default Re: Game applet tester request

    Quote Originally Posted by DarrylBurke View Post
    A fitting result for a copy-paste crossposter.
    Need Help Testing My Game - Creative Resources - MLP Forums

    db
    I was unaware looking for help in multiple locations was considered evil.

    Also, hello there fellow brony!

  7. #7
    chaucer345 is offline Member
    Join Date
    Dec 2012
    Posts
    44
    Rep Power
    0

    Default Re: Game applet tester request

    I'm trying an experiment, could you try accessing the page I created first by going to:



    http://firstprincepr....heliohost.org/



    and then clicking on wounded.html from the list. I'm not sure why, but that seems to work pretty well for me.

    Note, I have made this suggestion in other forums where I'm requesting help. I'm just letting you know, because it's apparently a bad thing to do that.

  8. #8
    chaucer345 is offline Member
    Join Date
    Dec 2012
    Posts
    44
    Rep Power
    0

    Default Re: Game applet tester request

    Quote Originally Posted by SurfMan View Post

    Same goes for game logic. Try to find all verbs and create objects of those. This approach doesn't work all the times obviously, but it will get you a long way. For instance, Game, Scene, Player, Enemy, Room. A Game has Scenes. A Scene has a next Scene, or multiple next Scenes. Player has health, and an Inventory. Player meets Enemy with a certain strength and weapon. (Possible fields are in italic).

    Try separating all the game objects ("The Model") from the way they are displayed ("The View"). Also, don't put any game login inside a Model, but create specialized classes for that ("The Controller"). When you do that, you can later create a nice graphical game (a new view) without ruining the original models. Google for Model-View-Controller in Java. That should keep you busy for a while.

    Let us know how you progress, and how we can help.

    Cheers!

    SurfMan
    In principle I think that's very good advice, but I've had some serious difficulties implementing that sort of thing in the program, mostly because I'm trying so hard to track user choices. The game needs to be able to know the decision a user made three scenes ago in a different room talking to a different person. Barring some very creative parameter passing, I've found myself attempting the half loaf solution of putting all the different NPCs, rooms, and player stats in one class.

    Do you have any suggestions for how I could use a more object oriented model while still keeping track of all the player's important decisions?

    Thank you for all of your time and efforts! I'll let you know how things continue.

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Game applet tester request

    Quote Originally Posted by chaucer345 View Post
    I was unaware looking for help in multiple locations was considered evil.
    Cross-posting by itself is not bad, but cross-posting without letting us know, well that's inconsiderate. Please consider it from our point of view, that if we spend quite a bit of time trying to craft an answer only to find out that it was already answered hours earlier in a cross-post, and you can get an appreciation of the frustration that this will cause. We're volunteers, we have lives, and would greatly appreciate it if you notify us (and all cross-post sites) of all cross-posts.

  10. #10
    chaucer345 is offline Member
    Join Date
    Dec 2012
    Posts
    44
    Rep Power
    0

    Default Re: Game applet tester request

    ...
    Fair enough. I apologize for not informing you.
    Fubarable likes this.

Similar Threads

  1. Tester
    By Tiger in forum New To Java
    Replies: 1
    Last Post: 02-01-2013, 04:07 AM
  2. Replies: 6
    Last Post: 12-30-2012, 06:39 PM
  3. Load Tester
    By java software in forum Java Software
    Replies: 0
    Last Post: 05-15-2012, 06:44 PM
  4. Question about tester
    By bside in forum New To Java
    Replies: 4
    Last Post: 09-08-2011, 06:37 PM
  5. Http request via applet
    By hoda in forum Java Applets
    Replies: 0
    Last Post: 11-20-2010, 10:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •