• Most people probably don't realise this, but this forum has had two editors for a number of years. One is the xenForo default editor, and the other is a custom editor I made years back I called BBCEd.

    All the settings for which editor you use was lost during the upgrade. You can find the setting under Account Settings > Preferences > Editor.

Programming General

Old topic!
The last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.
Oct 7, 2015 at 2:40 AM
Senior Member
"Huzzah!"
Join Date: Aug 24, 2013
Location: 0xDEADBEEF
Posts: 209
#41
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
#42
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: 6003
#43


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
#44
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
Age: 20
#45
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
#46
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
Age: 20
#47
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: 3714
Age: 27
#48
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: Earth
Posts: 857
Age: 18
#49
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
Age: 20
#50
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
#51
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: 6003
#52
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
Age: 20
#53
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: 3714
Age: 27
#55
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
#56
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
Age: 20
#57
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: 3714
Age: 27
#58
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
#59
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: 3714
Age: 27
#60
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:



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