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 - nemo
Pages: 1 ... 44 45 [46] 47 48 ... 82
676
« on: October 18, 2010, 09:28:58 pm »
haha well you need to compile it first... and it really wouldn't do much harm. it DOES create an infinite loop, but you can press ctrl+b to break out of it. it displays a window and then displays the string "LOL" over and over, each time in a different color. but the colors change so fast you can't really tell
677
« on: October 18, 2010, 09:21:50 pm »
import java.awt.*; import javax.swing.*; import java.util.Random; import java.awt.Graphics;
public class Test { public static void main(String[] args) { int b = 1; JFrame frame = new JFrame("Cause why not?"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300,50); Container pane = frame.getContentPane(); DrawingPanel panel = new DrawingPanel("LOL"); pane.add(panel); frame.setVisible(true); while(2*b==1 || 2*b!=1) // that is the question... panel.repaint(); } }
class DrawingPanel extends JPanel { private String str; public DrawingPanel(String s) { str = s; }
public void paintComponent(Graphics g) { super.paintComponent(g); Random rand = new Random(); g.setColor(new Color(rand.nextInt(256),rand.nextInt(256),rand.nextInt(256))); g.drawString(str,4,30); } }
i had to :p
678
« on: October 18, 2010, 06:00:42 pm »
yeah... just don't use more than 700 bytes worth of variables and you'll be fine (like you even need 350 variables)
679
« on: October 18, 2010, 05:57:11 pm »
yes. be careful about it though. if you do 256->{L1+2}r, make sure you don't try to make a variable at {L1+3}, because this is already being used by the two byte variable at L1+2
680
« on: October 18, 2010, 05:51:52 pm »
you can use any portion in the free RAM areas L1-L6 as your own variables.
681
« on: October 17, 2010, 11:04:27 pm »
That is REALLY cool. I do suggest making the shadows grayscale, however.
i second this. but instead of drawing lines to the backbuffer, draw the lines as you are now every other frame. that way you gain speed, and the shadows now appear gray.
682
« on: October 17, 2010, 09:10:55 pm »
a title screen would be easy to import. do you already have the screen in a Pic variable? then you could just do Copy([Pic#],L6,768) in your program and the picture variable will be copied to the buffer
683
« on: October 17, 2010, 08:42:46 pm »
well... my engine is finished. so there
I finished my basic engine too. Now to add the rest of the gameplay...
so what are you doing to spice it up?
684
« on: October 17, 2010, 08:24:30 pm »
well... my engine is finished. so there
685
« on: October 17, 2010, 06:18:57 pm »
lol... and i still need to write an engine.
686
« on: October 17, 2010, 06:11:58 pm »
what do you mean by top down? the screen has to scroll vertically?
687
« on: October 17, 2010, 06:07:56 pm »
ready for this finale?
688
« on: October 17, 2010, 03:34:34 pm »
is this on the graphscreen or homescreen? and is it large text or small text?
both are possible, i'm just curious because small text would be difficult while large text on the homescreen would be relatively easy.
and yes, you can determine the length of a string
689
« on: October 16, 2010, 06:25:55 pm »
i'm not sure if it's more optimized than just A->C: B->A: C->B, though.
690
« on: October 16, 2010, 06:18:10 pm »
just found something cool. if you *really* don't have any temp variables to exchange two values, the following code should do the trick:
. "xor" is the 16 bit plotstyle-box xor, not the actual word xor. A xor B->A A xor B->B A xor B->A
Pages: 1 ... 44 45 [46] 47 48 ... 82
|