Results 1 to 10 of 13

Thread: Delphi XE3 , Asphyre Sphinx 3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Delphi XE3 , Asphyre Sphinx 3

    Hi everyone, I've done some basic programing in Asphyre 3.1 on Delphi 7, now I'm trying to get up to date with the latest one, but since this uses no components at all, the help file is like non-existent. I'm overwhelmed by it. Can anyone give me a few samples of how to startup a simple program in fullscreen for example, load stuff from the asdb archive ? The examples that come with it seem overwhelming, I need all that stuff JUST to initialize a simple full screen app? Sorry for some reason I can't do a [ENTER] inside this dang window (today nothing works). Greetings Robert

  2. #2
    Hi robert. Wecome back

    Yes Asphyre Sphinx does require more code to initialize. The reason for this is the fact that it now supports DirectX (ranging from DX9 to DX11) and OpenGL providers.
    And of course Asphyre Sphinx 3 also has support for full 3D graphics.

    I suggest that you take a look at provided Examples again to get better idea of how it works.
    Documentation is now saved in several different html files. I suggest opening index.html in Helf folder which is starting page for Asphyre Sphinx 3 documentation.

    You will realize that rendering 2D content on Asphyre Sphinx is quite similar to the one from Asphyre eXtreme. The only drawbac is that there is no premade Sprite Engine for Asphyre Sphinx. So to learn how to render 2D content you might even wanna check the base souce code from Aspyre eXtreme Sprite engine.


    Anywhay after the 3rd PGD challenge is over I might be able to lend you a hand again.
    But until then I'm trying to devote that litle of free time I have to finishing my entry which unfortunately doesn't go prety well.

  3. #3
    Hi , thank you!

    Well after the timer issue with my previous project and some other stuff I was off for a while. But I feel like trying this again, I will eventually succeed in finishing at least a simple game once.

    Anyway I've started experimenting with Asphyre Sphinx 3 , hate this feeling, I feel overwhelmed, don't know where to start etc... pfffff. Anyway I've decided that I'll update this post regularly with my findings, I'm planning to redo my previous (unfinished ) editor in this engine perhaps with more success.


    The examples are a bit to much for my taste...but one can't expect the creator of the engine to make a step-by-step example for people, you are supposed to learn it or find another hobby. So what I did is, I've created my first test which is the first in a series of step-by-step tutorials for more complex stuff.

    Right now what it does is, initialize the engine in full screen with 640x480, uses Sprite Engine (by Gutya, thank you!!!) , it loads one image from the archive file, creates one sprite that can be moved around with the mouse on the screen. Using ESCAPE you can exit the program. Not much, but for the very first very basic step it's something.

    Greetings
    Robert
    Attached Files Attached Files

  4. #4
    Hello, finally after some long time, I've got some free time again on my hands to start experimenting. I'm playing with Ashpyre 3 , my problem is can I use for map editor something like this :

    ADevie1.WindowHandle:=Panel1.Handle;

    I've tried looking for It but can't seem to find it.

    Greetings

  5. #5
    Hi Robert! Welcome back

    To change to which component will Asphyre Sphinx 3 render you need to use code similar like this:

    I quickly modified code of the Basic example which comes with Asphyre Sphinx 3 so that it renders to Panel1 instead of directly rendering to the MainForm. I have left original code lines as comens so you can easily see what was changed and how.
    Code:
    procedure TMainForm.OnDeviceInit(Sender: TObject; Param: Pointer;
     var Handled: Boolean);
    begin
     //DisplaySize:= Point2px(ClientWidth, ClientHeight);
     DisplaySize:= Point2px(Panel1.ClientWidth, Panel1.ClientHeight);
     //GameDevice.SwapChains.Add(Self.Handle, DisplaySize);
     GameDevice.SwapChains.Add(Panel1.Handle, DisplaySize);
    end;

  6. #6
    Hello, thank you

    Hopefully I will get somewhere now. Right now I'm having a heck of a time again with loading AsphyreImages from asvf into TBitmap :

    Code:
          ImageTemp:=GameImages.Image[GameImages.Items[i].Name];
    It does not work obviously because ImageTemp expects TBitMap , but gets TAsphyreImage ... is there a simple solution for this ?

    Greetings

    update :

    think I will just cheat,since I'm planning to use fixed tiles, they won't change ... I'll just use ImageList 's to store tiles for the editor , and will use It like this :
    Code:
    procedure TForm1.DisplayAvailableTiles( TileSet : string );
    var i,j : integer;
        MyType : string;
    begin
      j:=0;
      // fill up listview with images
      for i:=0 to GameImages.ItemCount-1 do
        begin
          MyType:=copy(GameImages.Items[i].Name,0,4);
    
          if MyType = TileSet then
            begin
              if TileSet = 'Land' then ListView1.SmallImages:=TileDesert;
              if TileSet = 'Ocea' then ListView1.SmallImages:=TileOcean;
              ListView1.Items.Add.Caption:=GameImages.Items[i].Name;
              ListView1.Items.Item[j].ImageIndex:=j;
              j:=j+1;
            end;
    
         end;
      
      // set index to 0
     ListView1.ItemIndex:=0;
    end;
    it might not be the best solution but works nicely... now using a combobox , I can display tiles per category :

    -DesertTiles , OceanTils , DebrisTiles etc...
    Last edited by robert83; 24-02-2014 at 08:52 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •