PDA

View Full Version : [proj]Subspace like game



SparK_BR
August 24th, 2008, 10:12 PM
SubSpace (???) project thread

suggestions, questions, features request, neat ideas, constructive critic, etc.
just post it! :thumb:

poll
---------
vote for a name!
http://www.kirupa.com/forum/showthread.php?t=308743

releases
---------
[incoming]
SubSpace (???*) v0.1
*no name yet

[07/sep/08]
Independence Edition windows client/server
SSIE_windows.rar (http://www.uploading.com/files/TSCYCYRU/SSIE_windows.rar.html)(first playable version)


updates! first week
------------------------------
> the collision system changed a bit, now when player starts to acel against the wall, it doesn't get into the object, it puts the player outside the tile always

> no more ghost ships are stopped at the spawn point

> when someone leaves the server or room the ship desappears and a message is shown in the chat saying "<name> has left the game."

> shots can call the kill() method in the local player only if their owner var is not the local player name

> ship handling changed to look a bit more space like, instead of air like (like air planes do)

> looking forward to make a java version of the palabre server(currently in python), to make custom event handlers and etc without changing the client side

updates! 4th day - first week
-------------------------------------------
> fixed bug that didn't let you play if you don't type anything in the chat

> fixed bug that if you start to type and left chat blank you couldn't leave chat

> bullets are now dissapearing in when hit ANY player that's not their owner

> added rmBullet xml for bullet removal to spread through clients

updates! brazilian independence day - second week
-------------------------------------------
> added explosion debrits

> added dead state (alpha 50, controls locked, invisible, waiting for re-spawn)

> SubSpace Independence (first playable version)!

> emergency fix, bullet tragetory by bullet speed formula
(bullet going in the wrong direction if ship is too fast, invertion of Y axis)

updates! 18 september 2008 - third week
--------------------------------------------
i didn't have much time this week but, here's what i got:
> SSServer.java and ShipHandler.java where created(that means a lot! lol)

> Client has been changed it's protocol to adapt to the server's emptyness XD
(no server-side script!)

> Created admin tool... won't publish cuz is too dangerous to the server
(server admin suport is still there)

> Fixed bug at server, no null terminated string resulted in flash delay

-21/09/08-
> Added map file reader and sender in server

> Added level loader in client

> Added a bealtyful (and heavy) starfield background

> Overall improvements Server side :battery:
----------

ajcates
August 24th, 2008, 11:06 PM
I would hold out on multiplayer until you have a working copy of them game, and add in multiplayer in the 2.0 version. Especially if you don't know how to load a text file.(look towards the url request class).

SparK_BR
August 25th, 2008, 12:11 AM
the multiplayer is ok, I'm using palabre xml socket

the text thing must be simple, so I might take a look at the help files

the main engine will have... hmm... menus, and a ship...
sure it will have the "anchor" object for scrolling and etc...
no prob, really


hmm...
you seen to have a good knowledge
do you wanna help me? with the map thing? :D

any help would be cool... 8)


edit:
today I added a new collision system, based on the angle it hits the block



//solid objects must use this behaviour
_root.ObjManager.makeSolid = function(obj){
this.applyScrolling(obj);
if(obj.hitTest(_root.player.area)){

var ang = this.getAngle(obj, _root.player);
trace(ang);
if(ang > -45 and ang < 45){
trace("up");
_root.player.yspeed = -Math.sqrt(_root.player.yspeed*_root.player.yspeed) ;
}
if(135 < ang or ang < -135){
trace("down");
_root.player.yspeed = Math.sqrt(_root.player.yspeed*_root.player.yspeed) ;
}

if(-135 < ang and ang < -45){
trace("left");
_root.player.xspeed = -Math.sqrt(_root.player.xspeed*_root.player.xspeed) ;
}
if(45 < ang and ang < 135){
trace("right");
_root.player.xspeed = Math.sqrt(_root.player.xspeed*_root.player.xspeed) ;
}
}
}

_root.ObjManager.getAngle = function(src, target){
var ang = this.validAngle(Math.round(Math.atan2(src._y - target._y, src._x - target._x)*180/Math.PI)-90)
return ang;
}

_root.ObjManager.validAngle = function(num){
if(num > 180){
num -= 360;
return this.validAngle(num);
}
if(num <= -180){
num += 360;
return this.validAngle(num);
}
return num;
}

SparK_BR
September 2nd, 2008, 03:39 PM
--------------------------------------
first post updates - progress made
--------------------------------------

ArmoredSandwich
September 2nd, 2008, 07:06 PM
I would hold out on multiplayer until you have a working copy of them game, and add in multiplayer in the 2.0 version. Especially if you don't know how to load a text file.(look towards the url request class).

Well to be honest if you have to later create multiplayer it's a lot harder than when you plan it from the start.

SparK_BR
September 2nd, 2008, 07:47 PM
don't worry later i will post an swf and a palabre server config file ^^
or a .exe instead of the .swf then you don't have to change macromedia settings, only deal with firewall...

usually I test how it's working opening 2 games and a server in the same machine
still smooth!

------

the tile thing is not complete yet, later i will update the collision to a tiled format

anyone have a formula of how to put a giant tile based map into a text(or whatever) file without using much space?
like an encoding function? or .zip maps? base 64? binary? hex? tea14?
(i'm using as2, flash 8)


the objective of this is:
> the map creator make a txt with the tile array
> compile it with a small .swf that will load the file and apply the formula(which i don't have)
> the compiler outputs the new file for loading at the server(set by a var with the filename)
> the clients load the map file and play, if they don't have the map files they will be kicked

i need some help at encoding and decoding only...

SparK_BR
September 2nd, 2008, 08:16 PM
some preview
ps: I need new ships

http://img395.imageshack.us/my.php?image=updatesde5.png


--------day 3/ month 9 / year 2008-----------
updated first post
---------------------------------------------

SparK_BR
September 7th, 2008, 12:36 AM
more updates
--------------
fist post
7 september 2008 - Brazilian Independence day
(the day which the new portugal's colony became a country) - 00:50

--------
RELEASE 9:30 PM!

SparK_BR
September 7th, 2008, 08:43 PM
Independence Edition Release
---
first post
==
enjoy ;)

Gathan
September 8th, 2008, 02:31 AM
So your making a subspace like game for flash ah?
You might want to have a main hub server, that would basically maintain a list of all active game servers.
Which in turn the user would connect to all of the privately run game servers.
Wouldn't be hard at all to cook up a simple event model design in java to accomplish it either.

SparK_BR
September 8th, 2008, 05:39 PM
I would need some "hello main server, i'm here!" function at the palabre server...

for now, i can connect small networks...
if you want to play with a lot of friends just use a vpn client like hamachi (http://www.google.com/search?site=search.asp&hl=en&safe=off&q=hamachi&btnG=Search)

Gathan
September 8th, 2008, 06:41 PM
I would need some "hello main server, i'm here!" function at the palabre server...

for now, i can connect small networks...
if you want to play with a lot of friends just use a vpn client like hamachi (http://www.google.com/search?site=search.asp&hl=en&safe=off&q=hamachi&btnG=Search)
Will yes but your current way has major problems with it, like you can't know what games are currently active out there.
Not that there is anything wrong with the current way starting out, but it definitely needs to be changed down the road.
Also I would throw that palabre server away, it uses horrible xml packets, which are bloated, use up unnecessary amounts of bandwidth and contribute to lag.
As for a vpn client, you can't expect people to download a third party software to play with lots of friends, that is asking a bit too much if the end user and will only shy them away from playing your game.

SparK_BR
September 8th, 2008, 10:54 PM
Will yes but your current way has major problems with it, like you can't know what games are currently active out there.
Not that there is anything wrong with the current way starting out, but it definitely needs to be changed down the road.
Also I would throw that palabre server away, it uses horrible xml packets, which are bloated, use up unnecessary amounts of bandwidth and contribute to lag.
As for a vpn client, you can't expect people to download a third party software to play with lots of friends, that is asking a bit too much if the end user and will only shy them away from playing your game.

do you have any suggestion of server for me to use?
some simple one, like palabre but faster?

i am trying google-fu right now to find one...

Gathan
September 9th, 2008, 02:25 AM
do you have any suggestion of server for me to use?
some simple one, like palabre but faster?

i am trying google-fu right now to find one...
If your looking for something simple, making your own in java would be easy enough.
Or you could use a existing architecture like http://www.projectdarkstar.com

SparK_BR
September 13th, 2008, 03:34 PM
If your looking for something simple, making your own in java would be easy enough.
Or you could use a existing architecture like http://www.projectdarkstar.com

I will make my own, project dark star is not the simple i want

SparK_BR
September 18th, 2008, 12:35 PM
updated, second week

- server speed adjustments

ashiq09
September 19th, 2008, 08:48 AM
making a subspace like game for flash ah?
You might want to have a main hub server, that would basically maintain a list of all active game servers.
Which in turn the user would connect to all of the privately run game servers.
Wouldn't be hard at all to cook up a simple event model design in java to accomplish it either.

SparK_BR
September 21st, 2008, 12:50 AM
today I added stars to the background...
they have random speed, so it will look like a lot of layers and kind of Z axis...
(Warning! huge function code ahead!)



_root.ObjManager.makeStars = function(){
var stars = 70;
var minStarSpeed = 2;
var maxStarSpeed = 7;

this.createEmptyMovieClip("starsMC", 98);

for(var starI = 0; starI < stars; starI++){
var mc = this.attachMovie("star", "star"+starI, starI);
mc._x = random(Stage.width);
mc._y = random(Stage.height);
mc.speedDiv = random(maxStarSpeed-minStarSpeed)+minStarSpeed;
var size = random(2)+0.7*random(4);
mc._width = size;
mc._height = size;
//main block
mc.onEnterFrame = function(){
if(this._x < 0){
this._x = Stage.width;
}else{
if(this._x > Stage.width){
this._x = 0;
}
}
if(this._y < 0){
this._y = Stage.height;
}else{
if(this._y > Stage.height){
this._y = 0;
}
}
this._x += _root.ObjManager.xscroll/this.speedDiv;
this._y += _root.ObjManager.yscroll/this.speedDiv;
}
}
}
:tie: also, I added a "send me the map" system in the server side
when the client side recieves the map it split it up into am build array (with lot's of commands), which command creates a shape:


S:x|y;
//creates a Single 16x16 dot at the given position
//pos x
//pos y

LH:x|y|l;
//LH stants for Line at Horizontal
//pos x
//pos y
//length

LV:x|y|l;
//LV is a Line at Vertical
//pos x
//pos y
//length

BS:x|y|vl|hl;
//Big Square
//pos x
//pos y
//vertical length
//horisontal length


well in the end the stage.txt file will look like this:


S:0|0;LH:1|2|5;LV:2|4|5;BS:3|10|5|5;LV:8|16|5;LH:5 |22|5;S:10|24; ;LH:20|5|2;LH:18|6|6;LH:17|7|8;LH:17|8|8;LH:16|9|1 0; ;LH:16|10|10;LH:17|11|8;LH:17|12|8;LH:18|13|6;LH:2 0|14|2;

a bunch of code in a single line
there's a code editor in the resource folder, it builds the map and gives you a preview...

-----------
first post updated

SparK_BR
September 22nd, 2008, 07:35 PM
today i realized nobody voted in the poll yet!

poll: project name
http://www.kirupa.com/forum/showthread.php?t=308743

come on guys, poll will close 15/oct/08
names that aren't in the poll are wellcome!