Showing posts with label framework. Show all posts
Showing posts with label framework. Show all posts

Wednesday, September 19, 2012

Artemis and niftyGui

0 commenti

Artemis is a good Entity System Framework library that helps coding your games. Core concept here is "Entity", that is only a container for Components, that hold data. Adding Systems to the game, you can draw stuff on screen, move it and so on.
More info on Artemis web site!


Nifty gui solves an old problem for Java game programmers: gui. You can define in an xml file your gui, or from Java code: the good thing here is you have decoupled from your game code gui management and this is really good.
For information see Nifty gui website!

My experiment

In my experiment I've tried both Artemis and nifty-gui and results are good! My idea was to replicate my old You can't win (I've wrote this game for Axiom contest, build a entity component system for it, so is not my first time on this topic) with Artemis.

lone shooter against horde of enemies!


Writing a game with Artemis is simple, once you have understood the basic concept of entities and in particular of systems. You can write complex games and not force you in a rendering system, because you write rendering system!
This works perfectly with Nifty-Gui: just wrote a simple user interface (see screenshoot) and place into my code: here we are!

Piece of code

For example here a RenderingSystem of my experiment:


package it.artemis.hello.system;

import it.artemis.hello.component.Transform;
import it.artemis.hello.spatial.SpatialForm;

import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;

import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.Entity;
import com.artemis.systems.EntityProcessingSystem;

public class RenderSystem extends EntityProcessingSystem {
 private Graphics g;
 private ComponentMapper renderMapper;
 private ComponentMapper trasformMapper;
 private boolean debug;

 @SuppressWarnings("unchecked")
 public RenderSystem(Graphics g, boolean debug) {
  super(Aspect.getAspectFor(SpatialForm.class, Transform.class));
  this.g = g;
  this.debug = debug;
 }

 @Override
 public void initialize() {
  renderMapper = world.getMapper(SpatialForm.class);
  trasformMapper = world.getMapper(Transform.class);
 }

 @Override
 protected void process(Entity e) {
  Transform transform = trasformMapper.get(e);
  SpatialForm spatial = renderMapper.get(e);
  spatial.getSpatial().draw(transform.getX(), transform.getY());
  if (debug) {
   g.setColor(Color.green);
   g.drawRect(transform.getX(), transform.getY(), spatial.getWidth(),
     spatial.getHeight());
   g.setColor(Color.white);
  }
 }
}

Nice, right? In this example I'm using SpatialForm (that hold entity image) and Transform (position, speed, rotation and so on) aspects and I'm using it in drawing of entities!

Conclusions

Experiment and investigations continues, but Artemis (in active development!) is a valid choice for any game developer and my suggestion is to have a decent gui written with nifty!

You can download source code from here!

Play on windows 32 bit here, move with WASD and fire with left mouse button

Wednesday, September 12, 2012

Love2d - first encounter

0 commenti

Love2d is an awesome library to make games. In last few days I've experienced a bit with it and now I'm ready to present my thoughts about it.

Getting started

Just follow guide on the wiki and setup your notepad++. Installation is easy and painless: click, download, start. Once installed love, you can play love games from the web, just download ".love" files and run. This "magic" is possible just because love files are .zip files, with all game-related resources into it.
After some thinking I'm okay with this, but scanning amazing useful love2d forums I've realized that this can be a side effect: anyone start from scratch, build something, then build a framework on top of Love2d.. it's crazy, right?
Anyway, just setup a fast-keyboard-run command on my notepad++ and I'm ready with HelloWorld Love2d program:

function love.draw()
    love.graphics.print("Hello World", 400, 300)
end
Not so exiting, but is the first step!

Pros

One good think about Love2d is you write with Lua, Is something different from Java or Actionscript, or even C# and I'm not here to teach you Lua. But with a scripted language is a way to change your way of thinking (maybe, I know!).
So first, forgot about classes and so on: you have functions, structs (like in the old c) and a lot of useful functions do deal with it.

Cons

Well.. Lua is not so easy. You want to remove something from a table? Is not possible, not in a way you like: you need to store index of element in table and then remove it.
Or again, you want to declare a new anonymous-type with some new properties? You can, but after few lines code could be a mess. You can, sure, use require to split your code in different files, but without an IDE (I mean, something like LuaEclipse) dedicated to Love2d (and again I've tried some of them) it's hard to handle big projects.

Conclusion

Love2d is great for small projects and challenge, to get something quick on screen. Lack of a decent IDE and knowledge of Lua can stop you from move from simpler examples to more complex games.
Distribution of games is really easy, something valuable this days.. so my suggestion is to take a look to love2d, because deserve it!


Love2d required, move with WASD, use mouse to shoot

Saturday, August 20, 2011

Alex the alligator and MelonJs

0 commenti

I've blogged before about html5 games and it's cool to see some examples of this new tecnology in action. A little well done platformer this time, try it out!
Claims works best on Chrome, but works fine with Firefox 5!

Bonus: made with MelonJS a javascript library to do html5 games, try it now!

Wednesday, August 10, 2011

FPBehaviors

0 commenti
FPBehaviors is a behavior-based component system for Flashpunk, something anyone really want for their games, but no-one cn afford to do.
Idea is simple, but powerful: don't write same code all the time. In this library developers can found some really useful behaviours, for example like FourWayBehavior: given an Entity (something in flashpunk developer can use to match active/inactive objects in game) this behavior let player to control it using arrows keys.
There are another behavior and tests too, so no excuses, just try it ! (it's open source, of course!)

Saturday, February 26, 2011

MarteEngine 0.2

0 commenti

MarteEngine (ME) is a Java videogame engine with it's focus on a simple, clean API for fast game development.

Major inspiration comes from (Flashpunk) and (Slick forum).

Authors are Alberto "Gornova" Martinelli and Thomas "Tommy" Haaks

Features

  • entity based framework: everything in your game is an Entity, many things are already coded, no reinventing the wheel anymore!

    • basic physics
    • collision detection
    • a standard way to organize your project

  • manipulate your entities: rotate, scale, animate using tweens,

  • examples! Ready to play and easy to learn! (click to play!):

  • distribuite your game: windows exe, webstart, applet all done using ready-to-run ant tasks, fast and easy

  • based on proven libraries: Slick and Lwjgl

Monday, February 21, 2011

Noel Berry's HTML5 engine

0 commenti


I've talked many time before about HTML5 and how variuous library (SpriteJS or ImpactJS) could help game developers.
Anyone are free to think anythink, but I think that HTML5 could be (in next five years) a giant step for internet and obviously for internet games too.

In my vision is great to see many people experimenting with html5 and in particular with canvas. Noel have made a really good job with this library and I hope he will continue to share his work with community!

Sunday, January 9, 2011

SpriteJS

0 commenti
SpriteJs is a framework to build games for a different range of platforms: desktop and mobile too. Last month I've talked about ImpactJS and now I can show you a little and promising framework to do similar things like ImpactJS but free!

Key point of this framework are ability to swtich between canvas (HTML5 anyone?) and normal rendering and extreeeme ease of use. To demonstrate that I've done a little HelloWorld example for SpriteJS, you can download it here.

I don't know future, but if this kind of libraries can provide secure and fast deploy way for games both players and developers will have great convenience, for example:
  • more platforms => more players (keep in mind new smarthphone, even IPhone or Htc),
  • fast time in developing => no need to compile => more time for games,
  • better Javascript and Html5 performance for major browsers => fast games,
  • browsers => no more forced on one os => more players (I'm watching you linux-gamer, I know that you exist, even for casual game!)
There are issues, I know it: first implementations on varius browser of html5 new tags (canvas on top of it) will sucks and there are problems on code obfuscating to keep my games's sources code hidden.. but are problems that will be solved.

As written before, I believe in this little "market" of open sources engines for videogame to place side by side with business options, why not?

Monday, December 20, 2010

Impact JS - only for money?

10 commenti
Seems to be incredible that a great framework to do HTML5 games will be sell for 99$.. too much for a little market with no way (for now) to try something on coding site :(


"You couldn't consider releasing a free license for non-commercial development?"

A non commercial license with good opensource option (even with dual license system) could be a good point to build a big community of HTML videogame programmers, an occasion lost I think.. so: think twice!

Thursday, December 9, 2010

Advanced Platform Engine v0.90

3 commenti
I've talked before of this useful classes to build a simple platformer in Flash (and Flashpunk 1.5 !): finally I post here a news about latest version of this Engine! See here on Flaspunk forum for more information!

Saturday, December 4, 2010

HTML 5 games, jammed!

0 commenti
Quick links to understand how not only something is moving, but is running!
Games build with only HTML5 are now reality and can be run into your browsers, mobile too. So interesting!!

Monday, November 8, 2010

Flashpunk is more alive than ever!

2 commenti

Flashpunk is a really good library to develop games (see my AirHeat and Zombie Employee) with flash, I've talked a lot before and develop some games with it:

- Flashpunk useful classes: sitelock, show static and moveable messages, starfield. A good idea with lot of potential, works fine with 1.4+ version of Flashpunk
- Flashpunk JRRPG Engine: impressive engine to build in simple way games like Final Fantasy 6 and Lufia. There are some useful on-going blog tutorial, to understand concept behind it.
- Flashpunk MicroRPG Engine: I've not try it, but seems to be a good starting point to developm a little rpg :D
- Flashpunk/Box2d integration for physics: do you want physics in your game? Come here! With great Box2d behind scenes, with good performance and scalability.
- Flashpunk MMORPG Engine: a massive work, just try it! Actionscript 3+ PlayerIO works together to help you in developing new great games,
- Flashpunk Advanced Platform Engine: my favorite fp-side project. A powerful set of classes to develop platforms games with flash

Do you want to develop with Flash? Try Flashpunk :D

Saturday, November 6, 2010

Airheat, out!

1 commenti

Save trees in desert, throw barrells full of water on dead tree and bring them back to life!

Airheat is my new game made with Flashpunk for Heat Contest on Gamejolt forum: made in 4 days, is really "casual", one play and go. But I've decided to build it to think about game mechanics and prove how simple is to build a videogame.
I've also used Ogmo editor to build levels: nice to use!

It's not perfect but I really enjoyed to build it, in particular design gameplay: decide what barrells have to do, storm and so on :D

Play on GameJolt

Play on Kongregate - and challenge your friend with Highscore!

Thursday, November 4, 2010

Pong: Flash vs HTML5

0 commenti
Html5, Flash? For videogames?

Little and nice experiment: FlashVsHtml5.

Using new browsers (Chrome, Firefox or Safari) is cool to see how both technology can live together and interact!

Monday, September 13, 2010

Impact JS

0 commenti

Impact is a new, unreleased Javascript library for videogames and you can find all information his blog.

Play now Biolab Disaster and be happy

What makes Impact really intersting? Because will be released as opensource and have this amazing video with a really promising onlin editor


Biolab Disaster - HTML5 Game from Dominic Szablewski on Vimeo.




Now I can say something is moving ? No, someone is running!

p.s: Komodo Edit seems to be a really nice IDE to work with Javascript

Thursday, September 9, 2010

Something is moving

6 commenti
Something is moving in brower's games (see my last posts about it: html5 library and here). Mozilla Labs start a Gaming initiative with a contest about it and it's interesting because:

1) big organization focus on browser's games,
2) Firefox 3/4, Chrome 6 (and chromium), Safari, Internet Explorer 9 have support for html5 and have fast JavaScript engines,

It's not a great point in history of video-games, but I see some problems that only time will solve:

- lack of IDE for testing,
- lack of standard for developing in html5: will my code run same in Firefox, Safari, Chrome and IE ?
- how much users are interested on it?

Only questions for now, but is a starting point

Tuesday, August 17, 2010

Advanced Platform Engine - by me

2 commenti

Last post I've talked about Advanced Platform Engine a nice idea from Noel on Flashpunk forums.
News today is that I've added some nice feature on top of APE, in particular:

- double jump (tnx to Maikel_Ortega)
- shoot (tnx to me)
- wall jump (tnx to me and ideas from here)
- added double jump/shoot/wall jump power up to editor and into Engine
You can click on image to play and remind that controls are:
- LEFT and RIGHT ARROWS, moves left and right
- X, jump
- X twice to double jump
- jump to wall then hit X to wall jump
- C, shoot


Download source code now

p.s: It's not a game, for now!

Quick update: last demo here, try it out!

Monday, August 16, 2010

Advanced Platform Engine

0 commenti

Noel did again and release a new Open Source Platform Engine for FlashPunk with more "advanced" features, like:
- slopes,
- movable platforms,
- pushable blocks like Zombie Employee,
- electricity,

you can try it now!

Nice work!

Wednesday, August 4, 2010

Open source platform engine

0 commenti

You always wanted to build a little game and if you are from '80, your eyes are full of games from 8bit (or 16bit) -era, like Sonic, Super Mario and so on.
You study informatics, or just have a computer and you think "hey, I want do build a game!", but how can I ?
Maybe you already know Actionscript 3 and build something with Flashpunk.. and always wanted to build a game like my Zombie Employee.. and now?

Now using Open Source Platform Engine you have all you need to build a platform.

You have easy way to put sprite on screen, let player control it and design levels with Ogmo Editor.. start creating!

Good work Noel!

Thursday, July 1, 2010

Akihabara - Html5 Library

2 commenti

Akihabara is a Html5 library to build game that needs only your browser (a modern one, like Firefox 3.6, Chrome or IE8).
Screenshoot refeer to Legend of Sadness a cute Action Rpg reminds Zelda a lot and cool thing is that all this stuff running without any plugin: no flash, no bad stuff to download. Simply amazing!
I wonder if Html5's games development will be killed because Google put Flash into Chrome browser (and obviously in ChromeOs), but there are different view on this topic, right? (Steve Jobs, for example and his "crusade" against Flash).
From developer point of view (as I am) new frameworks, languages and platform can give to me first and then to my players new and simpler ways to do most important thing: play.

So, welcome Html5, welcome Java, welcome Flash!

Monday, June 14, 2010

As3 Game Gears

0 commenti
Are you an experienced programmer in As3 in searching of a new library to build game or maybe just have fun in programming? As3 Game Gears could help you!! Try it!
New frameworks, library and much more!