Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Infinitus

Pages: [1] 2 3 ... 198
1
Entertainment / Re: State of the World
« on: October 01, 2014, 06:05:05 pm »
P.s. this is a joke topic hence why its in entertainment.

2
Feedback / Re: When did we get a Llama?
« on: October 01, 2014, 07:44:41 am »
Ignore the drama llama and he goes away.

3
Updates / Re: GAME JAM GAMES ARE HERE
« on: September 04, 2014, 06:24:32 pm »
UDP won't help you, you still need to do NAT punchthrough if you don't want to port-forward. I doubt GM supports it as you typically need a intermediary server to do so.


4
Discussion / Streaming Development
« on: July 27, 2014, 01:39:03 pm »
Anyone here stream development?

Been doing it with the players of Zombie Grinder, and with some of the developers over at /r/gamedev.

It's quite interesting to watch how people go about things, would be fun to see some of you guys working on projects :)

5
Coding / Re: Can I get some help.
« on: July 27, 2014, 01:34:30 pm »
Where your code is running calculations to determine row, column, and fraction inside of the loop I am not entirely sure that it is faster in the end than using a few if checks.  Even though my code has redundant code, it being an if/else means only 1 of the halves is ever checked in one run of the loop.  Yours does look cleaner, and at first glance it seems it would work in gml.  From what I understand the mod operator is a slow one to calculate though, so running it 20 times per draw event I think would be slower in the end.  I could be wrong though.
Optimization is entirely redundant in that code, I only wrote that because its far more maintainable and less bloated to do it that way. Personal preference.

However if you want to talk optimization;

Branching is typically one of the most expensive operations you an execute on a CPU, they incur pipeline stalls and introduce branch-delay-slots. If you are ever trying to optimize code, the first thing you will want to do is remove redundant if statements. Modulus in practice on integral values shouldn't be particularly slow (its typically the same cost as a DIV instruction, plus a MOV (so worst case; 40 cycles?)).

GML will incur far higher costs being an interpreted language, but the principle of branching being one of the more expensive operations will probably still hold true.

Again, I was going for simpler code, not optimized :). Premature optimization is the bane of all evil in programming, its definitely not something you should consider in code like this unless you know its causing a problem.


6
Coding / Re: Can I get some help.
« on: July 27, 2014, 09:43:00 am »
Alternatively...  and mostly because I feel like giving this a whack, you could do all of this in a single loop without drawing multiple layers (meaning the background and the heart on top).  I am going to use the variables Health_X, and Health_Y to represent the position on the screen of the whole health bar.  I am also assuming a heart sprite called "sprHeart" is a sprite containing 5 images (0-Empty Black Heart, 4-Full Red Heart)

Code: [Select]
//Variables set in the create event
Health_X =  ??        //Enter the x position of health bar here
Health_Y =  ??        //Enter y position here
X_Grid = 6            //How many pixels over the next heart will be drawn
Y_Grid = 6            //How many pixels down the second row of hearts will be drawn
Max_Health = 80       //This would be assuming the player has two rows of 10 hearts with a quarter heart system  Every time the player gets a container heart this would be updated to reflect his current maximum.

//Draw event
Code: [Select]

//Initialize relavent variables
var i, Full_Hearts, Total_Hearts, Fraction;

//Determine which image to draw for the last heart containing health
Full_Hearts = floor(global.life/4);      //Stores the current number of full hearts
Fraction = global.life mod 4;            //Stores the fractional quantity of the last heart (0-3)
Total_Hearts = Max_Health/4              //Stores the total number of hearts the player currently has available

//Draw the players health bar
for (i=0 ; i<Total_Hearts ; i += 1)
{
     //Determine the location to draw the heart
     if i < 9     //Draw first row of hearts
     {
          if i < Full_Hearts     //Draw full hearts
          {
               draw_sprite(sprHeart,4,view_xview[0]+Health_X+i*X_Grid,view_yview[0]+Health_Y);
          }
          else
          {
               if i == Full_Hearts     //Draw fractional heart
               {
                    draw_sprite(sprHeart,Fraction,view_xview[0]+Health_X+i*X_Grid,view_yview[0]+Health_Y);
               }
               else     //draw empty hearts
               {
                    draw_sprite(sprHeart,0,view_xview[0]+Health_X+i*X_Grid,view_yview[0]+Health_Y);
               }
          }
     }
     else     //Draw second row of hearts
     {
          if i < Full_Hearts     //Draw full hearts
          {
               draw_sprite(sprHeart,4,view_xview[0]+Health_X+(i-10)*X_Grid,view_yview[0]+Health_Y+Y_Grid);
          }
          else
          {
               if i == Full_Hearts     //Draw fractional heart
               {
                    draw_sprite(sprHeart,Fraction,view_xview[0]+Health_X+(i-10)*X_Grid,view_yview[0]+Health_Y+Y_Grid);
               }
               else     //draw empty hearts
               {
                    draw_sprite(sprHeart,0,view_xview[0]+Health_X+(i-10)*X_Grid,view_yview[0]+Health_Y+Y_Grid);
               }
          }
     }
}



I guess I can't say for sure, but I think this would be more efficient, but it looks bigger because of all the comments and white space.  This is untested code, but it should work...  If you wanted it to be even more efficient you could update "Full_Hearts", "Fraction", and "Total_Hearts" outside of the draw event (could be updated every time the player is hit for example).

I don't even know GML, so this probably won't work, but that redundent code bugged me;

Code: [Select]
//Initialize relavent variables
var i, Total_Hearts;

//Determine which image to draw for the last heart containing health
Total_Hearts = Max_Health/4              //Stores the total number of hearts the player currently has available

//Draw the players health bar
for (i=0 ; i<Total_Hearts ; i += 1)
{
var row = i / 10
var column = i mod 10
var fractions = min(4, max(0, global.life - (i * 4)))

draw_sprite(sprHeart,fractions,view_xview[0]+Health_X+(column*X_Grid),view_yview[0]+Health_Y+(row*Y_Grid));
}

7
Feedback / Re: What Can We Do To Get More Life Here?
« on: April 26, 2014, 10:53:32 pm »
The problem with the team was that we never had any dedicated programmers other than myself.  I would love to get 1 or 2 more people on board with consistent coding.  If others want to contribute to code, they may, but it has to be done on their own fork of the repo (this is basically what larger open source softwares do, Linux included).

Quote
equally, the development branch should be the most important branch at the moment.

Correct, development is the ONLY branch that people from create their forks and branches from.  Master is a stable release which is merged with development when releases are ready.

Here's another problem. Good coding standards are great and all, but trying to do this with the level of programming knowledge of most of the people that visit this site is going to heavily put people off contributing.

If you want to setup community projects, make them as simple to contribute to as possible, don't get into bs like forking source bases.

8
Feedback / Re: What Can We Do To Get More Life Here?
« on: April 26, 2014, 10:52:01 pm »
Time for this topic again is it? lol

I doubt there is much you can do for this site at this point, the site is too niche and to low a user base to sustain much active discussion. Focusing on shallow aspects like a new project, or a prettier design won't get you anywhere, the site needs a complete refocusing.

I still check in on this site occasionally, but never post because there is nothing interesting to post on, and I know topics I create will not get discussed either. Its the catch-22 of having such a low userbase.

The site needs to give something to people they are not going to get elsewhere, something interesting or unique enough to maintain interest, something you can advertise around on other websites and have people flow in, rather than just relying on people who stumble on the site.

And yeh, design is ugly (my bad lol), but its not something you should really be worried about at this point if I were you, there are more important things to deal with.


9
Holy !@#$% we've been greenlit!

10
Feedback / Re: ZFGC API is down
« on: December 23, 2012, 05:01:25 am »
Shame its not usable though. Different CMS.
Yup :P

11
Feedback / Re: ZFGC API is down
« on: December 23, 2012, 01:33:47 am »
As far as I know, the API was never actually functional so that may be why.
The original-original api was actually functional lol, just nobody used it. Think I have the code for it lying around somewhere.

12
Other Projects / Re: [Demo] Zombie Grinder
« on: July 26, 2012, 04:49:12 pm »
Is that the wind sample from A Link to the Past I hear?!
Not sure, jordan made that map, I think its just a random sound from freesound.org tho.

Quote
How would you acquire this weapon?
Shop or bought in-game :P. Same as all the other weapons in this game. Contemplating making the laser cannon a donator reward tho.

Quote
It looks interesting but honestly, needs moar lighting effects ya derp! Looking fantastical, however.
Yes, yes it does. If it makes you feel better I added a load of heat-shimmer shader effects to it :D

13
Other Projects / Re: [Demo] Zombie Grinder
« on: July 26, 2012, 01:07:43 am »
<a href="http://www.youtube.com/watch?v=FCYuhv7HJpM" target="_blank">http://www.youtube.com/watch?v=FCYuhv7HJpM</a>
Most overpowered weapon evar.

14
Other Projects / Re: [Demo] Zombie Grinder
« on: July 24, 2012, 10:44:13 am »
How do you feel about youtube monetizing?  Probably won't do this, but would you approve of play-through videos that are monetized?
Really couldn't care less lol.

15
Other Projects / Re: [Demo] Zombie Grinder
« on: July 24, 2012, 01:58:11 am »
Also just for the funz;

Super Duper Special Hidden Key For Special Awesome Hats For ZFGC
P25GR-WAUA0-MQR9X

16
Other Projects / Re: [Demo] Zombie Grinder
« on: July 24, 2012, 12:26:37 am »
www.zombiegrinder.com

Just thought I would post the sites new URL :3.

Also come join in, games pretty active now, got something in the region of 10000+ accounts registered in the last 2 months or so :3. Usually have 15-20 people online at a time, quite often a lot more.

17
Entertainment / Re: Battle.net IDs - Diablo 3
« on: May 19, 2012, 01:25:14 am »
!@#$% it, I bought it, everyone was going on about it D:

Infinitus#2902

18
Entertainment / Re: Portal 2 custom maps
« on: May 14, 2012, 05:16:45 pm »
Puzzle Editor?  Is this a new tool, or is it like...integrated into Hammer?
Part of the game now, basically a very dumbed down stylized level editor :3

19
Entertainment / Re: Facebook has a new chat feature...interesting
« on: May 09, 2012, 07:24:51 pm »
Crap.

20
Coding / Re: Building a Game Engine Help
« on: May 07, 2012, 10:57:49 am »
Quote
Oh yeah, Infini, I have been studying your code. For one, your PlatformMain() entry point is somewhat unnecessary. You can use main() for creating Win32 App, it even says so on the Microsoft Docs. If you want to get rid of the console window, you can just use:
I think you missunderstand the point of PlatformMain(). The main point of my engine is to make it entirely cross-platform, each platform code stub implements the main method differently (setting up different bits of the environment specific to the platform) and implements error recovery, it then calls the PlatformMain which contains the "generic" platform-agnostic code for the actual game.

It has nothing at all to do with the subsystem being compiled to. The compiler has no knowledge of PlatformMain it dosen't do anything based on it, it's just a nicer system to hide away the platform specific code.

I also intend to have NO platform specific code outside of the platforms folder, allowing porting to be possible just by copy/pasting a platform folder and updating it to support the new platform. No #ifdef WIN32 etc are allow anywhere outside the platform folder, thus the PlatformMain is neccessary.

Quote
Also, I noticed you use
#pragma once
as your control guard. Not sure if you know, but I've read that it's best to use
Actually no it isn't.

This holds true for years and years ago, but nowadays all of the standard C++ compilers fully support #pragma once, and make optimizations based on it. All the compilers I'm targeting (Intel, GCC, MS) support it so its fine :3.

The header guard system is a left over from when only MS supported the definition.

Pages: [1] 2 3 ... 198

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.062 seconds with 19 queries.