Programming General

Oct 7, 2015 at 2:40 AM
Senior Member
"Huzzah!"
Join Date: Aug 24, 2013
Location: 0xDEADBEEF
Posts: 211
Which reminds me, when I sent you the networking example server/client, there had been a problem with the port-forwarding since my laptop had changed its port by a bit. The ports were only port-forwarded to specific ip addresses.
Ah, makes sense.
You can implement hole punching into your games as well (so that players don't have to port forward). I haven't set it up fully and I might be missing something, but here's how it goes:
M = Master server with public IP | S = player-hosted server behind firewall | C = client behind firewall
All three must use the same port number, so if M is public on port 7777 (for example), then S and C will talk on 7777
-This is so that the port that M grabs is the proper public port (routers have Port Address Translation, so the port it grabs won't be 7777, it'll be something else made by the router, but everything is still connected and routed properly)

When S is created, S talks to M, which stores the IP address and port that it gets
C wants to connect to S, so it talks to M for S's IP and port
M sends C IP and port of S
C connects/sends data (depending on TCP vs UDP) to S
M is no longer needed until another S is made or another C wants to connect
The only connections that would exist (only if you're using TCP) would be between C and S, so M is not connected to anything, it just uses UDP
 
Oct 7, 2015 at 3:12 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
Coming soon: screenshots for Cave Story.
 
Oct 7, 2015 at 3:39 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
p207808-0-printscreenbuttonkeyboard.jpg


You're too late already QQQHardcoreGamerMLGQQQ, because I, the great and powerful Noxid, have already invented a dazzling technique to extract screenshots from ALL pc versions of cave story. And furthermore, my method is so advanced and so streamlined that you don't even need to download a single file to use it.
simply navigate your Inquisition Digit to the key on your alphabet-grid labelled "prt scrn" or some variant thereof (I've already taken the liberty of installing it for you, you can thank me later). Press upon it and it will invoke my secret hacker subroutines to pixel-scrape your viewport and download the upload to your copy-buffer. Now you can paste this directly into the premier graphics editing software of your choice, such as MS Paint or Microsoft Word.
 
Last edited:
Oct 15, 2015 at 12:29 PM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
Some people might not have such a key. EDIT: OrgView already had code for loading external ORGs too.
 
Oct 15, 2015 at 12:37 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 15, 2015
Location: 0xDEADBEEF
Posts: 111
Some people might not have such a key. EDIT: OrgView already had code for loading external ORGs too.
Unless you've got a linux hyperminimalistic chromebook, you should have that key. On laptops it might require pressing Fn to access it from under function keys.
 
Oct 15, 2015 at 12:42 PM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
Unless you've got a linux hyperminimalistic chromebook, you should have that key. On laptops it might require pressing Fn to access it from under function keys.
Yep. The code I used outputs a .bmp file, so it's better than print screen. Currently I overwrote the code for saving the game to call it though...
 
Oct 15, 2015 at 12:46 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 15, 2015
Location: 0xDEADBEEF
Posts: 111
There's also the fact that you can spam an in-game screenshot, but print screen requires having to pause (In some cases impossible) and paste it in a paint program before another one may be taken. Somebody probably has already made an autohotkey script to do this automatically.
 
Oct 15, 2015 at 5:49 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
Yep. The code I used outputs a .bmp file, so it's better than print screen.

This alone doesn't really make it better than printscreen, since you can save the results of a printscreen to a bmp anyways. And shouldn't you be saving it as a .png, if you can? BMPs are kind of huge/redundant in filesize.

But what Raus said would be a good argument for an ingame button, if someone needed mass screenshots. Granted, there are external solutions that already provided by others for free that do this (see screenshoter), so I'm not sure how an ingame screenshot feature would be better than these.
 
Oct 15, 2015 at 5:53 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 845
Age: 22
There's also the fact that you can spam an in-game screenshot, but print screen requires having to pause (In some cases impossible) and paste it in a paint program before another one may be taken. Somebody probably has already made an autohotkey script to do this automatically.
Actually, if your on windows 8 (haven't tried with 7), then you can hold the windows button along with pressing print screen rapidly, which will make it create a file, then it automaticly outputs said file to a folder in the Pictures directory called Screenshots.
Edit: It pauses the computer and makes the screen darken a bit so there will be a smooth way to let the computer create the file.
 
Last edited:
Oct 15, 2015 at 9:42 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 15, 2015
Location: 0xDEADBEEF
Posts: 111
Actually, if your on windows 8 (haven't tried with 7), then you can hold the windows button along with pressing print screen rapidly, which will make it create a file, then it automaticly outputs said file to a folder in the Pictures directory called Screenshots.
Edit: It pauses the computer and makes the screen darken a bit so there will be a smooth way to let the computer create the file.
Confirmed to not work on Windows 7.


Someone could also just add Cave Story as a non-Steam game to their Steam library, and spam F12; as doing so puts Steam's GUI overlay when launched from Steam.


Another reason for an in-game screenshot button would be to selectively decide what in-game objects and gui elements to include in the screenshot, or add text overlays of sorts onto the generated screenshot.
 
Oct 16, 2015 at 3:25 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
And shouldn't you be saving it as a .png, if you can? BMPs are kind of huge/redundant in filesize.
I don't think that's worth the effort.

I thought people might enjoy this, and I was going to do something with it. Now I regret mentioning it.
 
Oct 16, 2015 at 3:30 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
I just don't see a lot of utility behind this idea
 
Oct 16, 2015 at 3:39 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 15, 2015
Location: 0xDEADBEEF
Posts: 111
I don't think that's worth the effort.

I thought people might enjoy this, and I was going to do something with it. Now I regret mentioning it.
Irregardless of what anyone says or how useful it can be, it's pretty cool!
 
Oct 16, 2015 at 3:47 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
I don't think that's worth the effort.

Well similarily I don't think it's worth the effort to make the screenshot key in the first place, given that's there's a plethora of tools that already do the job.

I'm sure some people will enjoy it, but I don't see many people making much meaningful use out of it.
 
Oct 16, 2015 at 3:54 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
What I was thinking of doing was taking a screenshot when you save (possibly displaying the map name), and showing that on the title screen.
No-one asked why, so I didn't say earlier. I just got people questioning the merit of in-game screenshot functionality.

I want to see more projects people are working on here. @Noxid, are you working on anything?
 
Oct 16, 2015 at 3:58 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 15, 2015
Location: 0xDEADBEEF
Posts: 111
What I was thinking of doing was taking a screenshot when you save (possibly displaying the map name), and showing that on the title screen.
No-one asked why, so I didn't say earlier. I just got people questioning the merit of in-game screenshot functionality.
Another reason for an in-game screenshot button would be to selectively decide what in-game objects and gui elements to include in the screenshot, or add text overlays of sorts onto the generated screenshot.
 
Oct 16, 2015 at 3:59 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
What I was thinking of doing was taking a screenshot when you save (possibly displaying the map name), and showing that on the title screen.
No-one asked why, so I didn't say earlier. I just got people questioning the merit of in-game screenshot functionality.

If you're going that far then IMO you should probably just start making your own game engine, since it'll make things easier in the long run. That is, if this is for personal use.
 
Oct 16, 2015 at 4:01 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
I've been thinking of making an engine for running Cave Story in Java, but I'm still learning how Cave Story works for now.

I don't have any plans for making a Cave Story mod with a story, so anything I make I hope is useful for other people.
 
Oct 16, 2015 at 4:06 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
One thing I've been doing recently (in Java, incidentally) is working on shaders for the Tess engine. Here's a proof of concept (and very simple) circle based light:

p208231-0-tumblrnw6zj4fnja1rjfwgto1400.gif


Next I want to make a light that properly casts shadows, which is a bit more involved (mostly just line intersection calculations, should be fairly straight forward stuff).
 
Top