Blue rectangle gfx source

Description: Outdated discussions about PGE Project and related stuff

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #1by lighthouse64 » 17 Feb 2015, 20:51

Does anyone know where the blue rectangle source is??? Because I think I might be able to replace it...
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 320
Posts: 1302
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube
  • 1

Post #2by Wohlstand » 17 Feb 2015, 21:00

lighthouse64 wrote:Does anyone know where the blue rectangle source is??? Because I think I might be able to replace it...

Blue rectangle is a vector rectangle drawn with OpenGL function:

Code: Select all

    glDisable(GL_TEXTURE_2D);
    glColor4f( 0.f, 0.f, 1.f, 1.f);
    glBegin( GL_QUADS );
        glVertex2f( player.left(), player.top());
        glVertex2f( player.right(), player.top());
        glVertex2f( player.right(),  player.bottom());
        glVertex2f( player.left(),  player.bottom());
    glEnd();


just a dummy GFX.
Everybody can draw it even in the Paint ;-)

Full source here:
https://github.com/Wohlhabend-Networks/PGE-Project/blob/master/Engine/scenes/level/lvl_player.cpp#L685

When I will implement the reading of playable character's graphics, instead blue rectangle will be used playable character sprite from graphics folder of config pack.

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #3by lighthouse64 » 18 Feb 2015, 7:36

Wohlstand wrote:
lighthouse64 wrote:Does anyone know where the blue rectangle source is??? Because I think I might be able to replace it...

Blue rectangle is a vector rectangle drawn with OpenGL function:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();


just a dummy GFX.
Everybody can draw it even in the Paint ;-)

Full source here:
https://github.com/Wohlhabend-Networks/PGE-Project/blob/master/Engine/scenes/level/lvl_player.cpp#L685

When I will implement the reading of playable character's graphics, instead blue rectangle will be used playable character sprite from graphics folder of config pack.
Oh. Wait, isn't it in the pge folder??? I couldn't find it :p
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

Kevsoft M
Angry developer
Angry developer
Avatar
Kevsoft M
Angry developer
Angry developer
Age: 19
Reputation: 77
Posts: 376
Joined: 26 Apr 2014
Location: Austria

Post #4by Kevsoft » 18 Feb 2015, 8:32

Nope, currently the player is only beeing painted with code.
▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.start() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬
Image
Wohlstand in interview:
Spoiler
Image

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬ Signature.end() ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #5by lighthouse64 » 18 Feb 2015, 20:15

Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 320
Posts: 1302
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #6by Wohlstand » 18 Feb 2015, 20:16

lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

    glDisable(GL_TEXTURE_2D);
    glColor4f( 0.f, 0.f, 1.f, 1.f);
    glBegin( GL_QUADS );
        glVertex2f( player.left(), player.top());
        glVertex2f( player.right(), player.top());
        glVertex2f( player.right(),  player.bottom());
        glVertex2f( player.left(),  player.bottom());
    glEnd();

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #7by lighthouse64 » 18 Feb 2015, 22:09

Wohlstand wrote:
lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();
oh. :( I guess I can't really do anything. I'm a noob at a lot of languages. :(
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 320
Posts: 1302
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #8by Wohlstand » 18 Feb 2015, 22:13

lighthouse64 wrote:
Wohlstand wrote:
lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();
oh. :( I guess I can't really do anything. I'm a noob at a lot of languages. :(
Don't worry, now I working with playable character system, so instead of blue rectangle will be a normal playable character sprite with animation ;-)

tb1024 M
Marquis
Marquis
tb1024 M
Marquis
Marquis
Age: 16
Reputation: 27
Posts: 170
Joined: 31 Jul 2014
Location: Brazil, America, World

Post #9by tb1024 » 18 Feb 2015, 23:50

lighthouse64 wrote:
Wohlstand wrote:
lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();
oh. :( I guess I can't really do anything. I'm a noob at a lot of languages. :(
The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.
But this snippet is fairly readable for someone who knows basics on 3d.
Do you want fries with that?
Image
Mal posso esperar para a versão final da engine de Wolhstand!
English Translation
I can't wait for Wohlstand's Engine final version :D

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #10by lighthouse64 » 19 Feb 2015, 22:26

tb1024 wrote:
lighthouse64 wrote:
Wohlstand wrote:
lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();
oh. :( I guess I can't really do anything. I'm a noob at a lot of languages. :(
The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.
But this snippet is fairly readable for someone who knows basics on 3d.
Wait, isn't it possible to add any squares to the rectangle?
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

tb1024 M
Marquis
Marquis
tb1024 M
Marquis
Marquis
Age: 16
Reputation: 27
Posts: 170
Joined: 31 Jul 2014
Location: Brazil, America, World

Post #11by tb1024 » 20 Feb 2015, 3:45

lighthouse64 wrote:
tb1024 wrote:
lighthouse64 wrote:
Wohlstand wrote:
lighthouse64 wrote:
Kevsoft wrote:Nope, currently the player is only beeing painted with code.
Oh... but isn't there a source for the code?
No, it generating from scratch by C++ code:

Code: Select all

 glDisable(GL_TEXTURE_2D);
 glColor4f( 0.f, 0.f, 1.f, 1.f);
 glBegin( GL_QUADS );
 glVertex2f( player.left(), player.top());
 glVertex2f( player.right(), player.top());
 glVertex2f( player.right(), player.bottom());
 glVertex2f( player.left(), player.bottom());
 glEnd();
oh. :( I guess I can't really do anything. I'm a noob at a lot of languages. :(
The rectangle does not use a texture. Since it has just a single color, you can just use the renderer. If you ever played a bit on a 3d creator with some level of "professionalness" you'd understand it.
But this snippet is fairly readable for someone who knows basics on 3d.
Wait, isn't it possible to add any squares to the rectangle?
Yes, it is, but in that case texture-mapping would be more polygon-efficient.
Do you want fries with that?
Image
Mal posso esperar para a versão final da engine de Wolhstand!
English Translation
I can't wait for Wohlstand's Engine final version :D

lighthouse64 M
Topic author, Duke
Duke
Avatar
lighthouse64 M
Topic author, Duke
Duke
Age: 15
Reputation: 13
Posts: 132
Joined: 15 Feb 2015
Location: IDK!

Post #12by lighthouse64 » 20 Feb 2015, 18:05

Ok. Are you saying it wouldn't stick to the rectangle?
Player of hedgewars!!! :)
And hi... it's me from smbx
Currently bug testing for Mac :apple: And Windows :windows:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 25
Reputation: 320
Posts: 1302
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #13by Wohlstand » 17 Jun 2017, 17:20

This thread is no more actual since PGE Engine is long time can draw playable character animations


Return to “PGE Project”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest