PDA

View Full Version : Phoenix 2D Game Engine V1.0



Andreaz
14-08-2007, 08:49 PM
I'm pleased to announce that version 1.0 of the Phoenix library is released!

Phoenix is built to be cross platform (I only have the possibility to test in win32 through), cross compiler (FPC, Delphi 7 and Turbo delphi) using OpenGL for hardware accelerated rendering.

Phoenix contains components for:

Cross platform screen handling using GLFW
Blocking and threaded timer.
Image loading and displaying.
Animation
Font rendering, can import from BMFont and Font Studio 4
Sprite engine
GUI controls
Logging system
Linear and cubic paths
Input using mouse, joysticks and keyboard
Resource and package system for one file distribution
Sound enginge using OpenAL
Delphi like canvas functions
Collision engine with support for rotations and polygons
Advanced particle engine with effects


The engine comes with 14 demos showing some of the functionallity of the engine as well as editors for images, fonts, packages, gui and animations.

http://www.phoenixlib.net/screens/particles_000s.png (http://www.phoenixlib.net/screens/particles_000.png)
http://www.phoenixlib.net/screens/sprites_000s.png (http://www.phoenixlib.net/screens/sprites_000.png)
http://www.phoenixlib.net/screens/gui_000s.png (http://www.phoenixlib.net/screens/gui_000.png)

http://www.phoenixlib.net
http://www.phoenixlib.net/files/Phoenix_070814.zip

Robert Kosek
14-08-2007, 09:22 PM
Excellent news, Andreas! :D I'll have to test it out in a little bit.

Traveler
14-08-2007, 09:55 PM
Excellent! :D

Bumped to a newsitem!

arthurprs
14-08-2007, 10:48 PM
Looks awesome!

I will see if it is best than asphyre3

paul_nicholls
15-08-2007, 12:04 AM
Hi Andreaz :-)
This looks great :)

One small thing, I did notice that the screenshot of the sprite demo seems to have small rectangle (or line) artifacts around the enemy sprites (bottom and sometimes sides)...

Is this just because of the screenshot taking, or is there a bug with the sprite drawing sometimes?

cheers,
Paul.

Robert Kosek
15-08-2007, 12:25 AM
It is antialiasing the blank pixels on the side of the image. Padding, or texture clamping can/will fix that. DirectX does it too, so it's library independent.

paul_nicholls
15-08-2007, 12:40 AM
Thanks Robert, that makes sense :-)
cheers,
Paul

DarknessX
15-08-2007, 04:36 AM
Hmmm, now would be a good time for me to try to decide whether to use this one or Jedi SDL :)

WILL
15-08-2007, 05:10 AM
Nice work so far. I checked out some of the demos and test apps.

Most would compile using Lazarus without any setup what-so-ever, Bravo!

Had issues with 2 demos though;

- Fonts demo for Lazarus seemed to have messed up project files and wouldn't build.
- Components demo compiled ok. It seemed to start up ok, but crashed and closed it's self shortly after starting up. Here is the log file generated:


1:01 phxBase: Initializing Phoenix...
1:01 phxBase: Phoenix version: 1.0
1:01 phxBase: Phoenix build : 2007-08-06
1:01 phxScreen.init: Initializing GLFW.
1:01 phxScreen.init: GLFW version: 2.5.0
1:01 phxTexture: Creating FreeImage texture loader.
1:01 phxTexture: FreeImage version: 3.9.2
1:01 TPHXScreen.Open: Opening the window: 800x600 WINDOWED
1:01 TPHXScreen.Open: Initializing OpenGL.
1:01 TPHXScreen.Open: OpenGL vendor : ATI Technologies Inc.
1:01 TPHXScreen.Open: OpenGL renderer : RADEON XPRESS 200M Series SW TCL x86/SSE2
1:01 TPHXScreen.Open: OpenGL version : 1.4.5220 WinXP Release
1:01 TPHXScreen.Open: OpenGL extensions: GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string WGL_EXT_swap_control
1:01 TPHXImage.LoadImage: Loading image: background.png
1:01 TPHXTextureManager.BuildTexture: Texture size 256x256 (2048) Format GL_RGB
1:01 TPHXImage.LoadImage: Loading image: Save Picture.png
1:01 TPHXTextureManager.BuildTexture: Texture size 32x32 (2048) Format GL_RGBA
1:01 TPHXFont.LoadFont: Loading font: Arial16.phxfnt
1:01 TPHXTextureManager.BuildTexture: Texture size 128x128 (2048) Format GL_RGBA
1:01 TPHXTextureManager.BuildTexture: Texture size 512x512 (2048) Format GL_RGBA
1:01 TPHXComponentEngine.LoadFromStream: Loading gui from stream...

Once you've fixed these please let me know, I'm making up a small spotlight video of the library to show off on my PascalGameDev channel on YouTube. (Random impulse, and it required very little of my time. :))


Oh and I'd recommend that you also setup a small Font/GUI Skin repository for users of your library to contribute to and access openly. It might help build a little sub-community around the library. Plus it'll make new people to the library have more than zero options when trying out your components unit.

Andreaz
15-08-2007, 06:50 AM
Hi Andreaz :-)
This looks great :)

One small thing, I did notice that the screenshot of the sprite demo seems to have small rectangle (or line) artifacts around the enemy sprites (bottom and sometimes sides)...

Is this just because of the screenshot taking, or is there a bug with the sprite drawing sometimes?

cheers,
Paul.
There's a white border around every sprite in the spriteset, to make it easier to define the patterns in the editor, this is what's showing, and it's fixxed easilly by making thoose parts transparent.


Nice work so far. I checked out some of the demos and test apps.

Most would compile using Lazarus without any setup what-so-ever, Bravo!

Had issues with 2 demos though;

- Fonts demo for Lazarus seemed to have messed up project files and wouldn't build.
- Components demo compiled ok. It seemed to start up ok, but crashed and closed it's self shortly after starting up. Here is the log file generated:


Lazarus is extreemly good to mess up project files in my experience, the font demo compiled and worked when i tested it yesterday.

The fault in the components is harder throught, it seems that for some reason fpc reads something differently then delphi, the error that occurs is that a string read gets a length thats longer then the length of the streem. Wich ofc doesnt happen in delphi (meaning that the offset in the stream is wrong at that location)

However once more I'm struck with the great thing that is lazarus, when stepping into


procedure TPHXContainer.LoadFromStream(Stream: TStream);

the debugger crashes. Bah, sometimes i get the urge to unistall laz and fpc from my computer permanently :O



Once you've fixed these please let me know, I'm making up a small spotlight video of the library to show off on my PascalGameDev channel on YouTube. (Random impulse, and it required very little of my time. :))

I'll try to track down the gui error today, even throu it seems i have to log every component that's loaded via the console...



Oh and I'd recommend that you also setup a small Font/GUI Skin repository for users of your library to contribute to and access openly. It might help build a little sub-community around the library. Plus it'll make new people to the library have more than zero options when trying out your components unit.
Not that it's any work generating fonts using the included tools, but could create a few more (3 fonts in the various demos atm)

Andreaz
15-08-2007, 08:06 AM
I've managed to track down the bug in the components, i was using TAlignment in the Label (1 byte in Delphi, 4 in fpc) now it uses TPHXAlignment instead.

http://www.phoenixlib.net/files/Phoenix2007-08-15.zip

jdarling
15-08-2007, 01:16 PM
Andreaz, does this mean that your ready to add scripting wrappers to the project? I've just about got pLua ready and would like to wrap up Phoenix to test out the new code as I think it would be a great starting point. Looking at it all, things have changed significantly since I created the original wrappers :).

Joshas
15-08-2007, 02:05 PM
Awesome! Compiles on Delphi 7 nicely, but on Turbo Delphi Explorer there's one little problem with phxLogger:
[Pascal Error] phxLogger.pas(326): E1030 Invalid compiler directive: 'ELEIF'
Changed it to "ELSEIF" and "ENDIF" to IFEND and everything works.
Haven't tried all the demos yet, but in Collisions demo objects are move only in diagonal directions.

+1 for idea to have fonts and GUI skins repository, also for particle effects.

Andreaz
15-08-2007, 02:38 PM
Andreaz, does this mean that your ready to add scripting wrappers to the project? I've just about got pLua ready and would like to wrap up Phoenix to test out the new code as I think it would be a great starting point. Looking at it all, things have changed significantly since I created the original wrappers :).

I've experimented somewhat with adding scripting to the gui engine, got it to work somewhat but not good enough.

However' im not really convinced with the whole lua wrapper thing for all the stuff, like rendering, game loops etc. In my opinion that should stick in the compiled language, stuff like playing sounds, triggers, ai and such parts are stuff that belongs in scripting.

Joshas, that only diagonal stuff in the collision demo seems strange to me, does the input demo work correctly ?

wagenheimer
15-08-2007, 02:58 PM
Hi Andreaz!

Congratulations for the official engine version! =)

Very impressive the Cubic Paths, i did not understant very well yer how it works, but very impressive!

Have you done a PathEditor for this version yet?

Thanks!
Cezar

Joshas
15-08-2007, 04:16 PM
Input demo works correctly (even the gamepad). I think that the problem in Collisions demo is in movement part, haven't quite figured it out.

jdarling
15-08-2007, 05:37 PM
However' im not really convinced with the whole lua wrapper thing for all the stuff, like rendering, game loops etc. In my opinion that should stick in the compiled language, stuff like playing sounds, triggers, ai and such parts are stuff that belongs in scripting.

Actually, I completely agree with you Andreaz :). JumpStart goes the whole way, but for an open source engine in Pascal it would be better to have an event driven system. Still, I had to wait until you actually had it ready for release so I wouldn't wrap anything improperly :). I'm headed off on vacation tomorrow, but when I get back would be cool to get together and talk about implementation details and where you see the hooks coming into play.

technomage
15-08-2007, 10:31 PM
This looks like a lovely engine.

The editors are very nice, I like the GUI editor :D

Well done, keep up the good work.

Joshas
16-08-2007, 12:39 PM
Poking around Collisions demo I've found another bug, this time collision related. Here's a screenshot:
http://upload2.postimage.org/297207/collisions.jpg (http://upload2.postimage.org/297207/photo_hosting.html)

arthurprs
16-08-2007, 05:01 PM
Downloadind and instaling

Andreaz
16-08-2007, 05:44 PM
Found the movement bug in the collision engine;



//------------------------------------------------------------------------------
procedure TPHXCollisionObject.SetPosition(const Value: TVector2f);
begin
if &#40;FPosition.X <> Value.X&#41; and &#40;FPosition.Y <> Value.Y&#41; then begin
FPosition &#58;= Value;

Moved&#58;= True;
end;
end;


wich should be


//------------------------------------------------------------------------------
procedure TPHXCollisionObject.SetPosition&#40;const Value&#58; TVector2f&#41;;
begin
if &#40;FPosition.X <> Value.X&#41; or &#40;FPosition.Y <> Value.Y&#41; then begin
FPosition &#58;= Value;

Moved&#58;= True;
end;
end;


And Joshas error is a thing i've overlooked in the collision handling for circles, i have to test the distance between each vertex and the circle aswell as the seperating axis for the polygon. This will be fixed in the next (soon to come) release.

jdarling: That would be really awesome, looking forward to it, the gui is a good starting point (hiding and showing controls, setting postions ect)

I will include a messagesystem to communicate from the scripts to the different components when we start the scripting integration aswell.

wagenheimer: No there's no path editor in the current version, will try to get one together before the next version.

Today i've written a QuadTree class that i will add to the sprite engine asweell, will speed things up considerably (in the demo i have 100k objects that's getting rendered and collision detected at 700fps). Ok just rectangles for the objects but still :)

Robert Kosek
18-08-2007, 04:07 PM
Err... I got a bunch of "eleif" errors in phxLogger. Starting at line 315 it should read: {$IFDEF FPC}
{$IFDEF VER1}
WriteLn(FLogFile, ' <compiler>Free Pascal 1.x.x</compiler>');
{$ELSIF VER1_0}
WriteLn(FLogFile, ' <compiler>Free Pascal 1.x.x</compiler>');
{$ELSE}
WriteLn(FLogFile, ' <compiler>Free Pascal</compiler>');
{$ENDIF}
{$ELSE}
{$IFDEF VER180}
WriteLn(FLogFile, ' <compiler>Delphi 2006</compiler>');
{$ELSEIF VER170}
WriteLn(FLogFile, ' <compiler>Delphi 2006</compiler>');
{$ELSEIF VER160}
WriteLn(FLogFile, ' <compiler>Delphi 8</compiler>');
{$ELSEIF VER150}
WriteLn(FLogFile, ' <compiler>Delphi 7</compiler>');
{$ELSEIF VER140}
WriteLn(FLogFile, ' <compiler>Delphi 6</compiler>');
{$ELSEIF VER130}
WriteLn(FLogFile, ' <compiler>Delphi 5</compiler>');
{$ELSE}
WriteLn(FLogFile, ' <compiler>Delphi</compiler>');
{$IFEND}
{$ENDIF}I hate the IFEND/ENDIF differences too. :roll:

Wow, lots of progress I see! Now we need to start documenting everything and getting things stable so no one is lost! I'm also very surprised to see Lua in there, would you tell me a little about how to use it in its native form?

Can I request package abstraction? I have been working on a packager that is efficient and game-specific that even beats a Zip in compression time and size with encryption enabled. I'd kind of like to be able to tie that in with a handler unit. ;)

pstudio
18-08-2007, 09:02 PM
Great to hear that version 1.0 is finally here :D
however I'm missing the tile engine :( Have you dropped it or is it comming in an upcoming release?

Joshas
19-08-2007, 01:27 PM
Not sure if it's really a bug, but until I haven't added font loading to my project (before image list loading procedure), sprites showed up as white rectangles.

Andreaz
19-08-2007, 05:01 PM
Not sure if it's really a bug, but until I haven't added font loading to my project (before image list loading procedure), sprites showed up as white rectangles.

You'd have to paste your code to see what's going on there.

The tile engine is in the pipe, was some design issues that made it not in the 1.0 release.

Joshas
20-08-2007, 10:00 AM
My own code is too messy to paste it here, it would be faster to take Sprites demo and comment out every line using fonts (from loading to showing). At the end you get only white boxes instead of sprites.

Andreaz
20-08-2007, 02:54 PM
Works for me;



//------------------------------------------------------------------------------
procedure MainLoop;
var Screen&#58; TPHXScreen;
var Timer &#58; TPHXTimer;
var Images&#58; TPHXImageList;

var Input &#58; TPHXInput;
var SpriteEngine&#58; TPHXSpriteEngine;

var Font &#58; TPHXFont;

NumSprites &#58; Integer;
NumCollisions&#58; Integer;
begin
// Create the window
Screen&#58;=TPHXScreen.getInstance&#40;&#41;;

// Open the window
Screen.Open&#40;'Phoenix Sprite Demo', -1, -1, 800, 600&#41;;

Screen.Color&#58;= clrBlack;


//Font&#58;=TPHXFont.Create;
//Font.LoadFont&#40;'Arial16.phxfnt'&#41;;

Images&#58;= TPHXImageList.Create;
Images.LoadImage&#40;'1945.phximg'&#41;;


SpriteEngine&#58;= TPHXSpriteEngine.Create;
SpriteEngine.ImageList&#58;= Images;

// Create a new layer with our spriteset
SpriteEngine.Layers.Add&#40; TPHXSpriteLayer.Create&#40; SpriteEngine, '1945.png' &#41; &#41;;

// Create some sprites, see DemoSprites.pas
CreateSprites&#40;SpriteEngine, Images&#41;;

Input&#58;= TPHXInput.Create;
Input.Keyboard.KeyBinding&#91;isButton1&#93;&#58;= KeyBinding&#40;VK_SPACE&#41;;
Input.Keyboard.KeyBinding&#91;isButton2&#93;&#58;= KeyBinding&#40; Ord&#40;'B'&#41;, Ord&#40;'2'&#41;&#41;;
Input.Keyboard.KeyBinding&#91;isButton3&#93;&#58;= KeyBinding&#40; Ord&#40;'C'&#41;, Ord&#40;'3'&#41;&#41;;
Input.Keyboard.KeyBinding&#91;isButton4&#93;&#58;= KeyBinding&#40; VK_DELETE&#41;;

Screen.Color&#58;= Color4f&#40;0, 67 / 255, 171 / 255, 0&#41;;

Timer&#58;= TPHXTimer.Create;
repeat
Input.Update;
Timer.Update;

Player.Input&#40;Input, Timer.FrameTime&#41;;

SpriteEngine.Move&#40;Timer.FrameTime&#41;;

// The collision detection is quite expensive, there will be improvements to this later on
// It can be helped alot with the collisiongroups through
NumCollisions&#58;=SpriteEngine.CollisionTest;

// Clear the window
Screen.Clear&#40;&#41;;

if Player.Lives > 0 then begin

NumSprites&#58;=SpriteEngine.Render&#40;Screen.Width, Screen.Height&#41;;

SpriteEngine.WorldY&#58;= SpriteEngine.WorldY - Timer.FrameTime * 100;

Player.Y&#58;= Player.Y - Timer.FrameTime * 100;

end else begin

NumSprites&#58;= 0;

if Trunc&#40;Timer.ElapsedTime * 2&#41; mod 2 = 0 then
// Font.TextOut&#40;&#40;Screen.Width - Font.TextWidth&#40;GameOverText&#41;&#41; div 2, &#40;Screen.Height - Font.TextHeight&#40;GameOverText&#41;&#41; div 2, GameOverText, clrYellow&#41;
else
// Font.TextOut&#40;&#40;Screen.Width - Font.TextWidth&#40;GameOverText&#41;&#41; div 2, &#40;Screen.Height - Font.TextHeight&#40;GameOverText&#41;&#41; div 2, GameOverText, clrRed&#41;;

end;


// Font.TextOut&#40;400, 4 + Font.LineHeight * 0, Format&#40;'Lives&#58; %d', &#91;Player.Lives&#93;&#41;&#41;;
// Font.TextOut&#40;400, 4 + Font.LineHeight * 1, Format&#40;'Score&#58; %d', &#91;Player.Score&#93;&#41;&#41;;

// Font.TextOut&#40;5, 5 + Font.LineHeight * 0, Format&#40;'FPS&#58; %d', &#91;Timer.FrameRate&#93;&#41; &#41;;
// Font.TextOut&#40;5, 5 + Font.LineHeight * 1, Format&#40;'Sprites&#58; %d / %d', &#91;NumSprites, SpriteEngine.Sprites.Count&#93;&#41;&#41;;
// Font.TextOut&#40;5, 5 + Font.LineHeight * 2, Format&#40;'Collisions&#58; %d', &#91;NumCollisions&#93;&#41;&#41;;


// Flip the buffers
Screen.Flip&#40;&#41;;

until &#40;Screen.Visible = False&#41;;

Images.Free;

Font.Free;
end;

Joshas
20-08-2007, 04:23 PM
Here's what I get:

http://upload2.postimage.org/359012/sprite_demo.jpg (http://upload2.postimage.org/359012/photo_hosting.html)
Compiled with Delphi 7 PE. ATI Radeon 9250 video card.
Maybe hardware problems? But everything works correctly when using with fonts.

Andreaz
23-08-2007, 02:33 PM
Still doesnt make any real sense to me, cant really figure out if it's a hw problem or a bug in phx or what. The code would still be really helpfull to figure it out :)

wagenheimer
23-08-2007, 04:06 PM
Are the sprites that are using "Power of two" Textures?

Some video cards have problems in handling textures not power of two!

arthurprs
24-08-2007, 05:57 PM
It is vry powerfull!

Nice work

Chesso
16-09-2007, 07:22 AM
Hi everyone!

Thinking about getting back to Delphi again, and perhaps creating some games at somepoint.

But I had some troublesome issues with UnDelphiX and Asphyre (can't even use the newer version unless I get that crappy new thing......).

How would anyone say this compares to those 2 generally?

Huehnerschaender
16-09-2007, 09:11 AM
Well, Phoenix is for 2D games only while Asphyre can be used for 3D too.

But if you want to do anything in 2D the biggest advantage of Phoenix is it's crossplatform support. Using Lazarus/FPC it enables you to release your games on Windows, Linux, Mac without changing a single line of code.

Using Asphyre (which is the fastest 2D engine I know) lets you stick to Windows platform, because its bound to DirectX. The same with UnDelphiX. Also Windows only.

I have just started with Phoenix. It's a nice engine with a good variety of features. And everything else you need can be added easily.

I don't know much about its speed now, because I did not do any stress tests to Phoenix yet. But for the project I am currently working on, I don't need to be "fast" when it comes to rendering.

Hope that helps a bit.

Greetings.

Chesso
16-09-2007, 09:17 AM
Well being stuck to windows isn't too much of a problem for me, nor is having 3D support (I don't have any good knowledge concerning mathematics and what not with that anyway).

Mostly what I am looking for is basically what the basic of UnDelphiX offers, but something that runs a little more smoother concerning sprite engine/collision detection.

pstudio
17-09-2007, 10:17 AM
Well, I've hardly ever used UnDelphiX, but Phoenix works very well with its Spriteengine and Collisionengine comined. And it's very easy to use. You just derive some sprites from some basic sprite class and add them to an instance of the Spriteengine. Then the engine takes care of the rest. Very easy and powerful.

Andreaz
17-09-2007, 03:34 PM
Well, Phoenix is for 2D games only while Asphyre can be used for 3D too.
Not quite true, Phoenix can be used for 3D graphics aswell, i'ts based on OpenGL witch is a 3D API. But most of the functions is aimed at 2D rendering. Some 3D functionality is planned for the future...



But if you want to do anything in 2D the biggest advantage of Phoenix is it's crossplatform support. Using Lazarus/FPC it enables you to release your games on Windows, Linux, Mac without changing a single line of code.

Using Asphyre (which is the fastest 2D engine I know) lets you stick to Windows platform, because its bound to DirectX. The same with UnDelphiX. Also Windows only.

I have just started with Phoenix. It's a nice engine with a good variety of features. And everything else you need can be added easily.

I don't know much about its speed now, because I did not do any stress tests to Phoenix yet. But for the project I am currently working on, I don't need to be "fast" when it comes to rendering.

It should be as fast as any other lib, if you use it in a optimized way, for instance rendering a tilemap with



for Y&#58;= 1 to 500 do
for X&#58;= 1 to 500 do
Images.Find&#40;'MyImage'&#41;.Draw&#40;X*32, Y*32, Tiles&#91;X + Y * Width&#93;&#41;;


is far from the fastest way (one texture binding per tile, alot of state changes (textures, blending etc), a linear search for the image, alot of function overhead).

Huehnerschaender
18-09-2007, 06:34 AM
Not quite true, Phoenix can be used for 3D graphics aswell, i'ts based on OpenGL witch is a 3D API. But most of the functions is aimed at 2D rendering. Some 3D functionality is planned for the future...

Sure it CAN, but is there ANY build in Engine-funcionality for 3D like mesh rendering, shaders, landscape or anything else? Using pure OpenGL cannot be counted as a feature of an engine in my eyes :)


It should be as fast as any other lib, if you use it in a optimized way, for instance rendering a tilemap with


That sounds good. Maybe in another project I will try something that depends a little more of speed, but for my current work it doesn't matter to me how fast it is :) But good to know that it should be!





for Y&#58;= 1 to 500 do
for X&#58;= 1 to 500 do
Images.Find&#40;'MyImage'&#41;.Draw&#40;X*32, Y*32, Tiles&#91;X + Y * Width&#93;&#41;;


is far from the fastest way (one texture binding per tile, alot of state changes (textures, blending etc), a linear search for the image, alot of function overhead).
ehm.... who would do that? :)

Just another question Andreaz,

can it be that Phoenix 1.0's Font Tool does not work with Font Studio 4.1? I get an error that its not a valid file format when I try to import a font created with 4.1.

I don't have 4.0 though and I did not find it on Nitrogens site.... Am I doing something wrong or will there be a fix or do I have to ask Nitrogen for version 4.0?

Greetings,
Dirk

Andreaz
19-09-2007, 05:16 AM
Sure it CAN, but is there ANY build in Engine-funcionality for 3D like mesh rendering, shaders, landscape or anything else? Using pure OpenGL cannot be counted as a feature of an engine in my eyes :)

Haha, yeah guess you're right, it just sounded like you where saying it was totally impossible to do any 3D using PHX, alot of stuff there is really usefull in 3D apps aswell. An theres some 3D functionality on the way, animated meshes for instance aswell as 3D and 2D camera classes.




That sounds good. Maybe in another project I will try something that

ehm.... who would do that? :)

Probably someone that has no clue on how OpenGL works, shure most woulnt throw the find into the loop, but probably MyImage.Draw



Just another question Andreaz,

can it be that Phoenix 1.0's Font Tool does not work with Font Studio 4.1? I get an error that its not a valid file format when I try to import a font created with 4.1.

I don't have 4.0 though and I did not find it on Nitrogens site.... Am I doing something wrong or will there be a fix or do I have to ask Nitrogen for version 4.0?

Greetings,
Dirk

I have no idea i've wrote it when 4.0 was the latest version and havn't got around to test version 4.1. Think Nitrogen is the one that knows if the font format has changed to from version 4.0 to 4.1

pstudio
19-09-2007, 02:27 PM
I don't think you're doing anything wrong Dirk. I've also tried FontStudio 4.1 and can't get it to work. When I try to import a font into Phoenix Font Editor I get the same message as you.


An theres some 3D functionality on the way, animated meshes for instance aswell as 3D and 2D camera classes.
Sounds interesting.

Huehnerschaender
19-09-2007, 07:10 PM
*pressing thumbs for a quick hotfix* :lol: :P

Andreaz
20-09-2007, 04:05 PM
*pressing thumbs for a quick hotfix* :lol: :P
Seems like nitrogen changed the format completly, so i've created a phoenix font exporter for font studio instead.

http://www.phoenixlib.net/files/phxFont.dll

Make shure to add freeimage.dll in a directory where the plugin can find it.

loriendesign
21-09-2007, 05:44 AM
To Andreaz

Hi Andreaz ! I found in forum your great engine. I тhink engine is very capable, easy to use, vith good features. My question is about license. I'm not lawer and i be interested can be able to use the engine commercially.

Traveler
21-09-2007, 10:38 AM
I believe it is.

Abra Academy (http://www.pascalgamedevelopment.com/viewtopic.php?t=4279) was made with Phoenix and that is a commercial product.

WILL
21-09-2007, 09:46 PM
If you go to the News page of PGD and follow down the right column looking for the box that says 'Pascal Dev Guides', you'll see one for Game Libraries... it will tell you the specific license for Phoenix 2D and a whole bunch of other game libraries.

All of the ones that have Custom or None will allow you to make a commercial game using the library. Also note that if the library doesn't claim any restrictions in the distribution or on the website that it originated from, then it becomes 'fair play' and you can pretty much do want you want with not much contest as they did not insist upon their views or wishes.

Of course that sort of reasoning can vary from country to country based on copyright and creative ownership laws. So I make no promises as I don't study international copyright laws. ;)


To give you a more direct answer though; specifically for Phoenix 2D I'm quite sure that Andreaz has no such rules or intentions in the use of his library to restrict that in any way. He probably just doesn't want you trying to sell Phoenix 2D it's self though. :)

loriendesign
22-09-2007, 04:28 PM
Thank you for the fast answer. I check license of Phoenix 2D - Mosila Public License 1.1. I hope that with this license i can use Phoenix 2D in commercial projects - shareware and etc.

WILL
22-09-2007, 09:13 PM
You'll be fine using Phoenix to make a commercial game. It's been done before (being a small success) and I can personally attest that it is being done even now. ;)

Andreaz
23-09-2007, 09:52 AM
Yeah I'm perfectly fine with it, only thing i would wish is that you mention that you're using it in the readme/credits/splash screen or similar

loriendesign
26-09-2007, 09:54 AM
Thank all for the explanation. I am clearly now for license. Thank you. :)

Sesilla
28-09-2007, 02:59 PM
Hi all,

it's possible? How create the sea effect? I would like to create a sea background. Have you any samples?

Thanks in advance
Sesilla