Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


HeExists

Member Since 15 May 2011
Offline Last Active Sep 15 2014 07:05 AM

Topics I've Started

Layer and Frame?

15 June 2014 - 01:30 PM

Hi,

   I am making a small game, where, now I want to implement layer and frame. Something like timeline. Each scene will consists of some layer and each layer will have some frames. Each frame will be used as a level and each layer will decide which entity will be visible. If a layer is invisible, all the entity belongs to that layer will be invisible.

   I just need some idea how do I implement them! As a class, struct or vectors etc. I only need idea, nothing else.

 

Thank you.


Calculating healthbar percentage

29 May 2014 - 12:30 PM

Hi,

   I am trying to draw a health bar when player get hit by enemy. The healthbar is a rect, like -

rect( x, y, w, h)

The width is 177 and height is 12. The maximum health of the player may bigger then 100. So when player get hit the width of the rect should decrease according to the damage. Since the width of the rect is not 100, I am having a little difficulties to calculate the actual healthbar parcent.

What I am doing is -

unsigned int health = (currentHealth / maxHealth) * 100;

This only works if the width is 100. If I multiply with 177 (actual width of the rect), it always returns 0.
So how do I increase/decrease the percentage of the healthbar according to the width of the rect?

 

Thanks in advance.


Failed to start!

04 November 2013 - 01:07 PM

Hi,

   I am using code::block and angelscript 2.27.1. Just now I tried to compile my app with the new release 2.28 and found the script is not creating the engine.

engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
if( engine == 0 )
{
    printf("Failed to create script engine.\n");
    return -1;
}

It is returning -1 here.

 

It is working fine with 2.27.

 

Thanks.


Game Loop!

01 November 2013 - 09:21 AM

Hi,

   I have to register a function which will loop continously to call the game update function from game loop. say -

void OnUpdate()
{
   // Update functions
}

Could someone kindly explain a little how to register it.

 

Thanks in advance.


Opengl object positioning?

15 May 2011 - 08:01 AM

Hi,
I just want to know a simple question regarding the glTranslatef. How do I position 10 plaines one after another in x axis, like a tile map using a plain?
I don't want to use glVertex3f to do so.
   for(int i=0; i<10; i++)
   {
   	glTranslatef(i, 0.f, 0.f);
   	glutSolidPlaine();
   }

Above is what I am doing right now. But It is overlapping each other by half.

Thanks in advance.
Regards

PARTNERS