PDA

View Full Version : Simple program suggestions?


Lex
12 Oct 2006, 17:07
I'm learning C++ right now and I'm interested in making a useful program for WA, but I'm really not sure what it should be. If you guys could pour some ideas out which you might have bottled up inside, that would be lovely.

I can't really make anything too complex yet, but I will try my best to learn what is needed for a simple program I'm interested in making, including Windows GUI programming, etc. Don't hold back on ideas, even if you have something complex, though, because it may turn out that other programmers around here could get inspired by them too.

Thanks!

bonz
12 Oct 2006, 18:29
A tool that after exiting W:A automatically (zip) compresses replay files, then deletes them.
If a compressed archive already exists, the files get added to it.
The location could be customizable.

M3ntal
12 Oct 2006, 18:35
Alex, how about a replay search utility? You could keep it simple by just using the filenames to get the info needed rather than having to read the replay file format itself, although if you want to try doing it the second way that'd own even more.

MrLee made something similar as a hypertext application a while back, but it was slooooow. I reckon a native Win32 binary would be much quicker ;).

I'll happily discuss searching/sorting algorithms with you some time if you need.

Run
12 Oct 2006, 18:39
One thing that's always annoyed me is if you're searching for a comment in the chat logs of your replays, you have to extract them all manually one by one (if you select multiple replays they extract simultaneously and lag the computer to a standstill). How about a program that extracts logs automatically, but one by one so you can still use the computer for other tasks?

bonz
12 Oct 2006, 18:43
Hasn't DC planned to include a replay search function?

Run's idea sounds the most simple to me.

CyberShadow
12 Oct 2006, 18:51
A tool that after exiting W:A automatically (zip) compresses replay files, then deletes them.
If a compressed archive already exists, the files get added to it.
The location could be customizable.

If you're using NTFS, you could just enable compression on your User\Games folder if this idea is about saving space.

Lex
12 Oct 2006, 19:00
One thing that's always annoyed me is if you're searching for a comment in the chat logs of your replays, you have to extract them all manually one by one (if you select multiple replays they extract simultaneously and lag the computer to a standstill). How about a program that extracts logs automatically, but one by one so you can still use the computer for other tasks?That's mostly a good idea. However, what would be better is something that would search the game text in all the replays in a directory and return the file name(s) of the replay(s) in which your search result(s) (is/are) contained.

Run
12 Oct 2006, 22:23
Well, it would be more convenient if it actually extracted the replay(s) at the end, otherwise it's just pointing at the replay(s) which isn't very good if you want to get at the text inside it/them. ;)

Mablak
13 Oct 2006, 05:09
Well for the novice programmer, worms roping AI?

mr_awesome
13 Oct 2006, 05:58
How bout a program that you input a shedule in and it deletes the replays in your Games folder every week or what ever you put that schedule to be?

adamrigdon
13 Oct 2006, 07:38
How bout a program that you input a shedule in and it deletes the replays in your Games folder every week or what ever you put that schedule to be?

you could do that with a simple batch file and set it up as a scheduled task.

franpa
13 Oct 2006, 11:32
can you give us an example for us to modify to our needs adam?

adamrigdon
13 Oct 2006, 11:40
fire up notepad and type "del *.WAgame"
minus the quotes of course
save it as replaycleanup.bat in your /user/games directory
you can name it whatever you'd like, but the .bat is important.

then fire up your scheduled tasks thingamabooby and create a new skedguld task, point it to that .bat file and tell it to run however you like, daily, weekly, hourly... etc

that should all be it

mr_awesome
13 Oct 2006, 11:48
Awesome. I'm gonna try that.

franpa
13 Oct 2006, 12:02
can we have a bat file that will delete delete files which are older then a specified time prior to the current date? or can we only just delete them?

evilworm2
13 Oct 2006, 14:32
can we have a bat file that will delete delete files which are older then a specified time prior to the current date? or can we only just delete them?
This one will delete all files older than the specified number of minutes:


:: ---------------EXAMPLE.BAT-----------------
@ECHO OFF
:: ------------
:: This is where you set the number
:: of minutes you want subtracted
:: from the current date/time.
:: ------------
SET MyMins=1440


:: ------------
:: Get current date/time
:: ------------
FOR /F "TOKENS=2-4 DELIMS=/ " %%F IN ('DATE /T') DO (
SET YYYY=%%H
SET MM=%%F
SET DD=%%G
)
FOR /F "TOKENS=5-6 DELIMS=: " %%F IN ('ECHO.^|TIME') DO (
SET HR=%%F
SET MN=%%G
)

IF %DD% LSS 10 (SET DD=%DD:~1%)
IF %MM% LSS 10 (SET MM=%MM:~1%)
IF %HR% LSS 10 (SET HR=%HR:~1%)
IF %MN% LSS 10 (SET MN=%MN:~1%)

: ------------
:: Subtract minutes from current time.
:: ------------
SET /A MN=%MN% - %MyMins%

:: ------------
:: Do the massively painful
:: reverse calculations.. :(
:: ------------
:LoopMins
IF /I %MN% GEQ 0 (GOTO LoopHrs)
SET /A MN=%MN% + 60
SET /A HR=%HR% - 1
GOTO LoopMins
:LoopHrs
IF /I %HR% GTR 0 (GOTO LoopDate)
SET /A HR=%HR% + 23
SET /A DD=%DD% - 1
GOTO LoopHrs
:LoopDate
IF /I %DD% GTR 0 (GOTO DONE)
set /A mm=%mm% - 1
if /I %mm% GTR 0 goto ADJUSTDAY
set /A mm=12
set /A yyyy=%yyyy% - 1
:ADJUSTDAY
if %mm%==1 goto SET31
if %mm%==2 goto LEAPCHK
if %mm%==3 goto SET31
if %mm%==4 goto SET30
if %mm%==5 goto SET31
if %mm%==6 goto SET30
if %mm%==7 goto SET31
if %mm%==8 goto SET31
if %mm%==9 goto SET30
if %mm%==10 goto SET31
if %mm%==11 goto SET30
if %mm%==12 goto SET31
goto ERROR
:SET31
set /A dd=31 + %dd%
goto LoopDate
:SET30
set /A dd=30 + %dd%
goto LoopDate
:LEAPCHK
set /A tt=%yyyy% %% 4
if not %tt%==0 goto SET28
set /A tt=%yyyy% %% 100
if not %tt%==0 goto SET29
set /A tt=%yyyy% %% 400
if %tt%==0 goto SET29
:SET28
set /A dd=28 + %dd%
goto LoopDate
:SET29
set /A dd=29 + %dd%
goto LoopDate
:DONE
IF %dd% LSS 10 set dd=0%dd%
IF %mm% LSS 10 set mm=0%mm%
IF %HR% LSS 10 SET HR=0%HR%
IF %MN% LSS 10 SET MN=0%MN%


for %%i in (*.*) do (
set FileName=%%i
SET FTIME=%%~ti
CALL :PROCESSFILE
)

set mm=
set yyyy=
set dd=
set thedate=
goto :EOF

:PROCESSFILE
set fyyyy=%FTIME:~6,4%
set fmm=%FTIME:~0,2%
set fdd=%FTIME:~3,2%
SET fhr=%FTIME:~11,2%
SET fmn=%FTIME:~14,2%

if /I %fyyyy% GTR 2069 set fyyyy=19%FTIME:~6,2%

:: --------
:: Deal with File times
:: reported as AM/PM vs.
:: calculated times as 24hr.
:: --------
IF /I "%FTIME:~17,1%" == "P" (
IF %fhr% LSS 10 (
SET /A fhr=%fhr:~1,1% + 12
) ELSE (
IF %fhr% LEQ 11 (
SET /A fhr=%fhr% + 12
)
)
)
IF /I "%FTIME:~17,1%" == "A" (
IF %fhr%==12 (
SET fhr=00
)
)

:: +*************************************+
:: | This is where the files are deleted |
:: | Change the ECHO command to DEL to |
:: | delete. ECHO is used for test. |
:: +*************************************+
if /I %yyyy%%mm%%dd% GEQ %fyyyy%%fmm%%fdd% (
IF /I 1%hr%%mn% GEQ 1%fhr%%fmn% (

ECHO %FileName%

)
)
ECHO Calcdate=%yyyy%%mm%%dd%%hr%%mn%

set temp=
set fyyyy=
set fmm=
set fdd=

:EXIT
:: ----------END-EXAMPLE.BAT-------------



Found this after a 1 min. Google search.
I didn't test it, so don't blame me if it deletes all your files. ;)

robowurmz
13 Oct 2006, 17:47
I have an idea.

How about a W:A screensaver?

Anyone who had or still has "Inner Space" (the coolest spaceship game in the universe) will know all about the Inner Space screensaver.

It did real battles and you could actually join in.

bonz
13 Oct 2006, 18:35
I have an idea.
How about a W:A screensaver?
There actually IS an official W:A screensaver (http://www.dream17.co.uk/softography.php?id=56&s=downloads).

Vader
13 Oct 2006, 20:28
How about a skinning app?

We all know we can modify the frontend, right? Why not give us an app which backs up our current frontend, shows us our changes on the fly and saves them into the correct directories?

You could even implement a save file. The user would be able to save their configuration in a unique folder and distribute it. Then, people who receive the skin can run the save file from the unique folder, it would back up their current frontend and apply the new one.

Sounds complicated now that I've said it ;)

M3ntal
13 Oct 2006, 20:37
Ouch at the size of that batch file, evilworm2.

bonz
13 Oct 2006, 20:43
How about a skinning app?

We all know we can modify the frontend, right? Why not give us an app which backs up our current frontend, shows us our changes on the fly and saves them into the correct directories?

You could even implement a save file. The user would be able to save their configuration in a unique folder and distribute it. Then, people who receive the skin can run the save file from the unique folder, it would back up their current frontend and apply the new one.

Sounds complicated now that I've said it ;)
You could also make a download feature where the user can download all existing skins and upload his own creations to some webspace.

Vader
13 Oct 2006, 21:08
You could also make a download feature where the user can download all existing skins and upload his own creations to some webspace.

You could make thise for schemes, instead. A central database of game schemes, ratings, popularity, usage stats, all accessible via your software.

evilworm2
13 Oct 2006, 21:35
Ouch at the size of that batch file, evilworm2.

Since this wasn't complicated enough, i decided to make this:
(First preview screenshot (It doesn't even have a version number... lol))

Alien King
13 Oct 2006, 21:38
A better sprite editor. One that works properly with the newer sprite packs included in the patches and works better than Fudgeboy's.

Syc0
13 Oct 2006, 22:18
How about a program that allows you to log wins/losses and continously updates the file that changes what your w:a ranking is? It would be manual ranks.. although people would just be stupid and set themselves to 3 stars right away..

bonz
13 Oct 2006, 22:42
Since this wasn't complicated enough, i decided to make this:
(First preview screenshot (It doesn't even have a version number... lol))
HAHA! Very nice picture!

I suppose it is a (quite fierce) Caecilian (http://en.wikipedia.org/wiki/Caecilian).
Because they live underground and eat mostly worms. :D
http://en.wikipedia.org/wiki/Image:Caecilian.jpg
http://members.aol.com/jstgerlach/caecilian.jpg
http://www.sandiegozoo.org/animalbytes/images/caecilian_hold_inset.jpg
http://www.arkive.org/media/E2EF6821-D7E9-4B35-BC33-56370EF311BD/Presentation.Large/%09%09%09%09%09%09%09%09%09%09large-Aleku-caecilian-head-detail.jpg

mr_awesome
14 Oct 2006, 02:11
fire up notepad and type "del *.WAgame"
minus the quotes of course
save it as replaycleanup.bat in your /user/games directory
you can name it whatever you'd like, but the .bat is important.

then fire up your scheduled tasks thingamabooby and create a new skedguld task, point it to that .bat file and tell it to run however you like, daily, weekly, hourly... etc

that should all be it

I did this and it works perfectly. Except I had some trouble setting the scheduled task because it said something like I didn't have permission even though I'm the only user on this computer. But I just made a shortcut to the batch file on quick-launch.

franpa
14 Oct 2006, 02:37
store a shortcut in your startup folder on your startmenu if you want aswell... ill attamp to use that code you listed evil worms...

mr_awesome
14 Oct 2006, 02:44
If I stick it in startup does that mean it will run whenever I start up the computer?

franpa
14 Oct 2006, 02:51
yep. `

Etho
14 Oct 2006, 02:53
Make a Water.dir and Level.dir compiler and then send them to me ASAP. :)

Etinin
14 Oct 2006, 17:38
Make a Water.dir and Level.dir compiler and then send them to me ASAP. :)

I guess he said WA not WWP :rolleyes:

Evil Bunny
14 Oct 2006, 17:49
How about a skinning app?...

Sounds complicated now that I've said it ;)

Lol, for those 3 w:a skinns? They are pretty poor (no offence to the maker ment) though. Making one of those skinns is a PAIN. Trust me i've tried. At this moment there is no reasonably decent way to make W:A skinns. If any tool should be developed it's one for making skinns rather then managing them.

The whole W:A skinning thing is still nagging at me. I've tried before and found the huge amount of palettes too much of a pain to do it. But i've more recently taken a look at Photoshop scripting and i believe it COULD be done with that. I'm surtainly going to give it a try when i get my comp sorted.

But trust me, skinning WA is very tricky. Each page has it's own palette. But parts of the palette need to be constant because of repeating images such as the mouse and background. Also surtain colours are prefixed, like the borders and border highlights. As well as colours on wnet. Added to that; there is a HUGE amount of images to consider. Especially the weapon and scheme editor.Not to mention that some palettes can't be fully used because colours used to display colour maps use them. You are either stuck to the palettes WA provides, which really isn't an option for any kind of self-respecting skinn. Or you have to dig your way trough all that pain and come up with a way to build palettes based on partial palettes.

Discouraged enough by now? Lol, well I've never given up on the idea of skinning wa. Hmm, same goes for redesigning worms and it's gezillion sprites.

Jerry
14 Oct 2006, 18:09
Nice program man ;) when you finished this program?
btw: Im programist in Visual Basic ;)

Alien King
15 Oct 2006, 01:06
Lol, for those 3 w:a skinns? They are pretty poor (no offence to the maker ment) though. Making one of those skinns is a PAIN. Trust me i've tried. At this moment there is no reasonably decent way to make W:A skinns. If any tool should be developed it's one for making skinns rather then managing them.

The whole W:A skinning thing is still nagging at me. I've tried before and found the huge amount of palettes too much of a pain to do it. But i've more recently taken a look at Photoshop scripting and i believe it COULD be done with that. I'm surtainly going to give it a try when i get my comp sorted.

But trust me, skinning WA is very tricky. Each page has it's own palette. But parts of the palette need to be constant because of repeating images such as the mouse and background. Also surtain colours are prefixed, like the borders and border highlights. As well as colours on wnet. Added to that; there is a HUGE amount of images to consider. Especially the weapon and scheme editor.Not to mention that some palettes can't be fully used because colours used to display colour maps use them. You are either stuck to the palettes WA provides, which really isn't an option for any kind of self-respecting skinn. Or you have to dig your way trough all that pain and come up with a way to build palettes based on partial palettes.

Discouraged enough by now? Lol, well I've never given up on the idea of skinning wa. Hmm, same goes for redesigning worms and it's gezillion sprites.

It would probably be better until W:A get's the 32bit treatment.

Lex
16 Oct 2006, 10:21
Thanks for the suggestions, guys! Evilworm2 seems to have taken a suggestion and made something from it already, so this is already a productive thread. :)

Some of the suggestions given are already being worked on or in the plans by the WA developers, so I really don't want to make a dirty (and newbish) temporary program which has the same functionality as their future features. With the new WA frontend, skinning WA how you mean will be completely obsolete, which would obsolete my program. I'd rather not make a program just to be obsoleted. Forks (and fork-like things, or whatever) are not nice, except the eating utensils. . . ;D

I've been playing SNES games (:)) and helping my brother with his PC hardware problem(s) (:() for the past few days instead of programming. :o I'll get to work when I feel like it. My work-to-play ratio is a little unbalanced, to be honest. . . I need to fix that. It'll happen some day.

/me slacks off for a couple more days.

Vader
16 Oct 2006, 12:43
I'd rather not make a program just to be obsoleted.

It could be another 6 months before your programme is obsolete. Furthermore, you said this was just for practise, so get practising!

evilworm2
16 Oct 2006, 12:46
It could be another 6 months before your programme is obsolete. Furthermore, you said this was just for practise, so get practising!

Vader is sooo right.

Plasma
16 Oct 2006, 23:32
*message removed, for lex*

Lex
17 Oct 2006, 12:33
Plasma, stop attempting to ruin the air of positivity in this thread. It's not your right. Vader was right in what he said, and I agree with him. He is allowed to influnce me however he wants. Just bugger off with your negative comments and rash interpretations, please.

By the way, this thread isn't "done" yet, just because there are people posting off the topic! The topic hasn't changed! If you still have ideas, keep posting them! :) Don't be discouraged.

Edit: Thanks Plasma. :)

Vader
17 Oct 2006, 19:19
Awww, I didn't even get to read what Plasma said! :(

Well, it is irrelevant because Lex has taken my post the way I intended. I wish to encourage him to do it for the sake of doing it, not necessarily with a permenant goal in sight.

Hell, I made my website just for the sake of learning XHTML and CSS. It's probably not visited very often but I know feel confident using XHTML and CSS. Sure, my site is far from perfect; sure, it serves little purpose. The point is my subsequent sites will get built that bit faster.

Lex, man, get cracking! :)

How about you make an app which automatically finds your external IP and pastes it into the IP box in the WormNET configuration? It would save me a lot of frustration. ;)

DragonQ
18 Oct 2006, 15:48
I do not know enough about Worms Armageddon to paste an IP Address into the game, but I have a made a little program that will copy your IP Address to the clipboard instantly upon running it, which is more useful IMO since you can paste the IP Address into WLM, AIM etc. to tell your friends what your IP Address is. However, I've also made a version that runs WA immediately after copying is complete (UPDATED VERSION 2)

IP Address Copier (copies your IP Address to the clipboard)

Download HERE! (http://dragonq.pwp.blueyonder.co.uk/IP Address Copier.exe)


Worms Armageddon IP Address Copier (loads Worms Armageddon after copying your IP Address to the clipboard)

Download HERE! (http://dragonq.pwp.blueyonder.co.uk/Worms Armageddon IP Address Copier.exe)



(NOTE: Both versions require the Microsoft .NET Framework 1.1 SP1 - available through Microsoft Update or HERE (http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en))

AndrewTaylor
18 Oct 2006, 15:54
You could always put that in a batch file with W:A, too.

DragonQ
18 Oct 2006, 16:07
Screw batch files, I'd just run WA after the copying through VB.NET. Could be two versions of the program - one that just copies, and one that launches WA afterwards. Could be my "project of the day" lol.

bonz
18 Oct 2006, 16:42
I use the www.no-ip.info service with their dynamic update client (which auto-starts).
Makes dynamic my IP address to a nice "globefish.no-ip.info" address which I have force in W:A's options and which I use in all other applications.

DragonQ
18 Oct 2006, 17:31
OK, both versions now work fine on at least 2 PCs. I would be grateful if people could test these programs for me, while obviously using them as assistant tools, as they are meant to be.

The download links are in the above post - they are 13KB each (i.e. 3 seconds over 56Kbps ;) so no excuse not to try it lol)

bonz
18 Oct 2006, 17:59
The download links are in the above post - they are 13KB each (i.e. 3 seconds over 56Kbps ;) so no excuse not to try it lol)
Hmmm...
Links to .exe files.
"Only" 13KB in size.
Someone encouraging me to download.
:-/

Why not zip compress them and attach them here on the forum? :rolleyes:

CyberShadow
18 Oct 2006, 18:20
"Only" 13KB in size.

.NET executables are small because they only hold the code which the programmer has written. Regular 32-bit EXEs are much larger because they need to hold that language's runtime libraries (standard functions like printf, etc.) which, for .NET, is distributed with the .NET framework and reused for all .NET applications (CLR - Common Language Runtime).

Vader
18 Oct 2006, 18:35
Stuff
The point is; can Lex do it? Has Lex done it? Would it provide good practise for him?

Let's not lose sight of why this thread is here!

DragonQ
18 Oct 2006, 19:05
Lol, I'm sure he could make one with a little research, but I haven't made any programs in ages, so thought I'd try it.

Why would I zip such a small file and attach it when I can put it on my webspace without fear of ever having to delete it to save space? I guarantee it's virus-free if that's what your worry is. Do I look computer-incompetent by the way I type and the fact that I can CODE lol?

bonz
18 Oct 2006, 21:38
Why would I zip such a small file and attach it when I can put it on my webspace without fear of ever having to delete it to save space? I guarantee it's virus-free if that's what your worry is. Do I look computer-incompetent by the way I type and the fact that I can CODE lol?
I should have better denoted my sarcasm. :)

BTW, I have uploaded 78 attachment with a cummulative size of 1.83 MB over the last 3 years.

DragonQ
19 Oct 2006, 11:42
lol....


Saracasm is the ONE thing that the Internet still can't translate properly ;)

But as I said, feedback would be good. If you downloaded the first version(s), please get the ones that are there now (the post now says Version 2 on it) - I made the messages brighter and better basically. Any suggestions or problems? Let me know!

Thank you!

bloopy
20 Oct 2006, 11:27
Suggestion: a program that makes hosting on W:A easier by taking advantage of plug & play router capabilities.

CyberShadow
20 Oct 2006, 14:37
Suggestion: a program that makes hosting on W:A easier by taking advantage of plug & play router capabilities.

I'm not sure UPnP allows you to choose the port - don't they open a random port and then tell you which port they forwarded?

bloopy
20 Oct 2006, 14:58
I'm pretty sure it lets you choose the port, as Worms 4: Mayhem is able to use UPnP, and I didn't think that game can work on just any port.

robowurmz
20 Oct 2006, 14:58
I have an idea for a program!
A program that basically does what www.no-ip.com does.

Seita
20 Oct 2006, 15:14
I have an idea for a program!
A program that basically does what www.no-ip.com does.

There you go !

http://download.yousendit.com/29C9D4C2322E0EDD

bloopy
21 Oct 2006, 17:35
That's mostly a good idea. However, what would be better is something that would search the game text in all the replays in a directory and return the file name(s) of the replay(s) in which your search result(s) (is/are) contained.

I might actually do something like that in my WAgame.chat program. I need to update it anyway because it's got a bug where sometimes it doesn't find all the player names. :cool:

Alien King
22 Oct 2006, 02:12
http://forum.team17.co.uk/showpost.php?p=537538&postcount=24

Penguins
22 Oct 2006, 15:22
There actually IS an official W:A screensaver (http://www.dream17.co.uk/softography.php?id=56&s=downloads).

Is that the latest patch for WA? If it is those graphics are really good! I'm getting the game in 2-4 days :D

Run
22 Oct 2006, 15:25
Is that the latest patch for WA? If it is those graphics are really good! I'm getting the game in 2-4 days :D

The graphics for WA haven't changed since it came out.

bonz
22 Oct 2006, 15:27
Is that the latest patch for WA? If it is those graphics are really good! I'm getting the game in 2-4 days :D
No, that is the official W:A screensaver that came in the Armageddon collection together with W:A & Worms Pinball.
Two AI teams are playing on a handful of maps.

Check here to see Bloopy's new W:A screensaver (http://forum.team17.co.uk/showthread.php?t=30525) which does a similar thing, only that it plays replays of the games you have played.

Evil Bunny
22 Oct 2006, 18:23
The graphics for WA haven't changed since it came out.

Well, not many anyway, the launchers of the zook/homing/pidgeon/mortar changed.

Run
22 Oct 2006, 18:36
Well, not many anyway, the launchers of the zook/homing/pidgeon/mortar changed.

One word: Pshaw.

evilworm2
22 Oct 2006, 19:28
One word: Pshaw.

pshaw - Used to indicate impatience, irritation, disapproval, or disbelief.

ôô

Run
22 Oct 2006, 20:03
Or contempt! Which is perhaps the closest and most appropriate definition to my usage.

mr_awesome
23 Oct 2006, 07:25
Doesn't Stimpy say it to Ren sometimes?

Lex
24 Oct 2006, 03:00
I've been madly rifling through SNES emulation stuff recently (in the past week), so I haven't been doing much here, but it certainly is giving me some experience. For example, today, I learned all about SVN (Subversion) and how that works. :) I'm trying to get ZSNES to compile on my PC. I'm pretty sure that I need to learn some more compiling stuff before coding stuff. This is all very exciting and interesting.

I'm done with this post. I just decided I was done suddenly. That was fun. I'm silly.