Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 02:43:14 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsRed Rogue
Pages: 1 ... 3 4 [5] 6 7 ... 69
Print
Author Topic: Red Rogue  (Read 238075 times)
Zaid Crouch
Level 0
***


*doink*


View Profile
« Reply #80 on: November 01, 2009, 07:36:29 PM »

Loving that demo!   Addicted

One minor thing is the health bar can get in the way a little on occasion. I think I lost my football behind it Sad
Logged

st33d
Guest
« Reply #81 on: November 06, 2009, 06:11:21 PM »

Well here's the sprite sheet if anyone has their own take on it:



I'm currently working on optimising the lighting engine. I've already got a solution, I just need to apply it. Putting off items a bit because it's such a huge milestone, but it will happen.
Logged
Loren Schmidt
Level 10
*****



View Profile WWW
« Reply #82 on: November 07, 2009, 10:19:44 PM »

I just played the combat demo you put up. This is looking pretty promising. You've got a good feel for making things feel nice and visceral. I'm looking forward to seeing a complete game that's the product of your attention to detail.

How did you do the blood splash that happens when an enemy dies? I quite like that one (the effects and animation in general are quite minimal and nice).
Logged
st33d
Guest
« Reply #83 on: November 08, 2009, 03:18:55 AM »

The workhorse of my particle effects is the BitmapSprite class:

Code:
package com.robotacid.gfx {

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;

/**
* Provides a less cpu intensive version of a Sprite
* Ideal for particles, but not for complex animated characters or large animations
* Also operates as a super class to BitmapClip
*
* @author Aaron Steed, robotacid.com
*/
public class BitmapSprite {

public var x:int, y:int, width:int, height:int;
public var dx:int, dy:int;
public var rect:Rectangle;
public var data:BitmapData;

public static var p:Point = new Point();
public static var mp:Point = new Point();
public static var bounds:Rectangle;

public function BitmapSprite(mc:DisplayObject = null) {
x = y = 0;
if(mc != null){
bounds = mc.getBounds(mc);
data = new BitmapData(Math.ceil(bounds.width), Math.ceil(bounds.height), true, 0x00000000);
data.draw(mc, new Matrix(1, 0, 0, 1, -bounds.left, -bounds.top));
width = bounds.width;
height = bounds.height;
dx = bounds.left;
dy = bounds.top;
rect = new Rectangle(0, 0, Math.ceil(bounds.width), Math.ceil(bounds.height));
}
}
public function render(destination:BitmapData, frame:int = 0):void{
p.x = x + dx;
p.y = y + dy;
destination.copyPixels(data, rect, p, null, null, true);
}
public function init(data:BitmapData, dx:int = 0, dy:int = 0):void{
this.data = data;
this.width = data.width;
this.height = data.height;
rect = new Rectangle(0, 0, data.width, data.height);
this.dx = dx;
this.dy = dy;
}
/* Given a plane of multiple bitmaps that have been tiled together, calculate which bitmap(s) this
* should appear on and render to as many as required to compensate for tiling
*
* bitmaps is a 2d Vector of tiled bitmapdatas
*/
public function multiRender(bitmaps:Vector.<Vector.<Bitmap>>, scale:int = 2880, frame:int = 0):void{
var inv_scale:Number = 1.0 / scale;
var h:int = bitmaps.length;
var w:int = bitmaps[0].length;
// take point position
p.x = x + dx;
p.y = y + dy;
// find bitmap boundaries in tiles
var left_tile_x:int = (p.x * inv_scale) >> 0;
var top_tile_y:int = (p.y * inv_scale) >> 0;
var right_tile_x:int = ((p.x + width) * inv_scale) >> 0;
var bottom_tile_y:int = ((p.y + height) * inv_scale) >> 0;

// logically the bitmap will only be painted onto 1, 2 or 4 tiles, we can use conditionals for this
// to speed things up
// Of course with the option of scale, this could mean painting to many more bitmaps, and such a
// task can fuck right off for the time being

// only one tile to paint to
if(left_tile_x == right_tile_x && top_tile_y == bottom_tile_y){
if(left_tile_x > -1 && left_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
}
// two tiles to paint to
else if(left_tile_x == right_tile_x && top_tile_y != bottom_tile_y){
if(left_tile_x > -1 && left_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
if(left_tile_x > -1 && left_tile_x < w && bottom_tile_y > -1 && bottom_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * bottom_tile_y);
bitmaps[bottom_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
} else if(left_tile_x != right_tile_x && top_tile_y == bottom_tile_y){
if(left_tile_x > -1 && left_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
if(right_tile_x > -1 && right_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * right_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][right_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
}
// four tiles to paint to
else if(left_tile_x != right_tile_x && top_tile_y != bottom_tile_y){
if(left_tile_x > -1 && left_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
if(right_tile_x > -1 && right_tile_x < w && top_tile_y > -1 && top_tile_y < h){
mp.x = p.x - (scale * right_tile_x);
mp.y = p.y - (scale * top_tile_y);
bitmaps[top_tile_y][right_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
if(left_tile_x > -1 && left_tile_x < w && bottom_tile_y > -1 && bottom_tile_y < h){
mp.x = p.x - (scale * left_tile_x);
mp.y = p.y - (scale * bottom_tile_y);
bitmaps[bottom_tile_y][left_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
if(right_tile_x > -1 && right_tile_x < w && bottom_tile_y > -1 && bottom_tile_y < h){
mp.x = p.x - (scale * right_tile_x);
mp.y = p.y - (scale * bottom_tile_y);
bitmaps[bottom_tile_y][right_tile_x].bitmapData.copyPixels(data, rect, mp, null, null, true);
}
}
}
/* Creates an array of bitmaps to render to stitched together to compensate for the minimum bitmap size
*
* holder is the Sprite that will stand as parent to all these bitmaps
*/
public static function createMultiRenderArray(width:int, height:int, holder:Sprite, scale:int = 2880):Vector.<Vector.<Bitmap>>{
var w:int = Math.ceil(width / scale);
var h:int = Math.ceil(height / scale);
var bitmaps:Vector.<Vector.<Bitmap>> = new Vector.<Vector.<Bitmap>>(h, true);
var r:int, c:int;
var bitmapdata:BitmapData, bitmap:Bitmap;
for(r = 0; r < height; r += scale){
width = scale;
bitmaps[(r / scale) >> 0] = new Vector.<Bitmap>(w, true);
for(c = 0; c < width; c += scale){
if(c + width > width) width = width - c;
if(r + height > height) height = height - r;
bitmapdata = new BitmapData(width, height, true, 0x00000000);
bitmap = new Bitmap(bitmapdata);
bitmap.x = c;
bitmap.y = r;
bitmaps[(r / scale) >> 0][(c / scale) >> 0] = bitmap;
holder.addChild(bitmap);
}
}
return bitmaps;
}

}

}

I basically have a bitmap that is tracking the view port that I clean each frame with fillRect and then render all the particles to. This method allows upto 800 particles before the chug sets in.

The particles then use verlet integration to fly about and raycast for collision with the walls.

When the particles hit a wall and resolve, the multiRender function is called. Because maps will be bigger than the maximum bitmap size in flash (2880 x 2800 pixels), I use createMultiRenderArray to make a massive bitmap out of smaller bitmaps tiled together.

So I have a big transparent bitmap that sits over the entire level that I can paint anything onto. And that's what I paint the blood on to when it comes to a rest. Allowing me to destroy the particle and recover cpu usage.

I could effectively allow the player to tag walls if I wanted to, with no loss of performance.
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #84 on: November 08, 2009, 08:14:10 AM »

Great! Kicking a few heads around is always fun. I like where this game is going.   Wink
Logged
oryx
Level 3
***



View Profile
« Reply #85 on: November 08, 2009, 04:13:51 PM »

Looking cool! - only suggestion for combat so far would be that it would be nice to have multiple weapon types or swords etc. Not sure if that is in the plans.
Logged
st33d
Guest
« Reply #86 on: November 09, 2009, 05:31:36 AM »

There's 5 melee weapons at the moment, the only difference being the damage they do, and the bow. The bow is obviously crap for damage, but with magic added to it it's very powerful.

A lot of the flavour is going to come from the runes. So you can get different brands of weapon by tooling them up with different runes. I'll need to figure out a hot key system so you can swap active weapons.
Logged
pla1207
Guest
« Reply #87 on: November 12, 2009, 12:18:49 PM »

hey, demos looking great..don't know if somebody mentioned it already but I will now: Why's sometimes walking around is kind of bulky?She(?) stops and just shaking her hands but don't move like she should..hope you know what i mean ?!
besides that :Good job !  Hand Thumbs Up Left
Logged
st33d
Guest
« Reply #88 on: November 13, 2009, 01:51:36 AM »

She(?) stops and just shaking her hands but don't move like she should

Whut?  Concerned
Logged
gambrinous
Level 4
****


Indie Game Developer


View Profile WWW
« Reply #89 on: November 13, 2009, 04:47:17 AM »

Nice work so far!
Logged

pla1207
Guest
« Reply #90 on: November 13, 2009, 01:20:27 PM »

She(?) stops and just shaking her hands but don't move like she should

Whut?  Concerned
i've recorded my issue


second 37 shows it quite good that the character is moving not normal,not responding to the conrtols and walking against the wall.
I use Ubuntu Linux
Logged
Loren Schmidt
Level 10
*****



View Profile WWW
« Reply #91 on: November 13, 2009, 01:57:30 PM »

Hello, I'm just stopping by to wish you well. I'm really looking forward to your next release. Cheers!
Logged
st33d
Guest
« Reply #92 on: November 13, 2009, 02:08:43 PM »

She(?) stops and just shaking her hands but don't move like she should

Whut?  Concerned
i've recorded my issue


second 37 shows it quite good that the character is moving not normal,not responding to the conrtols and walking against the wall.
I use Ubuntu Linux

That's the first demo. The demo before I made MASSIVE changes to the game engine. The demos are there to show progress, if I spent all my time maintaining every snapshot of progress so that it worked perfectly, I would never get the game finished.

Can you reproduce this on the latest demo? I can't reproduce it myself at all. I did find that if you hold down up it cancels the animation cycle when walking. So I'm still grateful for the bug report. That particular issue is fixed for the next build. Hand Thumbs Up Left Smiley


Currently doing the UI for items at the moment and possibly the whole in game menu. It'll be a week or more before I can show progress. Cheers for the support.  Gentleman
Logged
pla1207
Guest
« Reply #93 on: November 13, 2009, 03:46:49 PM »

i see..just to let you know:in demo2 she's doin the same:shaking,not responding accordingly...anyway the concept is great and the light is cool !
Logged
st33d
Guest
« Reply #94 on: November 13, 2009, 04:52:40 PM »

Mind telling me what version of flash player you have installed? It's compiled for Flash 10.

I also need to know the exact behaviour that causes the bug.

We have a rule at work, "can't reproduce the bug, can't fix the bug". I've never experienced the behaviour you've explained, but I may be playing the game in a particular way. The issue may also be due to the Flash Player on Linux.
« Last Edit: November 13, 2009, 04:58:24 PM by st33d » Logged
pla1207
Guest
« Reply #95 on: November 13, 2009, 11:16:55 PM »

it's shockwave flash 10.0 r32
just walk in one direction for a while holding down any arrowkey(holding,not pressing).
she starts to do half steps,like starting one step and start again with another step not finishing prior.
also not responding to another direction
Logged
st33d
Guest
« Reply #96 on: November 14, 2009, 04:18:29 AM »

I'm not getting that behaviour at all. Must be a Linux thing. You getting it with W,A,S,D too?

Is anyone else getting this behaviour?
« Last Edit: November 14, 2009, 04:45:02 AM by st33d » Logged
st33d
Guest
« Reply #97 on: November 15, 2009, 11:12:07 AM »

A mate of mine has always been coming out wearing different hats these days. A girl looks good in a hat, so I've been inspired to add them to the game. Especially seeing as I really enjoyed donning a cool India Jones style hat in Torchlight.

So, because I was thinking how much a shame it is that I can't really do different armour sets on characters, instead of armour, there will be hats!

So far I've got a sombrero, top hat, trilby, fedora and baseball cap.

I need a sixth hat really (tried bowler - doesn't really work at such a low rez) and I'm not sure what order to set the hats in terms of the protection they offer.
Logged
Loren Schmidt
Level 10
*****



View Profile WWW
« Reply #98 on: November 16, 2009, 01:38:11 PM »

Maybe a little red hat with a feather in it would be nice.

Also, how about axing the baseball cap and add a little conical wizard / party hat?
Logged
Doktor_Q
Level 2
**



View Profile
« Reply #99 on: November 21, 2009, 11:35:20 AM »

I am eagerly awaiting future releases of this game.
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 69
Print
Jump to:  

Theme orange-lt created by panic