This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Global Men

Return to Global Men

kenshinakhkenshinakh

2009/11/16

Pretty good so far! By the way, I don't know why, but I get a slight lag when I play. I've already restarted my computer, and the other scenarios I've tested haven't lagged yet, so I think there's something in your code that might be using a lot of cpu. (I run a 2.0 ghz c2d, and I think that should be enough for java 2d games.).
A new version of this scenario was uploaded on Tue Nov 17 03:31:04 UTC 2009
kenshinakhkenshinakh

2009/11/17

Nice you fixed the long loading! And you added new music. The lag is sligthly less, but for some reason i still see it lag. I get like 30-40% cpu load on average, and when I jump, it goes to 45. It seems like it lags a bit when I jump? Other than that, everything else seems to be working great.
MTKMTK

2009/11/17

I think the old music was better.
MTKMTK

2009/11/17

And it kept playing even after I left the page!
LilpowerdudeLilpowerdude

2009/11/17

oh yeah, the midi music still isnt working 100%. The squencer doesn't go down when the game ends unfortunately. I will try to see if i can fix it and i will add better music soon!
A new version of this scenario was uploaded on Wed Nov 18 04:04:57 UTC 2009
MTKMTK

2009/11/18

Nice!
kenshinakhkenshinakh

2009/11/18

So far so good! Keep it up.
A new version of this scenario was uploaded on Sun Nov 22 23:04:24 UTC 2009
kenshinakhkenshinakh

2009/11/23

Nice addition to the gameplay.
plcsplcs

2009/11/23

Like the new additions, getting much more related to the theme! A minor suggestion, on the cloud maps, it is very hard to tell what is clouds and what is land, is this intentional?
LilpowerdudeLilpowerdude

2009/11/24

plcs: yeah... at first i wanted to make the land invisible to make it hard but i decided it would be too hard so i made the clouds white instead but unfortunately, lots of people still have trouble with the game so i will change it as soo as possible! ill make the clouds a lot more visible
A new version of this scenario was uploaded on Sun Nov 29 23:45:03 UTC 2009
MTKMTK

2009/11/30

Where's that skip button... I haven't really got the graphics driver working on my computer, causing this game to go around 4 FPS, the intro takes almost half an hour...
kenshinakhkenshinakh

2009/11/30

4 fps xD. Ah that's y the intro took you 1/2 an hr. .. How did you manage to play if it took that long? It's probably 1 fps on my game b/c it's slightly graphic intense on the processor.
A new version of this scenario was uploaded on Mon Nov 30 03:08:12 UTC 2009
MTKMTK

2009/11/30

I don't understand. Did you say that it goes at 1 act/second on your computer?
LilpowerdudeLilpowerdude

2009/11/30

um... I don't really think ur graphics driver has anything to do with the game =_= it should run fine... java doesn't run on a graphics card, its all cpu processed I think kenshin meant that if my game runs that slow, then his game probably runs slower
kenshinakhkenshinakh

2009/11/30

As of today, java is still cpu processed... I think. Because if it were processed by GPU, none of our games would lag, and all those 3d scenarios would have a respectable screensize.
BlackholeGFBlackholeGF

2009/11/30

I found a bug; I hit a molecule and somehow was pushed up into some land. I then floated upwards inside the land until I walked out.
MTKMTK

2009/11/30

I thought that Java uses hardware acceleration. kensinkakh said: 4 fps xD. Ah that's y the intro took you 1/2 an hr. .. How did you manage to play if it took that long? It's probably 1 fps on my game b/c it's slightly graphic intense on the processor. Actually, Midori World runs much, much faster (I don't know, maybe something like 10-20 fps by eye) then Global Men on my computer. It is actually tolerable to play, while Global Men takes something like a few minutes to complete the first training level. I still wish I could get the full 60 FPS that it is supposed to be.
kenshinakhkenshinakh

2009/11/30

Well, sorry I meant that java does use hardware acceleration (in a sense)., xD, but I don't think anyone here has been good enough to utilize the power of the graphic card to render their games. As far as I know, hardware acceleration in games (such as cs 1.6), is when the graphic card offloads the processing for the CPU. On the other hand, if the game is "software" processed, that means it's using only the CPU to process the graphics. This is what java does I think because we can see the CPU usage go to full when the scenario is doing too much. Now, if it really was using the graphic card to process, I would think that it would be much much faster, and cpu usage would be much lower. I think java does have hardware accerations, but I haven't seen anyone used it in the sense where they actually utilize the GPU's processing power. xD That's just my thoughts though. I'm surprised my game runs less laggy for you even though my game uses more "graphic intense" uh graphics? Lol. I try to get my game to be as efficient as possible. I'm not sure how fps works exactly in greenfoot, because of the act slider. I think, in order to see what FPS really is, one would have to unlimit the act speed by setting the bar to max. The only problem with that is that this might make the game too fast... Actually, I have no idea lol. because fps in games such as half-life and stuff, it's all rendered by the computer, but in these 2d games, it's a still frame... ? So, you can have like 60 fps, but the picture might just be a still pic.. I confused myself xD.
MTKMTK

2009/11/30

I thought that GreenfootImage uses java's BufferedImage and Graphics2D classes, and I thought that they use hardware acceleration where possible.
MTKMTK

2009/11/30

A 3D game is also a sequence of still images. FPS is how often the still image changes, in updates per second.
LilpowerdudeLilpowerdude

2009/11/30

BlackholeGF: do you mean you move into land when you hit a molecule? Did u punch or did you shoot? I understand why it floated up the land because it was a thing i programmed to prevent the player from getting stuck in the middle of the land in case anything abnormal happened
kenshinakhkenshinakh

2009/11/30

@mtk: Yeah, they do, but in most of the scenarios here, I haven't seen one that uses hardware acceleration to it's full potential (maybe b/c a lot of us are still students learning java ?). I thought 3D games are rendered in realtime (or in most cases, prerendered by double buffering). I guess you're right lol. I still haven't learned enough about games to fully understand how they work. I just knwo that games use a method of double buffereing to prerender frames so the game won't lag. Lilpowerdude: that glitch, is the glitch that happens when you get hurt by a monster, and it makes you pop up. While your person is being popped up, he seems to forget to check for whether there is ground above him.
MTKMTK

2009/11/30

2D games are also rendered in real time.
kenshinakhkenshinakh

2009/11/30

Yeah. lol my mistake.
Builderboy2005Builderboy2005

2009/11/30

kenshinakh I think you are mistaken about what double-buffering is. Double buffering does not prevent lag, it prevents flicker, and Greenfoot does implement it. Double buffering only means that what you make an adjustment to the image, you are not modifying the image that is on the screen, but a separate buffer that also contains a duplicate image. When the image you are drawing to is considered 'complete' (mostly done at the end of a frame or act cycle) the buffer is copied to the screen without any need to do any graphical calculations. This prevents flicker while images/objects are being modified between frames. You can see that greenfoot uses a version of double buffering, as changes to the actors positions are not seen until the act method is completed.
kenshinakhkenshinakh

2009/11/30

Again, my mistake xD.
LilpowerdudeLilpowerdude

2009/12/1

@MTK: do you see a plausible reason as to why my game really runs that slow? do u see a solution to the problem?
kenshinakhkenshinakh

2009/12/1

It's hard to tell unless we can look at the source code.
A new version of this scenario was uploaded on Tue Dec 01 05:49:08 UTC 2009
MTKMTK

2009/12/1

It's not possible unless you know how it works by looking at the source code. Maybe you are having too many actors, or are using some very inefficient algorithms.
MTKMTK

2009/12/1

Usually when I program, I try to go through the steps in my head and think if I can change anything to make it simpler for the computer to go through the steps, taking into account that some methods (maybe something like collision detecting methods in Greenfoot) probably use more computing power than others.
LilpowerdudeLilpowerdude

2009/12/1

Yea, my code is extremely inefficient Didn't learn to change my coding until halfway through the contest. Used a whole bunch of if else statements before I realized that I could use event scripts and ints. -.-
MTKMTK

2009/12/1

What are event scripts?
MTKMTK

2009/12/1

If/else statements I think are pretty easy on the computer.
kenshinakhkenshinakh

2009/12/1

Well, eventscripts are what I used in my game. Although they're a bit more advanced, they make things easier. (BTW, Lilpowerdude, you're not using eventscripts xD. I don't think you have the time to implement it because it would require you to change your entire coding style, not to mention trash a lot of the code you have right now.) Also, I have no idea if that's what they are called. It's just that I called my scripts "event scripts". They're just like, text commands in a text file that tells my program what to do. Like php scripts or just normal scripts. It's true that if/else statements are pretty easy on the computer. If you want us to help you, can post your source code. Even though it's a contest, if you have trouble with something, and you can't figure it out, it's more beneficial to post the source.
MTKMTK

2009/12/1

So an event script is a text file that the actors read that affects what they do?
kenshinakhkenshinakh

2009/12/1

Yup, well that's what mine does. It also runs my entire world and every level I have. That's how it's really easy for me to make the save/load game files, the animated menu. Also, it keeps my code clean and efficient because there's less actual code there (you'll see once i post my source code).
MTKMTK

2009/12/1

kensinkakh said "BTW, Lilpowerdude, you're not using eventscripts xD" How do you know, since there is no source code?
kenshinakhkenshinakh

2009/12/1

The game would be more efficient, and also, he goes to the same school as me, and I think he sits next to me in robotics class.... XD.
LilpowerdudeLilpowerdude

2009/12/2

Kenshinakh is my computer science mentor :P I learned a lot from him I have to admit, his java programming level is way beyond that of anyone else I've ever seen
A new version of this scenario was uploaded on Fri Dec 04 07:49:27 UTC 2009
A new version of this scenario was uploaded on Sat Dec 05 00:03:23 UTC 2009
A new version of this scenario was uploaded on Sat Dec 05 00:43:19 UTC 2009
A new version of this scenario was uploaded on Sun Dec 13 04:33:51 UTC 2009
LilpowerdudeLilpowerdude

2009/12/13

Hey guys, just wanna make sure that cloud part of the cleaning trash game is beatabl please let me know if it is still unbeatable xD some other bugs are fixed