FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FreeUniverse to Arc v.2 upgrade...
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic     Forum Index -> FreeUniverse
View previous topic :: View next topic  
Author Message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Mon Sep 25, 2006 7:31 pm    Post subject: FreeUniverse to Arc v.2 upgrade... Reply with quote

Hi, when the time comes, I will be willing to help you upgrade to Arc v.2. It will be a pretty drastic change.

1) First, I can fix your art so it will render correctly. I hate playing FreeUniverse and seeing artifacts on those asteroids. Also, you need to guarentee you draw your objects in a certain order, spaceships should be the last things drawn so they are always on top Smile

2) API change. I've decided that instead of using

draw(float x, float y)
... I'll use
draw(Point p)

This goes for Color as well. It makes things simpler, clearer, and easier to do more powerful things with my code, the biggest change will be instead of using

draw(x, y)
you'll use
draw(Point(x,y))

I know you probably won't like this change.

3) Resource manager, implementing this

4) New polygon sprite collision, requires polygons be defined. this may be a little bit of work depending on how many sprites you have. I can help you create the sprite XML.

5) package layout changes, file/module name changes, little tiny changes that I know are there but you might not.

I have a hunch that the new version of arc will be simpler, less code, and more powerful, (plus no lgpl!), ... but of course it will be quite a large change.

So, I will be willing to help with the transition if you want me to. Plus I really like playing FreeUniverse. ( I keep on trying to write the acronymn, but I don't want to insult, Smile )
Back to top
View user's profile Send private message AIM Address
Phr00t



Joined: 03 Mar 2006
Posts: 203

PostPosted: Tue Sep 26, 2006 7:35 am    Post subject: Reply with quote

Quote:
1) First, I can fix your art so it will render correctly. I hate playing FreeUniverse and seeing artifacts on those asteroids. Also, you need to guarentee you draw your objects in a certain order, spaceships should be the last things drawn so they are always on top


Most of the current graphics are place-holders (except the ships). The asteroids need to be shrunk, and are the artifacts you speak of the little lines and dots at the edges of the sprite? This is because the PNGs need a little better transparency work... I was putting off this graphics work for other things in the game...

I did the best I could with the drawing order -- I think projectiles are the only things that draw on top of ships?

Quote:
draw(x, y)
you'll use
draw(Point(x,y))

I know you probably won't like this change.


Grr Evil or Very Mad This means on every draw a Point object will have to be created? It just seems inefficient... Confused

Quote:
3) Resource manager, implementing this


Resource manager? What's this for?

Quote:
4) New polygon sprite collision, requires polygons be defined. this may be a little bit of work depending on how many sprites you have. I can help you create the sprite XML.


Well, I want people to put in there own graphics just by placing PNGs into the correct folder -- now people will have to create collision XMLs too? Sad I hope there will be some automatic polygon creation tool at some point, because almost every 2D game library has some simple collision routines -- but ArcGames will require polygon creation for every sprite, and that is our only option? Confused I know I've said I like polygon collisions, and I do... but making the polygons for each sprite isn't going to be fun, and it doesn't work out great for my add-your-own-graphics feature Sad

Quote:
5) package layout changes, file/module name changes, little tiny changes that I know are there but you might not.


OK

Quote:
So, I will be willing to help with the transition if you want me to. Plus I really like playing FreeUniverse. ( I keep on trying to write the acronymn, but I don't want to insult, )


Yeah, that would be great if you could help me out there.

And yes, I like my object names: FU_JOB, FU_SHIP Very Happy
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Sep 26, 2006 4:45 pm    Post subject: Reply with quote

Phr00t wrote:

and are the artifacts you speak of the little lines and dots at the edges of the sprite? This is because the PNGs need a little better transparency work...


Hrm... it also may be because if you do not have the right dimension graphics, artifacts can appear. I fixed one of them in my own version just by changing it to a slightly different size.

Quote:

I did the best I could with the drawing order -- I think projectiles are the only things that draw on top of ships?


The space stations image draws on top of the ships thruster flame.

Quote:

Grr Evil or Very Mad This means on every draw a Point object will have to be created? It just seems inefficient... Confused


Hehe.. well.. its purpose is this

1) To entice you to use Point, Color, or whatever instead of storing seperate x's and y's . If you use Point in the first place, there is not inefficient converting.

2) Abstraction, functions need less arguments, and instead of things like
distance(x1,y1,x2,y2) you can simply do p1.distance(p2); Or instead of x+= 1; y+=1; it just becomes point+=1;

It is a change that lets me abstract and use less code.

Quote:

Resource manager? What's this for?


To guarentee that you don't load the exact same resource twice. It will simplify code (give me less lines of code to worry about) and make things more powerful. Instead of...

Tex texture = new Tex("tex.png");
sprite.add(texture);
sprite2.add(texture);

you will simply use
sprite.add("tex.png")
sprite2.add("tex.png")

and the resource manager will do some background magic to make sure the same resource is not loaded twice in a row, and I can remove the add(Texture) add(char[] filename) function overloads.

Resource manager will only handle sounds files, textures, and freetype fonts.

Coupled with PhysFS, you can transparently access files .zip without even caring if it is in a zipfile or not.

Quote:

Well, I want people to put in there own graphics just by placing PNGs into the correct folder -- now people will have to create collision XMLs too? Sad I hope there will be some automatic polygon creation tool at some point, because almost every 2D game library has some simple collision routines -- but ArcGames will require polygon creation for every sprite, and that is our only option? Confused I know I've said I like polygon collisions, and I do... but making the polygons for each sprite isn't going to be fun, and it doesn't work out great for my add-your-own-graphics feature Sad


I'm going to create a Sprite editor GUI program that will make sprite creation a fun and easy task! They will be able to create create their own custom sprite for the ship with whatever animations, frame speeds, sound effects, ect. A Sprite editor GUI program would give a lot more 'customizability' then just a simple png, they will be able to design their sprite exaclty how they want it. To keep them from cheating, there is a function I have that can determine the area of a polygon, and you can abort if the polygon does not have enough area.

Here's what I don't like about automatic polygon tracing...
1) Reading every single pixel of every image at start up time
2) Using too many or too few points to define the sprite with
3) Not placing points in the right 'key areas'
4) not knowing where it is appropriate to place holes

Spacial recognition is a pretty big problem for computers, and I think i'd need a massive algorithm that is pretty slow and may still be inaccurate.

An alternative to this would be 'programatically creating box and sphere polygons', but this seems like a waste of polygon collision.

If I do have automatic polygon tracing (if you still really want it), I will have it write its output in an XML file and then have sprite read that still, so the polygon isn't generated every single time you load the game.
Back to top
View user's profile Send private message AIM Address
Phr00t



Joined: 03 Mar 2006
Posts: 203

PostPosted: Wed Sep 27, 2006 9:01 am    Post subject: Reply with quote

Quote:
Hrm... it also may be because if you do not have the right dimension graphics, artifacts can appear. I fixed one of them in my own version just by changing it to a slightly different size.


Huh, OK. I need to get you guys some SVN access so you can submit these fixes.

Quote:
The space stations image draws on top of the ships thruster flame.


Doh! Yes... grr... I'm not sure how to fix this one yet.. I don't want the thruster "blobs" to be part of the main "SpaceObjects" linked list for performance reasons.. Confused

Quote:
It is a change that lets me abstract and use less code.


Yeah, its probably a good idea too... just gotta make a few changes..

Quote:
To guarentee that you don't load the exact same resource twice.


Ahh, gotcha. I already have done this in my game... I load all the graphics on start, and just store thier texture ID to use later. I can still do it this way with Arc v.2, right?

Quote:
I'm going to create a Sprite editor GUI program that will make sprite creation a fun and easy task!


OK, if you have cool sprite creator that is fun and easy... Very Happy Until then, we need to make some hand written XML files?

Thanks,
Jeremy
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Wed Sep 27, 2006 1:20 pm    Post subject: Reply with quote

Quote:

Doh! Yes... grr... I'm not sure how to fix this one yet.. I don't want the thruster "blobs" to be part of the main "SpaceObjects" linked list for performance reasons.. Confused


It is just a matter or draw order, I havn't looked at the code, but there probably is a simple fix.

Quote:

Ahh, gotcha. I already have done this in my game... I load all the graphics on start, and just store thier texture ID to use later. I can still do it this way with Arc v.2, right?


Yes, you can. Resource manager just makes things... simpler. You'll see Smile


Quote:

OK, if you have cool sprite creator that is fun and easy... Very Happy Until then, we need to make some hand written XML files?


Yes, eventually, but don't worry about that until v.2 is ready.
Back to top
View user's profile Send private message AIM Address
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Fri Sep 29, 2006 11:25 am    Post subject: Point update Reply with quote

I was going to update FreeUniverse to using arc.phy's Points internally, but did decide not to do it in the end. Here's what happened:

1) arc-v.1's Point has a lot less functionality than the one in svn, so I'd have had to put a copy of the newer version in FreeUniverses' tree somewhere in order to make proper use of it.

2) I'd love to be able to do

Point p;
p.x = 5;
p.y = 4;
writefln("x: ?s", p.x);

In short, I'd either like to access x, y directly or have it as a property. getX and setX just take too long for something used as heavily as Point.

If you disagree, that's ok. Just a request.
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Oct 03, 2006 4:59 pm    Post subject: Re: Point update Reply with quote

Sequoh wrote:

2) I'd love to be able to do

Point p;
p.x = 5;
p.y = 4;
writefln("x: ?s", p.x);

In short, I'd either like to access x, y directly or have it as a property. getX and setX just take too long for something used as heavily as Point.

If you disagree, that's ok. Just a request.


Hrm... for initializing a point,
Point p = Point(5,4); can be used.

The reason I had the setX and getX is just to keep the API similar.

I guess for Point I could give the option of accessing directly or indirectly.

--- About Future Upgrade ----

Err.. just spending some time thinking about the upgrade has given me these insights.

1) Arc should be designed as a set of independent modules, therefore, I should be able to replace 1 arc module at a time in freeuniverse without much trouble. However, to accomplish this will cause some module names to change.

Anyway, once I get the 'modules' created, then I can replace 1 freeuniverse system at a time. There will be more info about these 'module' things on my forums soon.

2) What phr00t has been saying all along, I really do need some autopolygon generation capabilities for sprite (even if it is very primitive), so I will have

enum AUTOPOLY
{
BOX,
CIRCLE,
TRACE,
NONE
}

The tracing algorithm will be very basic and may not be implemented anytime soon.

---- So....

Hold off the upgrade for quite some time, then I can help implement the systems one system at a time.
Back to top
View user's profile Send private message AIM Address
Phr00t



Joined: 03 Mar 2006
Posts: 203

PostPosted: Tue Oct 03, 2006 7:42 pm    Post subject: Reply with quote

Quote:
What phr00t has been saying all along, I really do need some autopolygon generation capabilities for sprite (even if it is very primitive), so I will have

enum AUTOPOLY
{
BOX,
CIRCLE,
TRACE,
NONE
}


Yay Smile

Quote:
Hold off the upgrade for quite some time, then I can help implement the systems one system at a time.


OK, I want to focus on bug fixes / features anyway Very Happy
Back to top
View user's profile Send private message
ChristianK



Joined: 26 Sep 2006
Posts: 159
Location: Berlin, Germany

PostPosted: Wed Oct 04, 2006 7:11 am    Post subject: Re: Point update Reply with quote

clayasaurus wrote:

Hrm... for initializing a point,
Point p = Point(5,4); can be used.

The reason I had the setX and getX is just to keep the API similar.

I guess for Point I could give the option of accessing directly or indirectly.


Sorry about the confusion, I know about Point's initialization. Basically, I was asking if you could offer the property syntax for Point's data values, doesn't need to be direct access.

Quote:

1) Arc should be designed as a set of independent modules, therefore, I should be able to replace 1 arc module at a time in freeuniverse without much trouble.


That'd be great, but hard to pull off? How're you planning to do it?
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Thu Oct 05, 2006 9:53 am    Post subject: Reply with quote

Shouldn't be too hard, just will take a while.
Back to top
View user's profile Send private message AIM Address
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Mon Oct 09, 2006 6:38 pm    Post subject: Reply with quote

phr00t - can you please make available the current version of arc you use on the freeuniverse svn?

thanks.
~ Clay
Back to top
View user's profile Send private message AIM Address
Phr00t



Joined: 03 Mar 2006
Posts: 203

PostPosted: Tue Oct 10, 2006 7:37 am    Post subject: Reply with quote

Sure -- have to wait until I get home from work first Smile
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Oct 10, 2006 8:01 am    Post subject: Reply with quote

Alright, good. Where I am going with this is taking a gentler approach to developing Arc. I wish I could just snap my fingers and make everything magically upgrade, but I am going to go back to the beginning (your arc codebase) and slowly improve it while making necessary changes to freeuniverse.

This allows me to keep myself in check, so I know whether a change I make is causes too much pain, or if I am actually making an improvement or simply rewriting existing code (which is probably a waste of time).

Anyway, first thing I'll do to it is upgrade its sound system to OpenAL and Sequoh and I can get zoom + rotation to work. Smile

So... I'm probably going to do a bunch of dev in your SVN now. Plus I want to fix those darn asteroids art glitches.
Back to top
View user's profile Send private message AIM Address
Phr00t



Joined: 03 Mar 2006
Posts: 203

PostPosted: Tue Oct 10, 2006 10:17 am    Post subject: Reply with quote

Huh, sounds pretty good to me. It will be about ~4 hours before I get home :-\

Yay zoom! What are we using the rotation for...?

Quote:
Plus I want to fix those darn asteroids art glitches.


Hehe! Go ahead, feel free to add more graphics Wink I believe there are some glitches with the planets too... and the worst graphics out of all have to be the telegate/transpath placeholders (I made them in paintbrush) Laughing

[ edit ] You know, I'm just using the Arc from the last arcpkg1.zip file from you -- if you haven't changed that around, that should be the code base to use... ?
Back to top
View user's profile Send private message
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Oct 10, 2006 1:51 pm    Post subject: Reply with quote

I thought you may have modified it a little bit or something. If thats the case, I could SVN it myself. I see somebody already implemented zooming though. Cool
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> FreeUniverse All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group