Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1409995 Posts in 69485 Topics- by 58510 Members - Latest Member: ExContinium

July 21, 2024, 07:51:36 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityJams & EventsCompetitionsThe Ledge's Edge [Finished]
Pages: 1 [2]
Print
Author Topic: The Ledge's Edge [Finished]  (Read 12761 times)
___
Vice President of Marketing, Romeo Pie Software
Level 10
*


View Profile
« Reply #20 on: June 12, 2009, 12:35:25 PM »

Quote
There are maybe 3 things that piss me off, the most recent of which is adding a health display as a part of the view, but for the life of me I can't figure it out.

You can get the top left corner of the screen at any given time with "view_xview[0]" and "view_yview[0]"  I assume that you're using just one view, and it's the first one (0th in this case.)

For my last game I had an object that handled all the hud drawing, and every step it would set it's x and y position to view_xview[0] and view_yview[0].  Then it draws things based on it's x and y, so to draw a health bar it could be like:

draw_rectangle(x + 32, y + 32, x + 64, y + 64, 0);

or something like that.  But that rectangle will remain at (32, 32) relative to the screen.  I think GM has a built in drawing function for drawing a health bar, but I haven't used it.  I just determine the width of the rectangle based off (health/health_max)*width

HOPE THAT HELPS.
Logged
Pencerkoff
CCCP
Level 4
*


Hello I am Pencerkoff


View Profile
« Reply #21 on: June 12, 2009, 12:49:43 PM »

Hello this is Pencerkoff

You can get the top left corner of the screen at any given time with "view_xview[0]" and "view_yview[0]"  I assume that you're using just one view, and it's the first one (0th in this case.)

When I tried that, my "HUD" would wiggle about.  I figured out that it was being drawn one frame too late, so I set the x and y position in an "end step" event, only to find that that didn't change anything.  That rectangle bit is far better than what I had planned, which would have been a bunch of sprites.  Maybe I'll add some health power-ups or something.

What if I say "*censored* sucks?"

Boom!  You're castrated.  I'd apologize but listen, the rules were quite clear.

-PENCERKOFF
Logged

Lurk
Super Artistic
Level 5
*


....


View Profile WWW
« Reply #22 on: June 12, 2009, 02:28:35 PM »

Put it in the 'draw' event.

 draw_rectangle_color(view_xview[0]+10,view_yview[0]+10,view_xview[0]+(object0.lifebar*20)+10,view_yview[0]+40,c_red,c_red,c_red,c_red,false)

I put a lifebar variable in my player object(object0), and this is drawn by a controller object. You could create an array to call different colors at different health points:

hp[0]=c_red
hp[1]=c_red
hp[2]=c_yellow
...
etc
 declare a variable for it first ex: in the draw event, before drawing the rectangle, just put hp_col=object0.hp[object0.lifebar] and then

draw_rectangle_color(view_xview[0]+10,view_yview[0]+10,view_xview[0]+(object0.lifebar*20)+10,view_yview[0]+40,hp_col,hp_col,hp_col,hp_col,false)
Logged
Pencerkoff
CCCP
Level 4
*


Hello I am Pencerkoff


View Profile
« Reply #23 on: June 12, 2009, 02:49:31 PM »

Hello this is Pencerkoff

Put it in the 'draw' event.

 draw_rectangle_color(view_xview[0]+10,view_yview[0]+10,view_xview[0]+(object0.lifebar*20)+10,view_yview[0]+40,c_red,c_red,c_red,c_red,false)

I put a lifebar variable in my player object(object0), and this is drawn by a controller object. You could create an array to call different colors at different health points:

hp[0]=c_red
hp[1]=c_red
hp[2]=c_yellow
...
etc
 declare a variable for it first ex: in the draw event, before drawing the rectangle, just put hp_col=object0.hp[object0.lifebar] and then

draw_rectangle_color(view_xview[0]+10,view_yview[0]+10,view_xview[0]+(object0.lifebar*20)+10,view_yview[0]+40,hp_col,hp_col,hp_col,hp_col,false)


Draw Event!  That actually makes sense now.  You're both sexy and smart.

I'll update my first post with my latest demo.  I didn't plan on releasing anything more until I was done, but I have to share this with the world.

-PENCERKOFF
Logged

___
Vice President of Marketing, Romeo Pie Software
Level 10
*


View Profile
« Reply #24 on: June 12, 2009, 03:32:13 PM »

If your hud is wiggling around, it might be because of floats.  I had a problem where my hud was jittering around 1 pixel because my camera would be at like "4031.40320141"  Round off the x and y values before you draw.
Logged
Danrul
Level 4
****


View Profile
« Reply #25 on: June 12, 2009, 08:54:38 PM »

Im assuming you might want info on how many enemies I could run before it dropped below 30 FPS.  On a 2.2 ghz quad core compy with a crappy 512 MB graphics card i got 450 before it dipped below 30.

I'm not sure if that helps at all, but I'd also like to add this is enormous fun, even if it wasn't Tim Langdell.
Logged
Pencerkoff
CCCP
Level 4
*


Hello I am Pencerkoff


View Profile
« Reply #26 on: June 12, 2009, 09:28:34 PM »

Hello this is Pencerkoff

Im assuming you might want info on how many enemies I could run before it dropped below 30 FPS.  On a 2.2 ghz quad core compy with a crappy 512 MB graphics card i got 450 before it dipped below 30.

I'm not sure if that helps at all, but I'd also like to add this is enormous fun, even if it wasn't Tim Langdell.

Wow.. you're computer rocks mine.  I think I hit 250 before I start to drop.  I haven't really decided if they are all Tim Langdell's cronies, or if maybe he cloned himself like a thousand times.  Regardless you get to fight the bigger one in the end.

-PENCERKOFF
Logged

Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #27 on: June 13, 2009, 05:58:51 AM »

Pencerkoff should just try using Construct instead. For the motherland!
Logged

deadeye
First Manbaby Home
Level 10
*



View Profile
« Reply #28 on: June 13, 2009, 07:22:37 PM »

I would agree, because Open Source is synonymous with Communism.  But Construct isn't ready yet, so... don't use it!  (Unless you want to beta test.)


(But it still is better than you-know-what*.)




*(I don't wish to be castrated again.)
Logged

tweet tweet @j_younger
Davioware
Level 1
*



View Profile WWW
« Reply #29 on: June 14, 2009, 03:34:42 PM »

Deadeye you traitor...
Logged

deadeye
First Manbaby Home
Level 10
*



View Profile
« Reply #30 on: June 14, 2009, 06:02:11 PM »

Deadeye you traitor...

Goddamn it I don't have a Ban Button on this forum.

Anyway let Pencerkoff make his game in peace, I want to chop up some testicles Hand Knife RightWell, hello there!
Logged

tweet tweet @j_younger
Pencerkoff
CCCP
Level 4
*


Hello I am Pencerkoff


View Profile
« Reply #31 on: June 15, 2009, 03:27:58 PM »

Hello this is Pencerkoff

I would agree, because Open Source is synonymous with Communism.  But Construct isn't ready yet, so... don't use it!  (Unless you want to beta test.)


(But it still is better than you-know-what*.)




*(I don't wish to be castrated again.)

Open source and Communism aren't really synonymous.  A proper Communism would allow most of the program to be open source while adding a phone tap right into the code.  Any game made with it would randomly break into propaganda half-way through.

Also I'm not sure if there is a worse fate than being castrated twice.  I think that will be one of the options at the end of my game.

What's this Construct?

-PENCERKOFF
Logged

Melly
Level 10
*****


This is how being from "da hood" is like, right?


View Profile
« Reply #32 on: June 15, 2009, 03:42:35 PM »

Construct is another Game Maker style program for you to make games, only it's not 1.0 yet so it still has bugs, but it seems to be getting pretty close to release, and it seems promissing (HIdeous has made some interesting stuff in it).

Also, Open source would only be Communism is the only owner of the source was the government. And yes, if it broke into propaganda randomly and had spyware logging your computer activity into the Kremlin servers.
Logged

Feel free to disregard the above.
Games: Minus / Action Escape Kitty
Pencerkoff
CCCP
Level 4
*


Hello I am Pencerkoff


View Profile
« Reply #33 on: June 18, 2009, 12:31:00 PM »

Hello this is Pencerkoff

I'm finished.  If you don't finish the game for whatever reason, you still need to see the ending by using the standard Pencerkoff cheat code.  Push "P" in the start menu.

If you have "constructive criticism" on my game, I DO NOT want to hear it.

You either say what you liked or, in a non-constructive way, bash my game.

These are the rules, those breaking them will be castrated.

-PENCERKOFF
Logged

___
Vice President of Marketing, Romeo Pie Software
Level 10
*


View Profile
« Reply #34 on: June 18, 2009, 01:23:57 PM »

http://kotaku.com/5295404/pencerkoff-releases-new-smash-hit-ledges-edge
Logged
Melly
Level 10
*****


This is how being from "da hood" is like, right?


View Profile
« Reply #35 on: June 18, 2009, 08:11:18 PM »

Fantastic ending.
Logged

Feel free to disregard the above.
Games: Minus / Action Escape Kitty
Noyb
Level 9
****



View Profile WWW
« Reply #36 on: June 18, 2009, 10:47:15 PM »

The platforming is as heavy and slippery as the man himself, but the boss fight was worth the effort. The sine-wave platforms are a really nice touch. Gentleman

In the future, I wonder if the-programming-tool-that-shall-not-be-named will be reduced to one of the esoterics, like Brainfuck? I've been fighting with its arbitrary object-selection criteria all while making Edge Tycoon. Tired
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic