[ / / / / / / / / / ] [ dir / asmr / egy / fur / polk / pone ][Options][ watchlist ]

/agdg/ - Amateur Game Development General

AGDG - The Board

Catalog

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

Welcome to AGDG, have you ever made a game?
See also: /ideaguy/ | /vm/

File (hide): 1455058386026.png (294.17 KB, 2000x2000, 1:1, 2000px-Processing_Logo_Cli….png) (h) (u)

[–]

3d1578 (1) No.25213[Watch Thread][Show All Posts]

How's Processing? I heard it's good for first time 2D devs.

b365ba (4) No.25218>>25223

I've used it for basically animated demonstrations for school years ago. Stuff like how bitorrent works, or how a neural network converges. Once I made a thing for StarCraft that blows up the mini map on a second monitor.

It made these things really easy, but unfortunately I've never tried to write a game in it.


4234eb (1) No.25219

File (hide): 1455085735463.jpg (10.35 KB, 125x102, 125:102, dag.JPG) (h) (u)

If its your first time, go with unity, unreal, or gamemaker. There are a few libraries for making games but everything you can do there can be done more easily in any of those other engines. If you are already proficient in processing then using C# with unity will be easy for you.


2ac6e2 (2) No.25223>>25251 >>25252

>>25218

>a thing for StarCraft that blows up the mini map on a second monitor

Hey that sounds really similar to something I've been needing for a while. Know very little about Processing though, care to elaborate a little on how you set it up?


b365ba (4) No.25251>>25252

>>25223

I used java.awt.robots to make screen captures, I remember.


b365ba (4) No.25252>>25255

>>25223

>>25251

// Use this program to magnify the minimap in starcraft 2

// Use

// w - a - s - d

// to adjust where the window magnifies, and hold shift for more precise movements

// Use plus (+) and minus (-) to zoom in and out

// the default is 4x zoom, more or less

import java.awt.image.BufferedImage;

import java.awt.*;

PImage screenShot;

GraphicsEnvironment ge;

GraphicsDevice[] gs;

DisplayMode mode;

Rectangle bounds;

BufferedImage desktop;

Robot robbie;

boolean verbose = true; // do you want those dimensions and coordinates in the console?

// These numbers work for me.

// For your own numbers, watch what comes out of the console as your move around

int rectX = 1287;

int rectY = 703;

int rectWidth = 300;

int rectHeight = 300;

// found automatically

int maxWidth;

int maxHeight;

// Initializes all the variables and whatnot that we are going to use. This is run once.

// We are using Java's Robots class to get the screen captures

void setup() {

  size(screen.width, screen.height);

  frameRate(60);

  frame.setResizable(true);

  

  ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

  gs = ge.getScreenDevices();

  mode = gs[0].getDisplayMode();

  

  maxWidth = mode.getWidth();

  maxHeight = mode.getHeight();

  

  bounds = new Rectangle(rectX, rectY, rectWidth, rectHeight);

  desktop = new BufferedImage(maxWidth, maxHeight, BufferedImage.TYPE_INT_RGB);

  rectWidth = maxWidth / 4;

  rectHeight = maxHeight / 4;

  try{

    robbie = new Robot(gs[0]);

  }catch(Exception e){

    System.err.println("Unable to make a new robot.");

    

  }

}

// get the screen capture and display it

// This is run continuously at the frame rate specified in setup()

void draw () {

  screenShot = getScreen();

  image(screenShot,0,0, width, height);

}

PImage getScreen() {

  desktop = robbie.createScreenCapture(bounds);

  return (new PImage(desktop));

}

void keyPressed(){

  switch( key ){

    // coarses

    case 'w':

      rectY -= 50; break;

    case 's':

      rectY += 50; break;

    case 'a':

      rectX -= 50; break;

    case 'd':

      rectX += 50; break;

    

    // FINE (hold shift)

    case 'W':

      rectY -= 1; break;

    case 'S':

      rectY += 1; break;

    case 'A':

      rectX -= 1; break;

    case 'D':

      rectX += 1; break;

      

    // zoom

    case '+':

      rectWidth += 1; rectHeight += 5; break;

    case '-':

      rectWidth -= 1; rectHeight -= 5; break;

      

    default:

  }

  

  boundsCheck();

  if(verbose){

    println("x" + rectX); println("y" + rectY); println("w" + rectWidth); println("h" + rectHeight);

  }

  bounds = new Rectangle(rectX, rectY, rectWidth, rectHeight);

  

}

void boundsCheck(){

  // lower bounds

  rectX = rectX < 0? 0: rectX;

  rectY = rectY < 0? 0: rectY;

  rectWidth = rectWidth < 25 ? 25 : rectWidth;

  rectHeight = rectHeight < 25 ? 25 : rectHeight;

  

  // upper bounds

  rectX = rectX > maxWidth + rectWidth ? maxWidth + rectWidth: rectX;

  rectY = rectY > maxHeight - rectHeight? maxHeight - rectHeight: rectY;

  

}


2ac6e2 (2) No.25255>>25256

>>25252

Sweet, thanks a lot!


b365ba (4) No.25256

>>25255

Word man, enjoy it




[Return][Go to top][Catalog][Screencap][Update] ( Scroll to new posts) ( Auto) 5
7 replies | 1 images | 4 UIDs | Page ?
[Post a Reply]
[ / / / / / / / / / ] [ dir / asmr / egy / fur / polk / pone ][ watchlist ]