How to download files using wifi!

Learn to use DS Game Maker by Example!

How to download files using wifi!

Postby aekara » September 27th, 2011, 3:42 pm

OK so i tryed first using a palib example and it didnt work.then i tryed remaking YoshiInAVoid's example to work on version 5 and it works! It is VERY simple.
Now lets get started.

1. download this action and put it on C:\Program Files\DS Game Maker\Actions
Download File.action
(186 Bytes) Downloaded 85 times
downlaod this lib and save it somewhere on your computer
DownloadLib.h
(455 Bytes) Downloaded 72 times

2. first we must init fat , include the wifi lib and also include the Downloadlib
Here is how you do it:
9.jpg
9.jpg (51.55 KiB) Viewed 2044 times

tick the "Perform Generic FAT Initialization"

10.jpg
10.jpg (50.32 KiB) Viewed 2044 times

tick the "Include Wifi lib"

on the "Include files" press the + button and select the Downloadlib.h

3. Make one room and one object.
1.jpg
1.jpg (19 KiB) Viewed 2044 times

4.On the new object add an event like "if button press A"
2.jpg

5. We add some text to show that wifi is being used
3.jpg

6.Now we have to init wifi so drag the "Execute code" action and type in " PA_InitWifi(); "
4.jpg

7.Just put some more text here
5.jpg

8.It's time to download our file now! drag the "Download file" action.
URL is the link for the file we will download (make sure it's a direct link like this one if you are downloading a photo : http://2.bp.blogspot.com/_dkZmbXOpiFE/S ... /mario.bmp
"File name" is the name of the file
"extension" is the extencion of your file (make sure not to use " . " )
"Success or not" is a variable that we need to declare to show if the download was Successfull or not
6.jpg

9. Now you can put something like this.This will not show the file on the sreen it will just show you if the download was successfull or not!!! : (click on the photo to view in full size)
7.jpg


After the file is downloaded it will be located in the root of your flash card

If you are downloading a photo you can view it using this:

Download this lib and this action (place the action at C:\Program Files\DS Game Maker\Actions and include the lib as seen on the top of the post)
Load bmp from FAT.action
(164 Bytes) Downloaded 50 times
FatBmps.h
(5.44 KiB) Downloaded 67 times

Now drag the action after we have show the text and in the action you will see these
"Screen"(the screen that the photo will be viewed
"File" the file of the photo
8.jpg



And if you are downloading a .txt file you can do this:

Drag the execute code action after the text that shows that the download was success and add this
Code: Select all
 Dim FileContent As String
 Read_File(FileContent, "file.txt")
 Draw_Text(Top_Screen, 1, 1, FileContent)
This is a DBAS Functions and it's available in the pro version
It will draw the "file.txt" on the top screen
you can change the "file.txt" to the name of your .txt and you can also change the "Top_screen" to "Buttom_screen

And that's it! If you have ANY problem just post it here
Thanks to YoshiInAVoid


EDIT:
here is a demo that download a .txt from mediafire direct link and views it on the bottom screen
DownloadFile.dsgm
is the .dsgm file of that demo(yand here ou must include the Downloadlib,perform generic fat init and iclude the wifi lib in order for this to compile
(1.54 KiB) Downloaded 58 times
downloading an txt.nds
press A to doenload a .txt file and view it!
(336.56 KiB) Downloaded 59 times
Last edited by aekara on September 29th, 2011, 4:59 pm, edited 2 times in total.
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby memefefe » September 27th, 2011, 4:10 pm

WHY?!?!? WHY THE FLIP DID YOU HAVE TO USE A GREMILINS PIC!

I have an irational fear of gremilins and everytime I see one I cant take a shower, walk around in the dark, or go to bed properly for months!!! Of all the millions and millions of thing you could of had a pic of WHY GREMILINS!?!?!
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Re: How to download files using wifi!

Postby aekara » September 27th, 2011, 4:15 pm

haha this was the one that i found in Yoshis tutorial and i just use it :)
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby YoshiInAVoid » September 27th, 2011, 4:30 pm

Glad you got it working!

BTW If your only using one line of code use the action PAlib rather than Execute code since it is alot easier to see.
Sorry, Jack, YoshiInAVoid's back!

I'm the original; I'll take your breath away! This fall, YoshiInAVoid rules! Did you miss me, Andy? I sure missed you!

Keep an eye out for me.
YoshiInAVoid
 
Posts: 1985
Joined: December 30th, 2010, 11:53 am
Location: England

Re: How to download files using wifi!

Postby aekara » September 27th, 2011, 4:34 pm

thank you
the palib action ? i dont have such an action :roll:
i may have delete it as resently was playing with the actions :oops:
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby memefefe » September 27th, 2011, 7:07 pm

well besides the pic this is a very useful tutorial
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Re: How to download files using wifi!

Postby aekara » September 28th, 2011, 1:12 pm

thanks.
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby Sonic The Hedgehog » September 28th, 2011, 1:34 pm

Can you put a diffrent picture :?:
"He collected the money he got on the battlefeild then he built a ark and got every kind of animal male and female, and then he beat the c*** out of every single one of them"

I've been playing way too much Garrys Mod
User avatar
Sonic The Hedgehog
 
Posts: 824
Joined: June 22nd, 2011, 12:26 pm
Location: My happy place

Re: How to download files using wifi!

Postby aekara » September 28th, 2011, 3:02 pm

you can download any picture you want just make sure that the url of the photo is like the one i used
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby memefefe » September 28th, 2011, 3:27 pm

Sonic The Hedgehog wrote:Can you put a diffrent picture :?:


Why would he make a tutorial that only lets you download 1 picture?
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Re: How to download files using wifi!

Postby Sonic The Hedgehog » September 29th, 2011, 2:28 am

memefefe wrote:
Sonic The Hedgehog wrote:Can you put a diffrent picture :?:


Why would he make a tutorial that only lets you download 1 picture?


I mean change the gremilin picture for those people who get scared of it :lol:
Last edited by Sonic The Hedgehog on September 30th, 2011, 10:05 am, edited 1 time in total.
"He collected the money he got on the battlefeild then he built a ark and got every kind of animal male and female, and then he beat the c*** out of every single one of them"

I've been playing way too much Garrys Mod
User avatar
Sonic The Hedgehog
 
Posts: 824
Joined: June 22nd, 2011, 12:26 pm
Location: My happy place

Re: How to download files using wifi!

Postby memefefe » September 29th, 2011, 4:28 am

Oh! yeah me too! Ugh it brought back alot of bad memories and I cant sleep now!
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Re: How to download files using wifi!

Postby YoshiInAVoid » September 29th, 2011, 4:39 pm

I love the gremlins film that's why I picked the poster of it. Simply change the URL to another bmp file and tada, nightmares gone!
Sorry, Jack, YoshiInAVoid's back!

I'm the original; I'll take your breath away! This fall, YoshiInAVoid rules! Did you miss me, Andy? I sure missed you!

Keep an eye out for me.
YoshiInAVoid
 
Posts: 1985
Joined: December 30th, 2010, 11:53 am
Location: England

Re: How to download files using wifi!

Postby aekara » September 29th, 2011, 4:57 pm

haha ok tutorials url changed : P
Working on something big!

My web site here.
aekara
 
Posts: 693
Joined: July 12th, 2011, 1:24 pm
Location: Earth

Re: How to download files using wifi!

Postby Buck_7 » September 29th, 2011, 6:27 pm

That picture doesn't look so scary. I mean I haven't watched the film so I'm safe. 8-)
If he wants a piece of me then he shall get one!! Hyaa!(Karate punch)
Upcoming games I'm working on:
  • Minecraft2DS
  • Bow Man DS
  • Bird poo!
------------------------------------------------------------------------
COOL LOOK 3D portal port for DS! http://drunkencoders.com/2013/01/dstal-advance/
needMusic?needHelp?Ask.
User avatar
Buck_7
 
Posts: 1001
Joined: February 19th, 2011, 1:44 am

Re: How to download files using wifi!

Postby memefefe » September 29th, 2011, 8:18 pm

I watched the movie when I was like 10 and with the lights out. I was soooooo scared for like a year almost. Then a couple months ago I saw it on tv and tried to concour my fear, bad idea. It only stired things up more! And just as I was forgeting about it again I had to see that pic!

Its a pretty creepy movie, in the end the little bugger comes after the kid with a CHAINSAW!!
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Re: How to download files using wifi!

Postby YoshiInAVoid » September 30th, 2011, 5:04 pm

I watched it last year when I was 11. I loved it because it's more funny than it is scary. Then I bought it on video and it's one of my faveorite films.

The ending was the scariest part, but still not that scary. The gremlin comes at him with a chainsaw and he just opens a window and the gremlin dies.
Sorry, Jack, YoshiInAVoid's back!

I'm the original; I'll take your breath away! This fall, YoshiInAVoid rules! Did you miss me, Andy? I sure missed you!

Keep an eye out for me.
YoshiInAVoid
 
Posts: 1985
Joined: December 30th, 2010, 11:53 am
Location: England

Re: How to download files using wifi!

Postby Bobbyloujo » September 30th, 2011, 9:29 pm

Hmm. This movie sounds interesting. I shall watch it sometime.
Seriously never posting again, lawlz.
jk
Bobbyloujo
 
Posts: 1299
Joined: December 30th, 2010, 8:40 pm
Location: Uh-merica

Re: How to download files using wifi!

Postby Buck_7 » September 30th, 2011, 11:58 pm

Memefe, you shouldn't try overcoming your fears by watching it a second time, but by watching how the made the movie. It will show you the truth behind the curtains. Watching those spoil the fun of the movie for most people.
Upcoming games I'm working on:
  • Minecraft2DS
  • Bow Man DS
  • Bird poo!
------------------------------------------------------------------------
COOL LOOK 3D portal port for DS! http://drunkencoders.com/2013/01/dstal-advance/
needMusic?needHelp?Ask.
User avatar
Buck_7
 
Posts: 1001
Joined: February 19th, 2011, 1:44 am

Re: How to download files using wifi!

Postby memefefe » October 1st, 2011, 12:48 am

Ugh I cant even think of them without freaking out! At lease Im not afraid of ET, one of my friends is! haha
Who doesnt wanna watch a weirdo tumble?
http://kawaiiweirdo.tumblr.com
memefefe
 
Posts: 952
Joined: August 19th, 2011, 3:35 am
Location: The infinite expanses of my mind

Next

Return to Tutorials & Examples

Who is online

Users browsing this forum: No registered users and 2 guests