Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Post What's on Your Mind

Juan J. Sánchez":1virnhuv said:
After several failed experiments, it seems as though Corona SDK isn't powerful enough to do realtime Gaussian blur. Heck, even my computer is lagging when I run the simulator.
I can't believe you even tried this...

I did some pretty crazy stuff with Corona SDK back when I had to use it for my first job. Per-pixel operations were impossible back then, even a ray-caster was incredibly slow (was effectively 1-dimensional per-pixel image op).
 
Xilef":nchafrke said:
Juan J. Sánchez":nchafrke said:
After several failed experiments, it seems as though Corona SDK isn't powerful enough to do realtime Gaussian blur. Heck, even my computer is lagging when I run the simulator.
I can't believe you even tried this...

I did some pretty crazy stuff with Corona SDK back when I had to use it for my first job. Per-pixel operations were impossible back then, even a ray-caster was incredibly slow (was effectively 1-dimensional per-pixel image op).
I tried it on an iPhone 5S running at 60 FPS and it would overload the memory after 2 or 3 seconds and terminate the app. I was actually surprised it lasted that long.
 
Right so in Java, everything is working fine, but watching the memory, it uses up all the free memory, GCs and lags for a fraction of a second, and then continues again with a bunch of space free. This is all ok, but the part that bothers me is that the total memory reserved goes up one megabyte each time, which means it will eventually run out of memory. I mean, sure, 1MB every 15 seconds isn't immediately game-breaking but it's enough to bother me.

It appears to be using ~30MB per second, running at 500-800fps.

Would this be caused by me declaring too many temporary variables, or would this be more likely a problem with my OpenGL calls? What are the primary causes of Java using memory like this? Do Object[] being created and set to null constantly cause this behaviour? What can I do to avoid this? ;_;

EDIT: alright so i think its my floatbuffer fuck im bad at this
EDIT2: yeah it was, it doesn't play well with the GC for some reason(?) so I have to create them and then only update from there.
EDIT3: oh hey and i managed to get ogg files to decode as well. im on a fukn roll today
 
I laid down on my stomach, propped up on my elbows, while going through my comic collection on the bottom shelf. Within 15mins I was shaking just from holding myself in that position. Like I was doing pushups or something. I used to sit on the floor like that all the time as a kid in front of the TV console. I dunno how I got so weak. I don't really have a reason to sit like that anymore since TVs sit higher up, and they're bigger, and in HD so you don't have to sit so close. Oh, and I suppose kids have tablets today, so they can lay in whatever position. Childhood obesity, amirite?
Acting like watching tv was strenuous, when my grandparents had to crank a pump for water

I'm pretty excited about my tablet. Should be in the mail today or tomorrow. I'm just afraid it'll collect dust in the corner. Do any of you have favorite "apps". Heh, I can't not say that un-ironically.
 
coyotecraft":3kund0w0 said:
Do any of you have favorite "apps". Heh, I can't not say that un-ironically.
I'm personally all apped-out.
When I first got my iPod 3rd gen, I abused the shit out of it, jailbreaking it and spending all of my time fiddling with it and used it for everything because I didn't have a laptop, but nowadays on my far far superior android phone apps are sorta there but I don't ever really go looking for them.

All I really use now is Facebook Messenger, Chrome, YouTube and Snapchat (rarely). I did used to play a bit of MOE Can Change but idk if you're that level of filthy weeb. :lol:
A qr reader is generally handy and QuizUp is a great time waster, but really if I ever have to waste time I'll use my Vita.

Oh shit, I forgot that you have a tablet specifically rather than a regular touch device.
I find that tricky, because I personally have no use for a tablet, but I'd imagine Plants vs Zombies would be pretty neat on there.
holy fuck this is all a lot of nothing, i should just zip it lmao
 
ZenVirZan":l39mdpup said:
Right so in Java, everything is working fine, but watching the memory, it uses up all the free memory, GCs and lags for a fraction of a second, and then continues again with a bunch of space free. This is all ok, but the part that bothers me is that the total memory reserved goes up one megabyte each time, which means it will eventually run out of memory. I mean, sure, 1MB every 15 seconds isn't immediately game-breaking but it's enough to bother me.

It appears to be using ~30MB per second, running at 500-800fps.

Would this be caused by me declaring too many temporary variables, or would this be more likely a problem with my OpenGL calls? What are the primary causes of Java using memory like this? Do Object[] being created and set to null constantly cause this behaviour? What can I do to avoid this? ;_;

EDIT: alright so i think its my floatbuffer fuck im bad at this
EDIT2: yeah it was, it doesn't play well with the GC for some reason(?) so I have to create them and then only update from there.
EDIT3: oh hey and i managed to get ogg files to decode as well. im on a fukn roll today
Declaring any object in Java and then immediately setting it to null does not free the memory, it will stick around for a while. Never declare temporary objects within the render-loop, only use raw ints and floats as temporary variables.

If you have an array, try to keep it fixed sized and declare it on object construction.

Try and reuse objects as much as possible. Modern OpenGL you should be using VBOs, so on the Java side you ideally should have a single float buffer with a capped size for how much vertex data you expect (I'd probably make two that are permanent, like a 100 vert buffer and a 200 vert buffer, then if you need a bigger one make a temporary that is destroyed ASAP. Should make things manageable). So when you want to upload vertex data it first goes into one of the staging buffers and then creates the VBOs, leaving the buffer free for whatever vertex data you want to upload next.

Try and reuse as much GL objects as you can. A 2D game is excellent because VAOs can be shared all over the place with UVs in custom VBOs or texture array index in materials. You can quite aggressively optimise a 2D OpenGL renderer.

If you don't have vertex-tight sprites (where the mesh tries to follow the empty space in the texture) then you should only have a small amount of vertex related objects.


A ::recycle() method for your classes so they get reused instead of being set to null is one way to avoid the GC lurching. This works for temporary objects best (move them into class body and recycle when needed). Things like temporary array Iterator objects can be moved into the class body.

Advanced Stuff:
Don't have your GL handles be tied to Java objects (so no glCreate in constructor with glDelete somewhere); Java practically has no destructor system (the one they have should be used for closing operations rather than further cleaning up objects, avoid it).

The GL object lifetime should be part of the renderer so they can be recycled and reused without worrying about objects destroying or creating them. So you'd have myRenderer.requestTexture( "texture.png" ) which gets an existing texture handle or finds one that is recyclable (same resolution) and reuses that.

And the renderer would have it's own object clean-up system going on. So every now and then, when not much is happening (level starts/ends, player saves game or opens menu) the renderer would go ahead and clean up the GL objects to get back some GPU memory. Relying on Java's GC to do this is not good.

Future Stuff:
Amazingly, you haven't hit the big problem with Java yet when it comes to games. When your tech gets very big everything will start to slow down with each Java class you write. Java's key flaw is that the more classes you have, the slower it gets. The fastest Java code has very few classes and is more akin to component based programming. Consider this if you're having object types differentiated by their classes (eg; SquareObject and SpriteObject being children of GameObject, it's actually better to have them both be GameObject with an enumerated int defining if it's a square or sprite type)
 
 
The gear box was jammed. The coin slot only takes American money.
It's 50 cents, not 50 pence.

What am I going suppose to do with all these wonky shaped coins?
 
Playing with my new tablet~
The screen feels a little weird. And you have to hold it straight. Tilting it up even sightly makes the screen look faded.

And holding it vertical is worst because it looks light in one eye and dark in the other.
 
Sounds normal for a cheap tablet. How much did you pay for it?

In terms of apps, if you have an NVidia GPU in a PC then Moonlight Game Streaming is amazing. YouTube is very good on tablet in my opinion - Netflix and Crunchyroll are very good if you have accounts with them.
Local delivery (take-aways) apps on tablet tend to get used, so get some of those if there are local places around you that you eat from.
Get your social media accounts all added so you can do idle browsing on the tablet whilst you watch TV or something.
If you have iTunes then get Retune, that is a good iTunes remote control app.


Can't really recommend games because that's based on what you like.

More than anything you want your tablet computer to supplement your lifestyle, if you treat it as a separate toy in your life then you're not going to get good usage out of it, so more than anything you want apps that connect to stuff you already have and apps that involve the world around you.


EDIT: Getting my iPad connecting to my network'd drives so I could watch all the videos on my various machines was one of the best things I did on the iPad, haven't done it for my Android devices so maybe do something like that if you have a load of videos on your PCs? I'd do things like put on an episode of pokemon whilst I cooked dinner or similar.
 
 

I meant to do that forever ago. But these things slip by. I thought about putting the BG tag in my SIG so I can say this place wouldn't run without me.
I is kind. I is smart. I is important.

cogs_zpsvsehutdd.gif

I tried to keep the file size small. Ofcourse the swf I made it from is a lot smoother and only 2kb. I can send you the files if you want. Recreating the cogs (I made 1 cog that only moves 1 notch) as vector symbols was a little time consuming and they're not identical to the original banner but close enough.
Edit: I kept seeing a slight jerk. Sometimes I could see it, sometimes I wouldn't. But it was bugging me so I made a slight tweek. It's now smoother, and a few kb smaller.

Also, I noticed the front page has a lot of button graphics. I wanted to make the sidebar an imagemap so it loads as 1 image and not 30. But I guess mobile devices don't play well with imagemaps.
Those blue and orange buttons could be loaded as just 2 images, with text on top. Maybe with a rollover glow. I think I can do it, although my CSS is a little rusty. Touch devices just made everything more complicated.
 
I swear, if I focus, I can see a slight jerk where it loops. Once I catch it, it's like a pulse.
Idk, it might be the browser playback, it should be seamless.

hmmm, it like it gets worst the longer it plays until I refresh it. Maybe there's something wrong with my timing.
 
I can see the stutter as well. About every second and a bit?
How were you tweening it? You need to make sure you make the last frame the frame before the first (In other words, to the tween as normal, but keyframe the second to last and remove the last)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top