Shield High [Fresh Start]

The place to post non-Flash projects such as RPG maker games.
Forum rules
This forum is for posting and collaborating upon third party work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.
When posting content, please consider including a screenshot to help users to see what a game is like.

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon May 27, 2013 1:20 am

BlueLight Wrote:
Pudding Earl Wrote:
BlueLight Wrote:
Code: Select All Code
public void someMethod(){

int redDice;
int bluDice;
Random r = new Random();

redDice = r.nextInt();
blueDice = r.nextint();

   if(redDice == blueDice){
      redDice = r.nextInt();
      blueDice = r.nextint();
   }
   if(redDice < blueDice){System.out.println("Blue Wins");}
   if(redDice > blueDice){System.out.println("Red Wins");}
}




The stacks' been covered, but if you asked me to explain it I wouldn't know how. Like, I get what it is, I get how it functions, generally, but explaining it is...eh. That's mostly lack of confidence and anxiety I've got it all wrong. Garbage collection is as simple as, if nothing is pointing to this object anymore, this object gets removed. Also what exactly is wrong with the code you presented? Lack of practical experience has me wondering where the problem is exactly.


So i'd personally have to look up stack again, but it's basically a part of the memory (Ram) where the object is stored. Knowing details like this can help make your program more efficient. You don't really have to worry about that at the scale of are programs... I don't think anyone when first learning to program really understands the concept of stack.

on to garbage collection... Thank god. I was worried I'd have to do it manually if i moved over to C#

Okay so the code i presented, is only really good if your trying to get your program working.
I'm going to do a simple modification because something about it is just bugging me.
also, the r.nextInt(int i); takes a integer value.
Code: Select All Code
public void someMethod(){

int redDice;
int bluDice;
Random r = new Random();

redDice = r.nextInt(6);
blueDice = r.nextint(6);

   if(redDice < blueDice){System.out.println("Blue Wins");}
   else if(redDice > blueDice){System.out.println("Red Wins");}
   else if (redDice == blueDice){someMethod();}
}


r.nextInt(i) returns a random value between 0 and i - 1. lets say i want to change my program so that redDice and blueDice get a value between 1 and 6 here is how i have to change my program.

Code: Select All Code
public void someMethod(){

int redDice;
int bluDice;
Random r = new Random();

redDice = r.nextInt(6) + 1;
blueDice = r.nextint(6);

   if(redDice < blueDice){System.out.println("Blue Wins");}
   else if(redDice > blueDice){System.out.println("Red Wins");}
   else if (redDice == blueDice){someMethod();}
}


now if i check the value with the debugger i get return value from both values and i get 3, & 3; however redDice wins. If we check the program there is a error. I made a mistake (likely story). I forgot to make line 8 (" blueDice = r.nextint(6); ") to be this (" blueDice = r.nextint(6) + 1; ") when you're program gets to 1,000's lines of code (which my GUI' alone, tend to do.) than errors like that can creep up a lot.

however here's a different modification that's object oriented.

Code: Select All Code

private int getRandomDiceRoll(int i){
   Random r = new Random();
   return r.nextInt(i) + 1;}

private int getRandomDiceRoll(){
   return this.getRandomDiceRoll(6);
}

public void someMethod(){

int redDice;
int bluDice;

redDice = this.getRandomDiceRoll();
bluDice = this.getRandomDiceRoll();

   if(redDice < blueDice){System.out.println("Blue Wins");}
   else if(redDice > bluDice){System.out.println("Red Wins");}
   else if (redDice == bluDice){someMethod();}
}


Now lets for some odd reason we need to roll a 100 sided dice for some reason. We can just call the getRandomDiceRoll(100); and we just use a 100 and not 6.
My dad is OCD about object oriented programming. while working a full time job; he was able to program part time for my family business (The only programmer) and was able to keep up to pace in features with the competition that had 3 full time programmers. So ya, I've been drilled hard about OO programming.

Some times you just need to brute force something to work, but for maintainability using OO Programming is better. It lets you focus on make the core features and avoid recreated the same line of code over and over.

For instants. Lets say i have a program that relies heavy on exponents.

Code: Select All Code
 2^3

okay well if i was to program this i would do something like this.

Code: Select All Code
 void a (){
   int value = 2;
   int exponent = 3;
   int reminderValue = value;
   for(int i = 0; i < exponent; i = i +1){// ya i know. I could do i++;, but that's less clear than i = i+1;
     value = value*reminderValue
}

   // do something with value....
}


I could do all that hard work and even then it wont give me a value if i did something like 8^(1/3) or (1/8)^(-1/3). we're assume that my program likely uses this more than 10 times in different ways, so what i could do each time to void reporgramming this is this.

Code: Select All Code
 void a (){
   int value = Math.pow(2.0, 3.0);
   ///do something with value....
}


and now i got past the pains of even creating that set of code, once. It follows all the rules of exponents unlike mine and it's less likely to have a error.
Ya, i know; kinda seems like a cheating way to claim OO programming is better but it's in fact a prime example of object oriented programming.



....Right. So like...I followed a fair bit of that, but it felt like a really round about way to get to a conclusion that was given half way up the page. Just saying.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon May 27, 2013 2:23 am

Some times when i post i write in 15 minute burst and so... things get long and long winded
The basic and simple reasons is this. 1 your more likely to write less code, 2 when you need to change something then your less likely to make a mistake. (See example with the dice.)

I personally make it a point to not put my GUI in 1 and only class if i can help it, because, from personal experience it gets unmanageable way to quickly.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon May 27, 2013 2:30 am

BlueLight Wrote:Some times when i post i write in 15 minute burst and so... things get long and long winded
The basic and simple reasons is this. 1 your more likely to write less code, 2 when you need to change something then your less likely to make a mistake. (See example with the dice.)

I personally make it a point to not put my GUI in 1 and only class if i can help it, because, from personal experience it gets unmanageable way to quickly.


I would imagine. I've been taught to break things down to as many classes as you possibly can, and then making the complicated shit out of a bunch of classes, basically. I was breaking classes down for Shield High, but I forget how I was working it out. I'm pretty sure I was planning to make each combat action a class.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon May 27, 2013 2:38 am

Pudding Earl Wrote:
BlueLight Wrote:Some times when i post i write in 15 minute burst and so... things get long and long winded
The basic and simple reasons is this. 1 your more likely to write less code, 2 when you need to change something then your less likely to make a mistake. (See example with the dice.)

I personally make it a point to not put my GUI in 1 and only class if i can help it, because, from personal experience it gets unmanageable way to quickly.


I would imagine. I've been taught to break things down to as many classes as you possibly can, and then making the complicated shit out of a bunch of classes, basically. I was breaking classes down for Shield High, but I forget how I was working it out. I'm pretty sure I was planning to make each combat action a class.


Ya, be careful with that advice. most case good but taken to extremes; projects can become unmanageable. That's true for anything though.
For a game of tic tac toe, you wont likely need 300 class files and having 300 class files would just be unmanageable.
From my time playing Shield high, i could easily see it taking more than 100 class files.

50(maybe 30) for each character! That's assume you don't make a base entity class and just feed the new objects data like name and what they are to say.

EDIT
I would imagine. I've been taught to break things down to as many classes as you possibly can, and then making the complicated shit out of a bunch of classes, basically. I was breaking classes down for Shield High, but I forget how I was working it out. I'm pretty sure I was planning to make each combat action a class.

Sorry, i just noticed this part. Um, that might be to much of a extreme.

only you can say for sure. Check my entity class once i edit it with comments.
Last edited by BlueLight on Mon May 27, 2013 3:02 am, edited 1 time in total.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon May 27, 2013 2:50 am

BlueLight Wrote:
Pudding Earl Wrote:
BlueLight Wrote:Some times when i post i write in 15 minute burst and so... things get long and long winded
The basic and simple reasons is this. 1 your more likely to write less code, 2 when you need to change something then your less likely to make a mistake. (See example with the dice.)

I personally make it a point to not put my GUI in 1 and only class if i can help it, because, from personal experience it gets unmanageable way to quickly.


I would imagine. I've been taught to break things down to as many classes as you possibly can, and then making the complicated shit out of a bunch of classes, basically. I was breaking classes down for Shield High, but I forget how I was working it out. I'm pretty sure I was planning to make each combat action a class.


Ya, be careful with that advice. most case good but taken to extremes; projects can become unmanageable. That's true for anything though.
For a game of tic tac toe, you wont likely need 300 class files and having 300 class files would just be unmanageable.
From my time playing Shield high, i could easily see it taking more than 100 class files.

50(maybe 30) for each character! That's assume you don't make a base entity class and just feed the new objects data like name and what they are to say.


That's...a lot of classes. I wasn't expecting to make that many for characters. Though, how my mind classifies them is a bit weird, now that I think about it I realize that the classes needed to maintain characters would actually be pretty big, but to store the data on the characters, not so much. Primarily because without RAGS rather open-ended method adding, I'm going to have to be very tricksy with how I handle all the actions that I have now. Well, we'll see once I start planning it out, which should be sometime this week actually.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon May 27, 2013 3:17 am

Pudding Earl Wrote:
BlueLight Wrote:
Pudding Earl Wrote:
I would imagine. I've been taught to break things down to as many classes as you possibly can, and then making the complicated shit out of a bunch of classes, basically. I was breaking classes down for Shield High, but I forget how I was working it out. I'm pretty sure I was planning to make each combat action a class.


Ya, be careful with that advice. most case good but taken to extremes; projects can become unmanageable. That's true for anything though.
For a game of tic tac toe, you wont likely need 300 class files and having 300 class files would just be unmanageable.
From my time playing Shield high, i could easily see it taking more than 100 class files.

50(maybe 30) for each character! That's assume you don't make a base entity class and just feed the new objects data like name and what they are to say.


That's...a lot of classes. I wasn't expecting to make that many for characters. Though, how my mind classifies them is a bit weird, now that I think about it I realize that the classes needed to maintain characters would actually be pretty big, but to store the data on the characters, not so much. Primarily because without RAGS rather open-ended method adding, I'm going to have to be very tricksy with how I handle all the actions that I have now. Well, we'll see once I start planning it out, which should be sometime this week actually.


Internet is being shaky.

if it's easily possible to make a class that support all characters but for some of those special interactions, you might need to create special class for each character that has a special interaction. (Not the most OO programing moto but still). I could see someone making a class for each character.

This is what i would say a normal class looks like.
Code: Select All Code
package Actor;

import AI.BaseAI;
import BIP.EntityInterface;



import engine.Warrior2013;

public class Entity extends Actor implements EntityInterface {

   boolean ALLSETUP = false;
   protected BaseAI Controller = new BaseAI(this);
   public Entity(char Symbol, String name, int y, int x,
         int hitPoints) {
      super(Symbol, name, y, x, hitPoints, false);
      // TODO Auto-generated constructor stub

      System.out.println(this+", passiable is: "+this.passable);

   }
   public Entity(char Symbol, String name, int y, int x,
         int hitPoints, BaseAI ai) {
      super(Symbol, name, y, x, hitPoints, false);
      this.setController(ai);
   }

   public final boolean doAction(){
      killed();
      return true;
   }


   
   private void killed() {
      System.out.println("Murder isn't nice!");
      //removes the object from play.
      System.out.println(this+",Killed and now shall be removed.");
      Warrior2013.turnList.remove(this);
      Warrior2013.scanBot.runCheck();
   }
   public boolean moveLocation(int y, int x) {
      
      boolean actionDone = false;
      
      try {
         int moveY = this.y +y;
         int moveX = this.x +x;
         
         if(!Warrior2013.turnList.getEntityThere(moveY, moveX) && Warrior2013.map.mapArray[moveY][moveX].get(0).getPassable()){
            System.out.println("No entity was there.");
            this.y = moveY;
            this.x = moveX;
            actionDone = true;
         }
         else{
            System.out.println("Enitity was there");
            actionDone =((Entity)Warrior2013.turnList.getEntity(moveY, moveX)).doAction();
         }
      } catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      
      Warrior2013.map.symbolRefresh();
      return actionDone;
   }

   public void allSetup(){

   }

   public void setController(BaseAI baseAI) {
      // TODO Auto-generated method stub
      this.Controller = baseAI;
   }

   public BaseAI getController(){

      return this.Controller;
   }
   @Override
   public void runAICommand() {
      this.Controller.tactic();
   }
}


If your classes are using more than one function than i think you're good.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Sun Jun 23, 2013 9:09 am

UPDATE TIME!

I've released a very bad combat demo on the blog for bug-hunting/system feedback. GAME TO RETURN SOON.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon Jun 24, 2013 4:45 am

1 the screen needs to be bigger, since text on the same horizontal line are crossing and being unreadable.
2 having the press a button to move on to the next action is annoying to me.
3 i don't like installing games of this type on my computer.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon Jun 24, 2013 5:03 am

BlueLight Wrote:1 the screen needs to be bigger, since text on the same horizontal line are crossing and being unreadable.
2 having the press a button to move on to the next action is annoying to me.
3 i don't like installing games of this type on my computer.


1. I'll set a standard screen size, it must default to different sizes on different monitors.
2. When it's finished the button to move on will be relevant since it'll alternate between combat actions and dialogue.
3. Deal with it. Unless you know how to make an XNA game that doesn't involve installation. In which case please inform me and I'll fix it.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon Jun 24, 2013 10:31 am

It just seems like a odd requirement since most languages don't require a install from what i've seen. Then again most games i've seen use C++.
The requirement to install games is normally based on using libraries like directX which is more a legal problem than anything else.
Last edited by BlueLight on Mon Jun 24, 2013 10:38 am, edited 1 time in total.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon Jun 24, 2013 10:34 am

BlueLight Wrote:It just seems like a odd requirement since most languages don't require a install from what i've seen. Then again most games i've seen use C++.
The requirement to install games is normally based on using libraries like directX which is more a legal problem than anything else.


I honestly do not understand it either. Nor did I expect it. I'll have a look and see if there's an alternative before I release the combat beta.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby BlueLight » Mon Jun 24, 2013 10:42 am

I doubt at this point you'd want to switch, but java doesn't have this requirement.
I'll contact my friend who just took a course in C# in about 12 hours. He might know a solution but i doubt it.

I'll see what useful feed back i can get with this program.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [RAGS game]

Postby Pudding Earl » Mon Jun 24, 2013 10:47 am

BlueLight Wrote:I doubt at this point you'd want to switch, but java doesn't have this requirement.
I'll contact my friend who just took a course in C# in about 12 hours. He might know a solution but i doubt it.

I'll see what useful feed back i can get with this program.


I'm already half-way through the overhaul, which will make it easier to read. I might bring you some code to see if you can help me spot any math irregularities, as sometimes the numbers behave in a very odd way.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [RAGS game]

Postby ThatOldFart » Mon Jun 24, 2013 11:57 am

Pudding Earl Wrote:
BlueLight Wrote:1 the screen needs to be bigger, since text on the same horizontal line are crossing and being unreadable.
2 having the press a button to move on to the next action is annoying to me.
3 i don't like installing games of this type on my computer.


1. I'll set a standard screen size, it must default to different sizes on different monitors.
2. When it's finished the button to move on will be relevant since it'll alternate between combat actions and dialogue.
3. Deal with it. Unless you know how to make an XNA game that doesn't involve installation. In which case please inform me and I'll fix it.



For Chrissakes, man, why would you use a Microsoft IDE? That's half your problem right there! Just code it in VI like a real man! 8-)

Oh, and be sure to do it on a UNIX box, none o' this fancy Windows crap you kids are always going on about. And NO LINUX! C, on a unix box, in VI. *nods* Yup, that's how ya do it. For more practical advice, though, it's gotta be somethin' in the way your IDE compiles it. Like BL said, typically client-side installation is only used for proprietary libraries which you shouldn't be using anyway(possibly the only option with your IDE). Just remember the golden rule of the IDE - if it adds a bunch of horseshit between you and your code, scrap it.
ThatOldFart
 
Joined: Mon Jun 24, 2013 11:40 am

Re: Shield High [RAGS game]

Postby cyrand » Wed Jun 26, 2013 2:07 am

Pudding Earl Wrote:
BlueLight Wrote:3. Deal with it. Unless you know how to make an XNA game that doesn't involve installation. In which case please inform me and I'll fix it.


After opening up the project

A)Go to Project Tab
B)Properties
C)Publish Section
D)press Options button
E)Under Deployment uncheck "Use ".deploy" file extension" checkbox

When you publish the project you will get a folder called Application Files where each publish version of your program in a folder named by version number. Within those folder there will be a .exe file that will run the game without installation. You should be able to zip those folder to share the game. This should work assuming the person running the game has .net framework installed and what ever other Microsoft libraries needed.

installation less likely to give errors for missing required libraries since they be package within the install file but if you want to give a option for not installing anyone with windows should be able to figure how to get the .exe to work (installing XDA studio 4.0 is a quick way to make sure your computer has every extension needed).

P.S.
Just discovered this forum a few weeks ago and I love your game.
cyrand
Newly Registered
 
Joined: Wed Jun 26, 2013 12:49 am

Re: Shield High [No longer a RAGS game]

Postby Pudding Earl » Tue Aug 13, 2013 7:13 pm

Updated the front page. Just posting a little bump here so people can see it.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [No longer a RAGS game]

Postby fulgartech » Wed Sep 04, 2013 7:23 am

Hey looks like Pudding has put up a new update to this on his blog.

It looks like a lot of work has been done to it! I like where it is going, and really like the addition of the paper doll images.

3 bugs I saw (I would post this on his blog but I don't feel like registering):

1) The hit box seems slightly below the image for the buttons.
2) Screen resolutions are a problem. At 1200x800 I had to hide my start bar to see the bottom of the window. My PC only goes down in resolution from there.
3) Lots of Inspect buttons that don't do anything yet. Not really a bug and more of a missing content thing but I thought I would mention it.

Also if you previously installed his combat demo, uninstall it before trying to install this one. It will prevent you from installing otherwise.

-Fulgartech
User avatar
fulgartech
 
Joined: Sun May 27, 2012 7:27 am

Re: Shield High [No longer a RAGS game]

Postby Pudding Earl » Wed Sep 04, 2013 9:43 am

fulgartech Wrote:Hey looks like Pudding has put up a new update to this on his blog.

It looks like a lot of work has been done to it! I like where it is going, and really like the addition of the paper doll images.

3 bugs I saw (I would post this on his blog but I don't feel like registering):

1) The hit box seems slightly below the image for the buttons.
2) Screen resolutions are a problem. At 1200x800 I had to hide my start bar to see the bottom of the window. My PC only goes down in resolution from there.
3) Lots of Inspect buttons that don't do anything yet. Not really a bug and more of a missing content thing but I thought I would mention it.

Also if you previously installed his combat demo, uninstall it before trying to install this one. It will prevent you from installing otherwise.

-Fulgartech


Thanks for commenting! I was thinking of posting here and then just...forgot. So thanks for bumping it, ANWAY, BUG FIXING STUFF!

1. I'll look into that, I'm not sure what causes it since area for detection and area for drawing are identical, but I might have made an error somewhere, I'll look into it.
2. Yeaaaahhh, I've had this complaint before, and I'm trying to work out how to best address it. Shrinking everything might be the way to go, but I'm worried if I do that it'll screw with how my text display works. I'll play around with it soon and see what I can do.
3. Inspect buttons were basically put in as a placeholder, but with the new images I may remove them entirely. They're pretty much only there now because I can't decide what to do with them.
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

Re: Shield High [No longer a RAGS game]

Postby BlueLight » Wed Sep 04, 2013 10:53 pm

Pudding Earl Wrote:2. Yeaaaahhh, I've had this complaint before, and I'm trying to work out how to best address it. Shrinking everything might be the way to go, but I'm worried if I do that it'll screw with how my text display works. I'll play around with it soon and see what I can do.


I don't know about C# but in java they use Layout managers. Likely if you're doing absolute positioning you have a lot of control on how things interact but i had to fiddle around a lot when doing that. Also, that's when a GUI builder basically is required.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Shield High [No longer a RAGS game]

Postby Pudding Earl » Fri Sep 06, 2013 6:02 am

Fulgartech~

I have a couple people who are having trouble installing the new version, and sadly I'm not a clever enough man to work out how the hell you uninstall the game. Any chance you could help me out on that one?
Pudding Earl
 
Joined: Mon Aug 20, 2012 2:50 pm

PreviousNext

Return to Non-Flash Projects



Who is online

Users browsing this forum: Google [Bot]