*Help* making a simple RPG for my AP CS class
I am in desperate need of help, I am creating an RPG(of sorts, it is a purely a battle RPG in which characters level up and modify stats) there will be no storlyine (Yet) or adventure elements. I've reached a severe mental roadblock in the actual programming of the game but I have a very clear picture of exactly how the game runs. Here's how the game works, after starting a new game from the opening screen, the player begins with a simple battle against one monster. The player has four characters and each character starts with one basic attack. Battle continues in typical RPG style in which the player selects attacks, and then battle ensues in order based on the speed of each participant. At the end of each battle, all the characters level up once and the player can distribute a certain amount of stat points to each of the characters individual stats. The game continues like this for 40 levels with increasing difficulty, new attacks, and an upgrade to a new class at level 20. level 41 is a final boss fight against a typical RPG boss monster. Here is what i particularly have trouble on
1. Determining how to create the attacks that the player can choose and figuring out how i can call upon them and have them do their damage based on certain specs
2. Determining how to create an interactive interface that allows the player to choose the attack for each character, upgrade individual stats after each battle, and save (this will be a point and click menu system)
3. Figuring how to create and input my own homemade graphics into the game (the book i have doesn't seem to cover putting in graphics that you create on your own, just the graphics that are part of the java package)
Any help on this would be greatly appreciated becuase it is a major grade in my class
Hello,
I have been programming (in various languages) for years now. I also am in AP CS and I have been trying to think up a good game to make, i'm about 2 months ahead of my coursework in class and spend my time making and re-making various games during class.
If i were to program this game i would go about the Attack issue by having a class called Attack (as was mentioned early). In it have the methods and variables and such for the attack, i would have a database or something along those lines of all the attacks (but for now start small with a basic one) and then each player could have one (or multiple - depending on whether or not they have an assortment of attacks) class attached to it (or if multiple perhaps an array or vector of classes). The attack class would contain basic information like the Name of the Attack, the Damage, Type, etc. And the class could even include methods which get the 'Level' of the player and calculate the damage multiplier or something along those lines.
As far as choosing what to have the characters/players do i would (for yours and simplicity's sake) make a side menu which allows you to choose whatever attack, etc. you want. It's simple and easier to work with, just have a JPanel within the JFrame which controls the players, and it will control each player when it's their turn. This shouldn't be too difficult to do.
The graphics part (you have already recieved some suggestions about), i prefer to use ImageIcons in my games. They're simple and easy to work with and are painted just as a circle or rectangle is. You just draw the images outside of the program and use them in the program through ImageIcons. If you have a good image-edittor (Photoshop, Flash even), you can make Animated Gifs which will add to the look and quality of the graphics of your program.
The trick with big projects like this (and the goal of Object Oriented Programming) is to take a big problem (Like and Entire RPG Game -- The Program) and break it up into smaller problems and tackle each one, one at a time (divide the Program into an assortment of Classes).
I wish you the best of luck, i myself am starting a small game (Something similar to Zelda i'm thinking), i'm still designing it on paper and I personally think if you design and organize everything on paper and make a checklist of sorts, things go much smoother and more organized (not to mention faster).
Similar Messages
-
Need help making a simple script for my webcam
Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
tell application "CamTwist" to activate
delay 10
tell application "Photo Booth" to activate
that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
tell application "System Events"
tell application "CamTwist" to activate
delay 0.5
--Press command+b which is a user defined hot key to load webcam
key code 11 using command down
end tell
delay 0.5
tell application "Photo Booth" to activate
My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone. -
Need Help making a navigation menu for a website
Alright so I've been having some problems getting this to work correctly. I am making a navigation menu for a website and I'm trying to get when I hover over the main header a drop down appears animated of course below it. I also want when you highlight a specific text line for it to highlight blue along with a rectangle behind it to change to a lighter shade of red.
Some of the problems I have been running into is play and stop commands on mouseover and them not stopping when they should and getting the text to change color.
Thanks for the help.
Here are some screen grabs of what I am doing
http://imgur.com/W2bZuF3
http://imgur.com/W2bZuF3
http://imgur.com/2GI3y71Your page's code is still a bit of a wreck. Do you ever look at it?
<html>
<style type="text/css">#p7MBM_1 {
width: 951px;
You need a doctype first - I recommend HTML4.01 Transitional. Open this (and other pages) in DW and use FILE | Convert > HTML 4.01 Transitional, then save. But wait until you do the other changes recommended below before doing this.
Add a <head> tag below the <html> tag.
Add a <title> tag below the <head> tag.
Add this below the <title> tag - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Add </head> below this -
<style type="text/css">
<!--
.style10 {font-family: "Goudy Old Style"}
-->
</style>
You may want to change that font-family style to "Goudy Old Style, Geneva, Times, 'Times New Roman', serif", since Goudy is not web safe.
Move <body> below that </head> you just added.
That will clean your code up a bit. Let's look at the page again when you have done these. -
HELP MAKING VERY SIMPLE ANIMATION - Adobe Flash CS5
- First off, apologies for the simplicity of the task I need to carry out- cannot seem to find any tutorials on this. (All aimed at After Effects)
- I am hoping to make two simple animations;
1. Animate the word "water" so it appears to be moving like water itself.
2. Animate the word "sand" so it appears to crumble into sand itself.
Appreciate any help, very new to Flash - still no luck after Lynda and other tutorials.Not exactly the answer to your question but found a tutorial page that could help you.
Text Effects with Flash Professional 8 « Wonder How To -
Help with a simple applescript for combining Artist text with Track name
Hi all,
I'd like to put together a simple script that takes the artist names from a list of tracks in iTunes and copies the text to the start of the Title name, followed by " - ".
This is because, e.g. on a classical album, I want the artist names to all be "Classic Collection Gold" but I'd like to keep the artist name contained with the track name. This means when I browse by artist I don't get millions of artists...
I found this script, which does something kinda similar, but I'm new to script writing so not sure how to do it?
So I'd like to change:
Name
Planets: Mars
Artist
Gustav Holst
Ambum:
Simply Classical Gold (Disc 2)
To be:
Gustav Holst - Planets: Mars
Artist
Gustav Holst - Planets: Mars OR BETTER Simply Classical Gold (Disc 2)
Album
Simply Classical Gold (Disc 2)
This script has some ideas in, but I'm not sure how to tweak it....
"Artist - Name Corrector" for iTunes
written by Doug Adams
[email protected]
v1.6 May 17, 2004
-- removed ref to selection
v1.5 April 11 2004
checks if separator string is in name
v1.0 April 2 2004
Get more free AppleScripts and info on writing your own
at Doug's AppleScripts for iTunes
http://www.malcolmadams.com/itunes/
property separator : " - "
tell application "iTunes"
if selection is not {} then
set sel to selection
repeat with aTrack in sel
tell aTrack
if (get name) contains separator then
set {artist, name} to my texttolist(get name, separator)
end if
end tell
end repeat
end if
end tell
-- == == == == == == == == == == == == == == == ==
on texttolist(txt, delim)
set saveD to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to {delim}
set theList to every text item of txt
on error errStr number errNum
set AppleScript's text item delimiters to saveD
error errStr number errNum
end try
set AppleScript's text item delimiters to saveD
return (theList)
end texttolist
Message was edited by: ChipstixI'm not sure what that script thinks it's doing, but it's essentially doing nothing, so scrub that and start afresh.
The first thing you need is a way to identify the tracks to change - you don't want to do all tracks in the library (they might have already been munged). A good option is to work on the selected tracks:
tell application "iTunes"
if selection is not {} then
set sel to selection
You then need to iterate through those items, changing them one-by-one:
repeat with aTrack in sel
Now comes the easy part - build a list of the elements you want (in this case you want the name, artist, and album of each track:
set trackName to name of aTrack
set trackArtist to artist of aTrack
set trackAlbum to album of aTrack
Now you have the information you need, so reset the fields as appropriate:
set name of aTrack to trackArtist & " - " & trackName
set artist of aTrack to trackAlbum -- or to trackArtist & " - " & trackName, depending on your choice
Now clean up by closing off the repeat and tell blocks:
end repeat
end tell
Putting it all together you get:
tell application "iTunes"
if selection is not {} then
set sel to selection
repeat with aTrack in sel
set trackName to name of aTrack
set trackArtist to artist of aTrack
set trackAlbum to album of aTrack
set name of aTrack to trackArtist & " - " & trackName
set artist of aTrack to trackAlbum -- or to trackArtist & " - " & trackName, depending on your choice
end repeat
end tell -
Help required on simple validations for Flex Numeric Stepper
Friends,
I need a small help in Flex Numeric Stepper validation.
I have setted a min value to 1 and max value to 10, Now my requirement is when ever user can enter a value other than the range between 1 - 10, i want to display an alert saying "please enter the val's between 1 and 10". I want this scenario to be success in all possible event listeners like Keyboardevents/mouseevents/default numeric stepper events. Actually i am failing to produce an alert if i typed the value as "0". Other than this everything is fine.
i am attaching the code as well for reference. i need solution asap.
your help will be appreciated.
Rajesh
private var nsTextInput:Number;
private var nsTextInputOld:Number;
private var ns:NumericStepper = new NumericStepper();
ns.minimum = 1;
ns.maximum = 10;
ns.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteNs);
ns.addEventListener(Event.CHANGE,creationCompleteNs);
addChild(ns);
private function creationCompleteNs(event:FlexEvent):void{
var textInput:TextInput = event.currentTarget.getChildAt(0) as TextInput;
textInput.addEventListener(KeyboardEvent.KEY_UP, keyUPTextInput);
textInput.addEventListener(FocusEvent.FOCUS_OUT, focusOutTextInput);
textInput.addEventListener(FocusEvent.FOCUS_IN, focusInTextInput);
private function keyUPTextInput(event:KeyboardEvent):void
nsTextInput = event.target.text;
private function focusInTextInput(event:FocusEvent):void
nsTextInputOld = event.target.text;
private function focusOutTextInput(event:FocusEvent):void
if((nsTextInput<ns.minimum || nsTextInput>ns.maximum) && nsTextInput){
Alert.show("Please provide values from "+ns.minimum+" to "+ns.maximum+".","Alert!");
event.target.value = nsTextInputOld;
nsTextInput = null;you may want to take a look at Flex's validator classes
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/validators/NumberVal idator.html -
I need help making a simple droplet
Here is what I need it to do.
I need a droplet to open and save. Yes, that's it.
The file must go back into its original folder.
The droplet needs to prevent the jpeg compression dialog from opening during operation.
PC CS4.
What I use it for:
I shoot wireless and the ITP Pixagent server software that I use allows the files to run through a droplet on the way into the folder.
The reason that I need this particular droplet is that not all software reads the metadata that rotates the "auto rotate" images coming from my Canon 5D.
Also, once the images have been run through this droplet, they never show the jpeg compression dialog again, which is nice for workflow later down the stream. The files are all oriented correctly for any software.
Also when shooting away from the studio, a folder of images can be drug over the desktop droplet's icon and the folder will then batch all the files through the droplet.
I created this droplet about three years ago and didn't write down the procedure. And forgot! like an idiot. I've tried to duplicate it with no success.
anyone want a challange?
I am currently getting an error that "the droplet has quit working"As far as I know this will be included in the next ISO release. I solved it by manually bringing the dmraid package to the install and wrote a guide on installing your root system on dmraid. However when the system crashes I have the slight inconvenience of having to install dmraid and manually mount the sets to do a recovery. I guess this is the part you want to get rid of aswell. I decided to wait until the next holy ISO.
-
Help Making a SIMPLE JAVA GAME *TINY GLITCH*
got a tinnnny glitch and ive tried everything to get it to work, but so far no luck.
Heres what my program does:
1. Aliens spawn at top left (top 4 rows) and move to the right and dissapear (DONE)
2. Shooting rectangle at bottom middle (moves left and right) and shoots bullets (DONE)
3. When bullets make contact with alien the alien dissapears (DONE)
4. When you shoot 20 bullets game over (DONE)
5. When all the aliens fly by the screen game over (DONE)
GLITCH
1. When an alien is killed any bullet that goes over the exact same spot of collision the bullet dissapears! +so does an alien going over same collision spot
MISSING
1. Score, every alien kill + 10 CANNOT get a working score funtion to +10 fo every alien successfully hit :(
My SRC jus copy and paste and compile, any help appreciated
http://www.geocities.com/porche_masi/Assignment3.txt
//ignore spelling mistakes in comments and outputs lol
ive spent way to many hours over these 2 stupid problems, hope new eyes can spot the problemI'm not going to look at your code, but it sounds like when you're killing things you're not removing them from your future calculations. So if an alien is killed, it should either be removed from the list of aliens, or a "dead" flag should be set on it which causes it to be ignored in future calculations.
edit I did look at your code actually, and that is a really, really bad use of multithreading. You shouldn't just create a new thread every time a bullet is fired. You should maintain a list of bullets, have the main thread drive the UI, and have a secondary thread to update the game logic (recalculate collisions, etc).
Edited by: endasil on Nov 21, 2007 3:16 PM -
I need help making a simple logon page in Dreamweaver MX. I
have tried Visual Basic. and several other methods to no avail. If
someone could help me it would be greatly appreciated
Ron HansenHi Ron
The proceedure is pretty much the same in
PHP/Coldfusion/JSP/ASP.
There is a very easy to follow example in the Dreamweaver
Help File.
Just go to Help-->Developing Applications Rapidly -->
Building pages that restrict access to your site (ColdFusion, ASP,
JSP, PHP) --> Building a login page
I don't think it can get much easier. But remember that you
will need to have a database table of user details in place to
complete the process.
Good luck. -
Hey,
I was hoping to get some help making a clock update for me, but I don't want just to show the actual date, I know how to do that. What I want is to be able to set a time, and then the clock start running from then. For instance, after I enter Jan 3rd, 2005 at 3:43 as my time and date, I want the clock to start from there and update every second. Does that make sense?
Could someone help me out where to look to get this to happen? Thanks!I think the OP wants to be able to set a time OTHER
than the current time. He doesn't want to wait
untill the time you entered to have the clock tick,
he wants to have it tick immediately from the "fake"
time that you've entered.
At least that's how I understood him. The offset is
the difference between the real time and the fake
time entered by the user.
If he just wants to display the current time, but not
stat doing that untill some point in the future then
yeah TimerTask is the simplest way to do it, but I
don' think that's what he's trying to do.thanks for the replies guys. I appreciate it. Sorry if I was a bit unclear. Norweed was right in saying that I want to set the time and start updating immediately, not wait until the time reaches my entered time and then count. Sorry for the confusion.
I was thinking that a offset would work, thanks for recommending that. I'm wondering if the time will get off after a while, I need this program to run probably arounnd 2-3 hours. Hopefully it won't drift very much over that time.
Thanks all for the recommendations and I will check all that out. -
Hi,
I can't seem to make any ringtones for more than the first 15 seconds of a song in garageband. I know the songs I am trying to use are unprotected because they are recordings of me playing jazz and we didn't protect them, they are in mp3 format. But I can't get mp3 mp4a or AAc format to play more than the first 15 secs. I tried tuneclone, mp3 converter and everything. All i want to do is create a ringtone of a song. please help.harriettfromjacksonville wrote:
Purchased a ringtone and need help making it my ringtone for my new Iphone. Help.
You have to create the ringtone.
There are many free ways to do this. Google will find them. -
Help making a Install USB of os x 10.4.6. for my Macbook 1.8ghz
Hi,
I need help making the USB install of os Tiger.
The drive is having trouble reading the install disc I own so I am trying to make a USB install of it.
I wantto install from the usb not install to it to be clear.
Things I have!
X1 8gig sandisk flash drive
1 Macbook white 1.8 ghz Intel
1 Pc with Macdrive 7
1 Install disc that seems to have trouble being read in the drive > few marks on the disc and the mac DVD drive make lots of noise reading it but
It will go to Disk utilities.
Seems to be a bug in Tiger and restore doesn’t seem to work as in I can’t drag and drop a source to the restore the DVD to the flash drive.
I already tried only 1 time to copy the DVD to the formatted flash drive using Macdrive and it read it as a bootable drive but the apple simple came up
And then I got a the error (Can’t find driver for this platform error APCH or something like that.
I have a torrent download of OS x 10.4.6 as well just in case some files are corrupted > I own the disk so it’s not illegal.
I am new to mac but long time user of PC.Ok ..you need another Mac to make this work!
you just use another mac even a old one like g4 to make a restore to a flash drive that you have formatted and verified.
Bye
Sam -
Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory
Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it.
Alex D
Applications Engineer
National Instruments -
Need Help making a Screencast for IPHONE
Hello there
I need some serious help making a screencast for a client - for it's Iphone Apps -
something similare to this
http://www.newsluxe.com/chaumet-et-iphone.php
but more sexy, with a animated background and a different type of cursor.
Anyideas ?
I really don't know where to start - I found leads however :
Camtasia Studio , screenflow, ,
Maybe you could help me filling the gaps.
Thanks for your help !does anyone know how apple made these forums?
I think they use Jive:
http://www.jivesoftware.com/products/forums/
The Apple way for users to add photos is the .Mac web gallery:
http://www.apple.com/ilife/iphoto/#webgallery -
Need help in simple code for LayeredPane
Hi,
here is my simple code for displaying layered pane,
why is it not working, when i comment label.setBounds();
also is there a way to have a transparent layer, like
what i want to do it
have ont JPanel with some painting on it
then i want to add one more JPanel over it which is transparent
Ashish
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
public class TestLayeredPaneFrame extends JFrame
public TestLayeredPaneFrame()
super("layered pane");
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
JLayeredPane layeredPane =new JLayeredPane();
layeredPane.setPreferredSize(new Dimension(400,600));
int x = 30;
int y = 30;
for (int i = 0; i < 3; i++) {
x +=30;
y +=30;
origin.x += offset;
origin.y += offset;
layeredPane.add(new myLabel(x ,y ), new Integer(i));
Container contentPane = this.getContentPane();
contentPane.add(layeredPane, BorderLayout.CENTER);
JPanel panel = myGlassPane();
this.setGlassPane(panel);
setSize(new Dimension(800,600));
this.setVisible(true);
private JLabel myLabel(int x, int y)
JLabel label = new JLabel("My Name");
label.setVerticalAlignment(JLabel.TOP);
label.setHorizontalAlignment(JLabel.CENTER);
label.setOpaque(true);
label.setBackground(Color.BLUE);
label.setForeground(Color.black);
label.setBorder(BorderFactory.createLineBorder(Color.black));
label.setBounds(x, y, 140, 140);
return label;
public static void main(String args[])
TestLayeredPaneFrame tlp = new TestLayeredPaneFrame();
}Hi,
here is my simple code for displaying layered pane,
why is it not working, when i comment label.setBounds();
also is there a way to have a transparent layer, like
what i want to do it
have ont JPanel with some painting on it
then i want to add one more JPanel over it which is transparent
Ashish
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
public class TestLayeredPaneFrame extends JFrame
public TestLayeredPaneFrame()
super("layered pane");
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
JLayeredPane layeredPane =new JLayeredPane();
layeredPane.setPreferredSize(new Dimension(400,600));
int x = 30;
int y = 30;
for (int i = 0; i < 3; i++) {
x +=30;
y +=30;
origin.x += offset;
origin.y += offset;
layeredPane.add(new myLabel(x ,y ), new Integer(i));
Container contentPane = this.getContentPane();
contentPane.add(layeredPane, BorderLayout.CENTER);
JPanel panel = myGlassPane();
this.setGlassPane(panel);
setSize(new Dimension(800,600));
this.setVisible(true);
private JLabel myLabel(int x, int y)
JLabel label = new JLabel("My Name");
label.setVerticalAlignment(JLabel.TOP);
label.setHorizontalAlignment(JLabel.CENTER);
label.setOpaque(true);
label.setBackground(Color.BLUE);
label.setForeground(Color.black);
label.setBorder(BorderFactory.createLineBorder(Color.black));
label.setBounds(x, y, 140, 140);
return label;
public static void main(String args[])
TestLayeredPaneFrame tlp = new TestLayeredPaneFrame();
}
Maybe you are looking for
-
Right now my iCloud is synced through our family Apple ID. It wasn't a problem until my mom got an iPad and synced it to the same Apple ID, so now she receives all of my iMessages and FaceTime messages. I have created my own Apple account, but how do
-
Can I find out WHY FIOS is not availble in Smyrna, DE
Yeah, yeah, yeah; I know the official words from Verizon - "Service is unavailable in my area, we are continously expanding...." We've had fiber on the poles for several YEARS now here in Smyrna (it was run down my street when they expanded the road
-
Help with showDocument() function
Hello, I am trying to write a segment of code that will allow me to change the URL of a HTML frame, however, it is a different frame than that which contains the applet.... I have tried looking at the documentation for the showDocument function, but
-
Thanks ahead of time for your help ... new bonehead on the block I notice that the sample ringtones only go up to the letter "F" (Fur Elise) ... where's the rest of 'em? Thanks, Deb
-
Where can I find my account balance
Where can I find my account balance?