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

Pages: [1] 2 3 ... 12
Game Development Artistry / Re: Pixel Genie
« on: 2017-05-28, 10:52:21 AM »
I started on it about two weeks back after seeing a cool pixel art tutorial, not really for 2.3 initially so much as for prototyping some tiles. But when I started playing around with the light source I realized it wouldn't be hard at all to add UV support and thought of you guys.  :)

Game Development Artistry / Re: Pixel Genie
« on: 2017-05-26, 09:48:42 PM »
It generates the tiles algorithmically based on the type of generator selected from the dropdown, so no support for importing existing tiles.

The different height map generators create different patterns, and you can tweak the ranges of just about anything on each generator. The default is the DemoGenerator which doesn't do much except show off how you can mouse over the canvas to move the light source. The examples in my screenshot are:
  • BrickGenerator with default parameters
  • LeafGenerator with the leaf count bumped up to 40
  • BarkGenerator with default parameters
  • ShapeScatter with a high object count, and a 5 to 8 sided pyramid as the selected shape
  • ShapeArray with a RoundedBlock as the selected shape
  • ShapeArray with a truncated 4-sided pyramid as the selected shape

Feature bloat was in full-effect here, and instructions weren't a high priority. I may add some better documentation.

Game Development Artistry / Pixel Genie
« on: 2017-05-26, 06:42:11 PM »
Hey all! I've been working on a site for churning out quick, decent-looking tiles for another project. After a little spit and polish, I've got it usable for the masses. Maybe someone here can get some use out of it. I built it with color tiles like below in mind, but I tweaked it to allow for UV map generation which would come in handy for SGDK 2.3!

Check it out here: Pixel Genie

Here are some examples of the tiles it spits out:

General Discussion / Re: Node with SGDK2
« on: 2015-03-24, 05:11:44 PM »
I really just poked through the save code and found it was just stringifying things, so I just decided to pack up my stuff in the same way. In addition to sprite data, I also have chat messages and such to pass around. I may end up using the whole save/load set eventually. It's nice and separate from everything else, so it won't be a big change once I do rethink what data needs to be sent. I hadn't checked until just now, but a serialization of my dummy map with 20 sprites running around comes to 25 kb. Granted, I've got about 30 Mbps down, but only about 5 up, which amounts to 25 sends per second. It'll take a lot of trial and error to determine how frequently each client will need to download the game, and I'm still not sure how many players the game should support.

The html file is what I've been passing around. I don't have any hosting set up just yet, so I've just been emailing the html file to my friends. I found out that you can do limited free hosting through Google Drive, but it only serves up the page through https, and I haven't quite figured out self-signed certificates just yet.

General Discussion / Re: Node with SGDK2
« on: 2015-03-22, 09:49:22 PM »
Right now I'm pretty much flying by the seat of my pants, but I am working on a networked browser game with SGDK2 and Node.js. I've got a couple of friends helping me test, and the general development cycle is that we try out what I've got every Tuesday, then brainstorm what I should put in next.

I'll see if I can't capture some gifs or something next time we're testing, or maybe I can find a way to host the html file and have a semi-public demo (single-file export is a HUGE help when sharing with friends, so thanks a ton for that feature!).

I did use a bit of the serialization code from the save functions, but I've trimmed it down to pretty much just stringifying part of the sprite list to save on bandwidth. Still figuring out how to do this without making it unplayable for players with high ping.

General Discussion / Node with SGDK2
« on: 2015-03-19, 09:26:28 PM »
Hey all, I've been tinkering with networked games through sgdk, and I think what I've stumbled through will help anyone else out who might want to take a stab at it.

Node.js is a fun program that makes it pretty easy to run a server in javascript. This makes it good for plugging in to sgdk's HTML5 projects since they're based on javascript. The tricky thing with networked games is that the server and the client have a communication delay between them, so you can't very well run every frame on the server and send the results back to the client. It's much smoother to have both the client and server run the same game code, and synchronize periodically. I managed to get Node to accept sgdk's generated javascript as a module, but it doesn't like running it. Node runs through the console, which means there's no document or window object to reference. So here's how you can do it!

Set up your node directory like this:

NodeFolder (folder)
- myServerCode.js
- node_modules (folder)
- - sgdk (folder)
- - - index.js
- - - sgdk-lib (folder)
- - - - sgdk.js
- - - - sgdk-extend.js

myServerCode.js is your Node application. Do whatever you want here, and add these lines:

Code: ("myServerCode.js addition") [Select]
var sgdk = require('sgdk');

index.js is what ties all the files in the sgdk module back to Node:

Code: ("index.js") [Select]
var fs = require('fs');
filedata1 = fs.readFileSync('./node_modules/sgdk/sgdk-lib/sgdk-extend.js','utf8');
filedata2 = fs.readFileSync('./node_modules/sgdk/sgdk-lib/sgdk.js','utf8');
exports.startGame = startGame;
// This tells Node that the function startGame is to be exported and made accessible to the server code

sgdk.js is just the generated javascript file exported from the HTML5 project. I had to replace
Code: ("sgdk.js original") [Select]
mainLoop.interval = setInterval("pulse()", mainLoop.milliseconds);with
Code: ("sgdk.js edit") [Select]
mainLoop.interval = setInterval(pulse, mainLoop.milliseconds);
Finally, add sgdk-extend.js to dummy out the drawing functions in a mocked document/window:

Code: ("sgdk2-extend.js") [Select]
var document = new mocument();
document.elements = new Object();
document.elements['gameView'] = new mockGameView();

function mocument() {}
mocument.prototype.write = function(x) { console.log(x); }
mocument.prototype.getElementById = function(x) { return document.elements[x]; }
mocument.prototype.createElement = function(x) {}
mocument.prototype.querySelector = function(x) { return null; }

var window = new Object();
window.innerHeight = 768;
window.innerWidth = 1024;

function mockGameView() {}
mockGameView.prototype.getContext = function(x) { return new mockCanvas(); }

function mockCanvas() {}
mockCanvas.prototype.fillRect = function(x,y,w,h) {}
mockCanvas.prototype.strokeRect = function(x,y,w,h) {} = function() {}
mockCanvas.prototype.beginPath = function() {}
mockCanvas.prototype.rect = function(x,y,w,h) {}
mockCanvas.prototype.clip = function() {}
mockCanvas.prototype.restore = function() {}
mockCanvas.prototype.drawImage = function(i,x,y,w,h,x2,y2,cw,ch) {}

And voila, sgdk in a console!

(This is pretty much just a single sprite with initial velocity heading for a dead end, so no player input from the console)

You can add other exported functions so that you can perform game logic based on network communication. For instance, have the player send its position to the server every so often, and respond with the location of all other sprites. Hope this helps!

Projects / Re: Runaway Rabbit
« on: 2015-02-06, 09:42:25 PM »
Hey, sounds good! I whipped up a site through Google, so feel free to link it on the Facebook page:

As for the page configuration, it looks like I've got permissions to post to the Facebook page as far as I can tell.

Projects / Re: Runaway Rabbit - Now with gifs!
« on: 2015-02-01, 02:15:44 PM »
After adding a lot more content, I'm declaring this project "complete!"

This version includes ~25 levels and an in-game level editor.

Click here to download the exe and dlls (compiled through sgdk 2.2.10).
Click here for the (very messy) sgdk2 project file.

Projects / Re: Runaway Rabbit
« on: 2014-08-02, 04:40:28 PM »
Some of my testers have suggested Greenlight, but I think I'll need a lot more levels first. Right now it ends after the first boss (which unlocks wall jumps and flutter jumps), but I think about 5 or 6 times more content would be needed for a paid game.

Projects / Re: Runaway Rabbit
« on: 2014-08-02, 11:11:56 AM »
Glad you got it figured out, I'll make sure to update that for the next version.

And I'm very glad you like it!

The font is a little squished on the shop tiles, it's actually "Faster Carrot," which increases the speed of carrots you fire.

The circuits were may favorite feature to implement, and you're pretty close on how it works. The head of the circuit is a sprite that is only allowed to move through a circuit category of tiles. If it's unpowered, the tile value is incremented by 1. Each circuit head uses a custom sprite base which keeps track of its trail. When that list gets to a certain length, the tail end tile is decremented. The circuits support intersecting lines and splitting into multiple directions.

Projects / Re: Runaway Rabbit
« on: 2014-08-01, 10:42:14 PM »
That should be all it takes... The doors are triggered on the up input which is W by default in this project. I've tested this on a few different machines, so I really don't know what the issue is. Is W still listed as the up key under options?

Projects / Re: Runaway Rabbit
« on: 2014-08-01, 03:45:23 PM »
I haven't had any stability issues, but I haven't been running any AV since my last reinstall.

If you're worried, here's a zip of the .sgdk2 file: link

Projects / Runaway Rabbit
« on: 2014-07-30, 08:36:28 PM »
Hello everyone!

It's been a very, very long time since I've submitted a game here. I've been working on this project on and off for a few months, and it's finally polished up and ready to play! It's only demo-length, but I may add more levels in the future.

Runaway Rabbit (40 MB exe w/dlls)
Runaway Rabbit source (42 MB sgdk2)

+ A: Move left
+ D: Move right
+ W: Enter level
+ SPACE: Jump
+ P: Pause game

While paused:
+ S: Save game
+ L: Load game
+ Escape: Resume game

Weapons unlocked in the shop after level 4:
+ Cycle weapon - mouse scroll wheel
+ Draw weapon - hold left mouse button
+ Fire weapon - release left mouse button

Help, Errors, FAQ / Re: Check for mouse wheel scroll
« on: 2014-04-26, 09:04:36 PM »
Got a solution: in GameForm.cs, add this line to the InitializeComponent function:

Code: [Select]
this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.MouseWheelHandler);
And add in this function:

Code: [Select]
private void MouseWheelHandler(object sender, System.Windows.Forms.MouseEventArgs e) {

Not really built-in, but it works. Bluemonkmn, thanks for making all the classes easy to access :)

Help, Errors, FAQ / Check for mouse wheel scroll
« on: 2014-04-26, 01:54:57 PM »
Is there any method built-in that will let me check if the mouse wheel has been scrolled? IsMouseButtonPressed let's me check if the mouse wheel is clicked, but I'm looking for scroll up/down events.

Pages: [1] 2 3 ... 12