Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

About akaikiwi and stuff

>> Monday, March 28, 2011

As I've now started University I have less time for hobby coding, I'm working on some Java stuff now, as that's what I use at university, I'm working with slick and making some game development, not a full game though, just things like GUI and stuff, once I put together some stuff I'll finish a RPG I was working on :)
About akaikiwi, it's development has drastically stopped, but I plan on finishing it, not now, but soon, I have to do some PHP for work but all Joomla! related (which to be honest I pretty much hate Joomla! awful implementation of MVC but oh well...).
I'd really love to have more time and see more RoR and Django but right now I can't, I want to finish akaikiwi first, although I do take some ideas from those frameworks, I'm really interested in Django on Appengine, I think I'll deploy my next web app there, which is probably gonna be a designer's resource site.
Once I have more free time I'll work on some nice stuff I have on hiatus :)

Read more...

NekoCM Utils released as Open Source!

>> Wednesday, May 5, 2010

You can now contribute to NekoCM Utils! Although I dont know if many people is interested right now ;)
I will surely have more projects later, anyways, feel free to contribute / edit / use / etc.
NekoCM Utils is released under the LGPL licence.
You can find the mercurial repository here: http://www.bitbucket.org/fedekun/nekocm-utils

Enjoy~!

Read more...

Patatamosh

>> Sunday, May 2, 2010

Patatamosh will be a 2D fighting game which I will develop in order to test BIP so far. I also want to make it very extensible, so characters code is embeded inside Patatamosh.
Characters code is in Groovy, which is a very nice interpreted dynamically typed OO language, and can also be used as normal Java. So you could just use Java to write your own characters code :)
So far it's going pretty smooth, I will post all updates here. Wish me luck! 

Read more...

NekoCM Util - Printer

>> Wednesday, April 28, 2010

This is a little utility I'm working on. It's still under development. Basically is a simple way to print something using Java.
Normally to print something you will need to use the Print API, which is pretty annoying, so i googled and found this tutorial, it worked very good! For simple purposes is the easiest way by far.
I used it and by using it I realised I could make an API with the simple stuff I was doing, I planned on improving it later, and that would be some work because you would normally want to do that when using that tutorial source code, so I decided to do that, the result is very nice! It really helped me.
Right now the first NekoCM Util class is about printing, under the package com.blogspot.nekocm.util.print.
The idea behind that is basically make a print preview window, in the window there is a JPanel in which you draw what the page (Currently only A4 size) is gonna look like. And that's it! No worries about anything else, here is the example code.

PrintExample.java

import javax.swing.*;

import com.blogspot.nekocm.util.print.PreviewPrint;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class PrintExample extends JFrame {
 public PrintExample() {
  super();
  this.setTitle("NekoCM - Print example");
  this.setSize(new Dimension(300, 200));
  this.setVisible(true);
  this.setLocationRelativeTo(null);
  this.setLayout(new FlowLayout());
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

  JButton btn_print = new JButton("Print");
  btn_print.addActionListener(new ActionListener() {
   @Override
   public void actionPerformed(ActionEvent arg0) {
    new PreviewPrint(new PrintExamplePanel());
   }
  });
  this.getContentPane().add(btn_print);

 }

 public static void main(String[] args) {
  try {
   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  } catch (Exception e) {
   // best to do nothing here
  }
  new PrintExample();
 }
}

PrintExamplePanel.java

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;

import com.blogspot.nekocm.util.print.PreviewPanel;

public class PrintExamplePanel extends PreviewPanel {

 public PrintExamplePanel() {
  super("A4");
 }

 @Override
 public void paint(Graphics2D g) {
  Graphics2D g2d = (Graphics2D) g;
  g2d.setColor(Color.WHITE);
  g2d.fillRect(0, 0, this.getWidth(), this.getHeight());
  g2d.setColor(Color.BLACK);
  g2d.setFont(new Font("Arial", Font.PLAIN, 20));
  this.writeAligned(20, "center", "Neko CM", g2d);
  g2d.setFont(new Font("Arial", Font.PLAIN, 11));
  this.writeAligned(-1, "left", "\nThis is an example\n"
    + "of NekoCM Print lib", g2d);
  this.writeAligned(-1, "right", "Enjoy~", g2d);
  this.writeAligned(-1, "center", "\n\nhttp://nekocm.blogspot.com", g2d);

 }

}

That will produce something like this



You can now download the Eclipse example project or just download the api.
Hope you find this useful! I will update this as soon as I improve it, although right now I'm more into BIP (which is also improving by the way ;))

Read more...

Generic Game

>> Saturday, April 24, 2010

BIP is 60% finished, and my first project with it, may be an overkill, aiming to improve it, (although it does not requires a tile map! which is what BIP is needing right now) I'll make a fighting game, but i want the game to be somehow like MUGEN, so you can customize the characters, each attack, animation, etc. I have interesting ideas, which I will post if i succeed with the first steps. Whish me luck!

Read more...

BIP - Managers

>> Thursday, April 22, 2010

I added a Sprite Manager and Audio Manager to BIP, now is very easy to load and play sounds. The Sprite Manager basically is a Vector with many sprites, so is easier to update and draw them all, is somewhat similar to DarkGDK way of managing sprites if you want to think it like that, you can check for collision doing something like this:

if(manager.pixelCollide(1, 5)) { /* Collision! */ }

That will check for collision between sprites 1 and 5.
Also I added a Button class inside the "gui" package, it's a very basic abstract class, the way you make buttons will be inherit from that class, and define your own actionPerformed method, then just call it with an image and a location, and optionally an image for the hover state.

BIP seems to be doing pretty nice so far, so I'm planning on using it in a small project now, which do not need tiled maps, to test it and improve it.

Read more...

More advances with Java and BIP

>> Tuesday, January 12, 2010

So right now i'm working on the Sprite class, which will handle basic sprites and spritesheets.
To use it basically you will have to make a new class and extend the Sprite class, and just define the update method. Later on the main loop just do mySprite.update(); and mySprite.draw(); and it will do :)
You will be able to add animations if it's a spritesheet, just like by doing something like addAnimation("walking", arrayOfIntsRepresentingFramesSecuence); so later you will be able to just switch animations. Also there will be an option to set a default animation, which could be the character just standing there, which will be set each time the user input is null.
Another thing the class will have is collision detection, rectangle and pixel-perfect.
The input class is pretty simple but I really like how i turned out, it's very easy to use.
Once i finish the Sprite class i think i will continue with sound, and then with tiled maps.
As i don't have much experience with network programming i dont think i add this feature for a while, at least untill i tried some games and play with networking for a while.
Also it's possible but i dont think i do, it's add 3D support, i dont have much experience in this issue and i'm not sure of Java capabilities with this, if i have to add OpenGL for this to work good i dont think i add it, mostly because i dont know much OpenGL, and also i want this to be pure java for certain reasons, so, maybe just for fun i could add it with normal Java but, we'll see, i dont really think so, plus the priority is 2D, BIP will be a 2D library so probably 3D wont be there.

Read more...

Advances with Java and BIP

My little BIP library seems to become reality in a not very distant future, of course it still needs a lot of work but as i read my books, i add and develop that part of the framework, for example i finished graphics and input chapters and i implemented them on my framework, while testing a little game :)
The final touches will be useful functions, such as a nice Sprite class, Mappy loader, etc.
Right now, i made it possible to make windowed and fullscreen games, and if windowed, the window size fixes itself so the drawing area is actually what you request.
The architecture so far is simple and similar to all libraries out there, extend the Game class, implement the abstact methods and just start making your game without worrying about low level stuff and using what you know of Java Graphics2D object.
It uses Page Flipping / Double Buffering automatically depending on the situation (Fullscreen capabilities, windowed mode, etc) and it uses "the delta method" of managing updates, this means it doesnt try to keep always the same rate of UPS' but instead it gives you the time it has passed since the last frame update so you can calculate how much to move stuff, this is also known as a way to set speed to "pixels per millisecond" which is my favourite way because its simpler.
The method i use to check for input is similar to Flixel's i think, just a static Input class with a lot of nice methods to check for keyboard and mouse events (KeyDown, KeyHit, MouseX, etc).
I will post here the progresses of my little library and i hope i can finish it and it gets to be a nice and simple library, mostly for me, and my university projects which doesn't allow me to use third party libs, but also to share with the programmers community which has helped me so much during the few years i have been around.

Read more...

New Riders Publishing - Developing Games in Java Review

>> Sunday, January 10, 2010


This book is one of the best i ever saw / read, about Java Game Programming.
It assumes you already know Java and start from Chapter 2 with game programming! (Chapter 1 is about Threads!)
It explains everything really nice, and step by step.
I just read it to Chapter 3 so far, but i felt like making a review now because i have to admit that is one of the bests i saw (I skipped some chapters to see how it is though, hehe).
If you are serious about Java game programming this is a must. I like it much more than "Killer Java Game Programming", although that is also a very good book which is reccommended to read after / before this one if you are serious on Java game programming, so i probably will finish reading that one later ;)
For now, i will keep with this one untill i finish it, im pretty excited! As i'm not a beginner game developer (not a pro also) i like to go straight to the point, and not have to eat those long Java explanations you already know! :)
This book is definitely recommended! 5/5.

Read more...

Java Game Programming

Right now, im playing with Java game programming. Plain Java, with FSEM, Swing and AWT.
I wont use OpenGL libraries like Slick for personal reasons :)
I like using plain java though, after i write some games i might try making a simple library to help me setup games faster, and will make it public, probably under BSD licence.
The project i want to make is a simple Fighting Game, so i will need to implement very good collision detection, and i wont need tiles for this game :)
It will be oriented to multiplayer games, not networking though, assuming both are on the same PC.
I will later implement the AI to play against the "machine". There is a long way to go, and i will post here my advances.

Read more...

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP