Author Topic: SpriteEditor  (Read 4587 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
SpriteEditor
« on: March 19, 2011, 03:38:29 PM »
Deleted
[attachment deleted by admin]
« Last Edit: April 11, 2015, 09:19:50 AM by Peter »

Charles Pegge

  • Guest
Re: SpriteEditor
« Reply #1 on: March 20, 2011, 10:16:16 AM »
Hi Peter,

I'll take a look this evening. On the O2 version (A030) I am working on it seems to be okay except there are only a few colors mapped in the grid on the left.

Charles
« Last Edit: March 20, 2011, 02:21:57 PM by Charles Pegge »

Charles Pegge

  • Guest
Re: SpriteEditor
« Reply #2 on: March 20, 2011, 02:20:37 PM »

Yes I noticed the speed is slow - about 1/4 second delay between the screen cursor movement and the actual mouse movement.

Windows is not efficient at laying down individual pixels. I will investigate further.

Charles

Charles Pegge

  • Guest
Re: SpriteEditor
« Reply #3 on: March 20, 2011, 03:16:28 PM »
Peter,

If you nobble DrawRectangle, you will see the difference in the screen refresh rate. I do not know what MS does with Setpixel but block copying is probably 100 times more efficient for getting blocks of pixels onto the screen. All your games depend on this factor :)

Charles

Nobbled DrawRectangle!
Code: [Select]
Function DrawRectangle(byval x2 as long, byval y2 as long, byval x1 as long, byval y1 as long, byval bCol as long)
    xor  esi,esi
p2: xor  edi,edi
p1: mov  edx,x2
    mov  ecx,y2
    add  edx,edi
    add  ecx,esi
    pushad
    'push bcol
    'push ecx
    'push edx
    'push backhdc
    'call SetPixel
    popad
    inc  edi
    cmp  edi,x1
    jb   p1
    inc  esi
    cmp  esi,y1
    jb   p2
End Function
 

Charles Pegge

  • Guest
Re: SpriteEditor
« Reply #4 on: March 20, 2011, 04:17:53 PM »
Peter,

I would ease your software development towards using Opengl. Then most of the work gets done on the graphics hardware. You build 2d or 3d shapes as compiled drawing lists then move, scale or rotate them in any direction with very little use of the CPU.

Learning OpenGl is a very good investment because it is not dependent on Windows platforms. There are even simplified versions of Opengl for mobile phones.

I don't think you would have to alter your game design very much - just the bottom layers and to think about shapes and surfaces instead of pixel blocks

Charles

Aurel

  • Guest
Re: SpriteEditor
« Reply #5 on: March 20, 2011, 10:43:12 PM »
I think that Marcus -author of NaaLaa use BitBliter api and work very well.

kryton9

  • Guest
Re: SpriteEditor
« Reply #6 on: March 22, 2011, 12:20:34 PM »
I am in that situation too. Using opengl, but to not be tied to the Windows API. I am looking at various options. In c++ I went with SFML, but it is a c++ based library. SDL and some others are c libraries. There are lots of help for SDL, so that is probably what I will try to get working with Oxygen.  SFML is really nice in that it does it all, input, image, sound, fonts, 2d and 3d screens. It can be used as Static or Dynamic links to the libraries. But I don't know if we can use that with Oxygen.  Making wrappers or using other libraries in custom languages is not something I have done and so it still seems like magic to me.

Aurel

  • Guest
Re: SpriteEditor
« Reply #7 on: April 10, 2011, 01:01:57 AM »
Any news about Sprite Editor Peter...?

Aurel

  • Guest
Re: SpriteEditor
« Reply #8 on: April 11, 2011, 11:46:27 AM »
Peter...
What you mean about simple Icon Editor ?
I've found two source codes on planetsourcecode but is in VB...

Aurel

  • Guest
Re: SpriteEditor
« Reply #9 on: April 19, 2011, 01:37:36 AM »
Hi Peter ...
In atachments you will find two icon editors written in VB,
i hope that you will mix-up something ;)

[attachment deleted by admin]

[attachment deleted by admin]

Aurel

  • Guest
Re: SpriteEditor
« Reply #10 on: April 19, 2011, 09:24:29 AM »
Of course i mean directly with OxygenBasic :)