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 - Scipi

Pages: 1 ... 53 54 [55] 56 57 ... 139
811
Computer Projects and Ideas / Re: [Contest] Card Game IRC bot
« on: August 08, 2012, 02:28:04 am »
Pokemon and Yugioh would be fun :P You'd have to code for all the different effects and such though XD

812
Computer Usage and Setup Help / Re: Virus problem
« on: August 08, 2012, 02:26:31 am »
Quote
can you top this?
104k files!

I removed 80 GB worth if files from my computer last month to free up memory... Two weeks later I cap the hard drive capacity again. :P

Don't know how that translates by worth of files, but...

813
Humour and Jokes / Re: 9001 signs you're addicted to calcs and Omni
« on: August 08, 2012, 12:46:38 am »
3192: You want to know the exact percentage of users with MLP avatars

814
General Calculator Help / Re: Game Dev Process
« on: August 08, 2012, 12:43:22 am »
It is also a good idea to not keep your browser open if you want to progress a lot on your project one day, unless you need help. Else you might end up procastinating.

I probably need to do this :P I tend to want to work on a project, lose track of what needs be done/how to go about doing it, then find myself play testing MafiaBot with Sorunome or something XD

815
General Calculator Help / Re: Game Dev Process
« on: August 07, 2012, 07:16:53 am »
I usually get the basic idea for a game, then I get all the low level stuff finished. Input handling, audio, drawing to the screen. Usually I'll import an engine I already have done though. After that I work on bits and pieces starting with the maps and movement, then to more high level stuff.

Edit: To expound a bit, I always try to do one thing at a time and work linearly. I try not to do >9001 things at once. Also, whenever I see a bug, I work on it until I fix it.

816
Humour and Jokes / Re: The Peanut Gallery
« on: August 07, 2012, 07:00:02 am »
* HOMER-16 wonders if there's an option to select what pictures can be shown or ones you want to see.

Haha, that's a lot of different brands!
* HOMER-16 thinks that once he reaches a high number of posts (say 500 -1000) he'll photoshop his own brand. :P

Oh, this feels so long ago :P

Looks like I'll have to create another brand of peanuts ^_^

817
Humour and Jokes / Re: 9001 signs you're addicted to calcs and Omni
« on: August 07, 2012, 12:24:02 am »
3177// You wrote a bot

818
Site Feedback and Questions / Re: downrate post button back?
« on: August 06, 2012, 01:04:32 pm »
How about Max. rates per posts of one specific person?
so I can give 10 today, but only 2 of them to posts of you.
That would make sense to prevent downrate or uprate spamming.

That is actually a very good idea! I agree with this.

819
That might be lots of work!!
But sounds fun! :D

Most of it's already planned. I actually have a pretty flexibly system set up that allows for any kind of move to be launched, yet easily quantified into stats for processing. I already have most of the args list done, I just have to add in internal op commands and other maintenance commands then I can start working on processing those commands.

820
Computer Projects and Ideas / [Contest] Let's Play RPG?! IRC Bot game
« on: August 05, 2012, 06:27:23 pm »
Yes, you read the title correctly! :P

Basing off of Omnimaga's own Let's Play RPG threads, I am creating a game where everyone can have their epic showdowns to the death without the cheapness. :D

I will be using Java (as Java is always kind to me) for this project.

I will be developing a set of rules for the game so we don't have >9001 players that refuse to die. And I'll probably allow DM tools for one member to create a setting and story for the other users.

This shall be fun :D

821
Site Feedback and Questions / Re: Quote fail on minus world?
« on: August 05, 2012, 04:26:41 am »
I think this is a known issue since the minus world was integrated to the forums.

822
Computer Projects and Ideas / Re: Contest: Coding Battles Topic Poll
« on: August 05, 2012, 04:24:32 am »
Just noticed, suddenly the irc bots are leading, maybe we won't have a tie :P
EDIT: How much time will we have again for coding?

Roughly 3 weeks

823
Humour and Jokes / Re: This is not Spam.
« on: August 05, 2012, 01:17:19 am »
I agree to this. The thread was started for a good laugh, which is the entire scope of Humor and Jokes.

Imo, I don't think it qualified as spam. Spam would be more on the immature, nonsensical side of things. The thread I don't think had gotten to that point yet.

824
Humour and Jokes / Re: 9001 signs you're addicted to calcs and Omni
« on: August 04, 2012, 11:26:03 pm »
3161: You have over 1000 posts, and therefore, have a custom title

3162: You want people to look at and admire your custom title

3163: LOOK AT IT!!! :P

825
Computer Programming / Re: Gif to pixel data help
« on: August 04, 2012, 01:46:19 pm »
Okay, here's an example I made that shows loading a gif and displaying it as an animation.  You should be able to look at this and adapt it for what you need.  If you need help, just ask, or if you want me to try and adapt it for you, I could try, you'll just need to provide a little more info on the code structure of the project =P

Code: [Select]
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.Iterator;
import javax.imageio.*;
import javax.imageio.metadata.*;
import javax.imageio.stream.*;
import org.w3c.dom.*;

public class GIFTEST {
    public static void main(String[] args) throws IOException {
        File input = new File("cat.gif");
        ImageInputStream stream = ImageIO.createImageInputStream(input);
        Iterator readers = ImageIO.getImageReaders(stream);
        if (!readers.hasNext()) throw new RuntimeException("No image reader found");
        ImageReader reader = (ImageReader)readers.next();
        reader.setInput(stream);
        int num = reader.getNumImages(true);
        GifFrame[] frames = new GifFrame[num];
        for (int i = 0; i < num; i++) {
            frames[i] = new GifFrame();
            BufferedImage image = reader.read(i);
            frames[i].i = image;
            IIOMetadata meta = reader.getImageMetadata(i);
            NodeList nodes = meta.getAsTree(meta.getNativeMetadataFormatName()).getChildNodes();
            for (int x = 0; x < nodes.getLength(); x++) {
                Node n = nodes.item(x);
                if (n.getLocalName().equals("GraphicControlExtension")) {
                    NamedNodeMap atts = n.getAttributes();
                    frames[i].time = Integer.parseInt(atts.getNamedItem("delayTime").getNodeValue());
                    frames[i].dispose = atts.getNamedItem("disposalMethod").getNodeValue();
                    frames[i].wait = Boolean.parseBoolean(atts.getNamedItem("userInputFlag").getNodeValue());
                }
            }
        }
        stream.close();
       
        Frame f = new Frame("GIF Test");
        GifAnimator ga = new GifAnimator(frames);
        ga.setSize(400, 400);
        f.add(ga);
        f.pack();
        f.setVisible(true);
        ga.start();
    }
}

class GifFrame {
    public Image i;
    public int time;
    public String dispose;
    public boolean wait;
}

class GifAnimator extends Canvas {
    private GifFrame[] frames;
    private Thread animator;
    private boolean run = false;
    private int f = 0;
   
    public GifAnimator(GifFrame[] frames) {
        this.frames = frames;
    }
   
    public void start() {
        run = true;
        animator = new Thread() {

            @Override
            public void run() {
                while (run) {
                    for (int i = 0; i < frames.length; i++) {
                        f = i;
                        repaint();
                        try {sleep(frames[i].time * 10);} catch (Exception e) {}
                    }
                }
            }
           
        };
        animator.start();
    }
   
    public void stop() {
        run = false;
    }
   
    @Override
    public void paint(Graphics g) {
        g.drawImage(frames[f].i, 0, 0, null);
    }
   
    @Override
    public void update(Graphics g) {
        paint(g);
    }
}

This is perfect, I know exactly how to modify it, I just need to take each frame for each BufferedImage and get the pixel data array with getRGB, get the animation times, and number of frames like you did, and use those to display each frame for however long it needs to be.

Beyond that I'll just need to modify my code to support each drawable entity to have an array of arrays of ints to hold each frame.

I'll modify it to my code tonight, thanks!

Btw, I've been looking all over Google for the solution to this issue and found nothing. Where did you learn the stuff for gif rendering and animation?

Pages: 1 ... 53 54 [55] 56 57 ... 139