NEED HELP CREATING THE "DS COMICS PAGE"

Stuck? This is the place to go to get and give help.

NEED HELP CREATING THE "DS COMICS PAGE"

Postby MEGAMAN X » February 9th, 2012, 7:37 pm

I am planning on making a game (more of an application) where one could read comics on the DS.
Is there any way to change the picture without changing the room each time? Also, is there a limit to how many rooms or backgrounds I can place in a game? I have placed the .dsgm file of the game at the bottom of the page, so you can check out exactly what I'm doing.
Attachments
DS Comics Page.dsgm
Touch the arrows w/the stylus to change images.
(66.53 KiB) Downloaded 17 times
The reason I think up things that no one in their right mind would think up, is because
I'm not in my right mind....
MEGAMAN X
 
Posts: 103
Joined: January 29th, 2012, 1:09 am
Location: Elliston, Va. USA

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby memefefe » February 9th, 2012, 7:45 pm

You could just change the background instead of the room. And I dont think theres a limit and if there is then its like really big.

I think a comic reader for the nds has already been made though
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: NEED HELP CREATING THE "DS COMICS PAGE"

Postby MEGAMAN X » February 9th, 2012, 7:58 pm

Do you know how I could change the background?

I've never heard of a comic reader for the DS, what's the name of it.
The reason I think up things that no one in their right mind would think up, is because
I'm not in my right mind....
MEGAMAN X
 
Posts: 103
Joined: January 29th, 2012, 1:09 am
Location: Elliston, Va. USA

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby memefefe » February 9th, 2012, 8:50 pm

I dont remember but I did see it once, It might have been more for manga I cant remember

for the background just make two of them then add an object with no sprite and put a condition for going to next page then add the change background action
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: NEED HELP CREATING THE "DS COMICS PAGE"

Postby MEGAMAN X » February 9th, 2012, 9:26 pm

for the background just make two of them then add an object with no sprite and put a condition for going to next page then add the change background action

I don't think that would work. There is no If background is option, so I wouldn't be able to go back to the previous page when I press the back button.
The reason I think up things that no one in their right mind would think up, is because
I'm not in my right mind....
MEGAMAN X
 
Posts: 103
Joined: January 29th, 2012, 1:09 am
Location: Elliston, Va. USA

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby memefefe » February 9th, 2012, 9:44 pm

Add a global variable called BGNumber or somthing and then in a step event have If BGNumber is equal to 1 set background to whatever the first page is,then continue this for all the backgrounds

now add a button for the next and a seperate one for the back, in them put if tapped set BGNumber to BGNumber +1 or for the back - 1. I havent tried this and I dont know how effective it would be but you can try it
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: NEED HELP CREATING THE "DS COMICS PAGE"

Postby MEGAMAN X » February 9th, 2012, 11:07 pm

I tried adding variables, but that didn't work either. The first test at the top of the page never crashed, but now the game crashes whenever I push the arrow to turn the page. I added the two .dsgm files of the game,so you could look at it and maybe figure out if I'm doing something wrong.
Attachments
DS Comics PageTEST2.dsgm
(68.53 KiB) Downloaded 16 times
DS Comics PageTEST3.dsgm
(68.51 KiB) Downloaded 15 times
The reason I think up things that no one in their right mind would think up, is because
I'm not in my right mind....
MEGAMAN X
 
Posts: 103
Joined: January 29th, 2012, 1:09 am
Location: Elliston, Va. USA

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Buck_7 » February 9th, 2012, 11:45 pm

Okay, so here's how it's done:

To set a variablt by 1 each time you press the right button sprite, you have to Set Variable BG to BG + 1. Not Set Variable BG to + 1. That will only set it to +(positive) 1.

Also, instead of switching rooms, it would be more efficient to Change Background.
So, If BG is Equal to 1: You'd Change Background to Background_1! Or in your case gf1.
And If BG is Equal to 2 You'd Change Background to gf2 and so on.
You can do the same for subtracting one.
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: 964
Joined: February 19th, 2011, 1:44 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:00 am

There isn't a limit to the ammout of rooms or backgrounds other then the limit of 4MB per application unless you use Nitro libs.

The error you are experiencing is caused due to assigning +1 as a variable - it's an incompatible one.

What you're supposed to do is use BG+1, among other slight mistakes.

I'm adding a re-write of your code, I hope you'll be able to make out what changes have been made. Of course this is really basic code and I would solve those issues differently, but I'm trying to make this as understandable as possible. ;)
Attachments
DS Comics Page Rewritten.dsgm
(68.73 KiB) Downloaded 13 times
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:00 am

GASP! I has been Ninja'd!
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Commodore » February 10th, 2012, 12:01 am

Buck beat you to it, Foxi.
"Every puzzle has an answer." - Professor Layton
_______________________________________________________________________
December 17, 2012 - MegaMan 25th Anniversary
_______________________________________________________________________
Member of Memefefe's Squad
User avatar
Commodore
 
Posts: 551
Joined: August 10th, 2011, 4:39 pm

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Buck_7 » February 10th, 2012, 12:01 am

What does that mean? Your's is probably better than mine i'm guessing.
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: 964
Joined: February 19th, 2011, 1:44 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:02 am

Well, my copy is half the size while retaining the same content, so suck it up, newbies! :P

Less space used up/less code used = better. ;)
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:03 am

Buck_7 wrote:What does that mean? Your's is probably better than mine i'm guessing.

It's the intentions that count.

I just thought that nobody's going to help him since the Forum doesn't get much traffic anymore.
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Buck_7 » February 10th, 2012, 12:04 am

Hey, actually, It's almost exactly similar!!

The only difference is that the GoToMenu obecjt has an error in it. When you go to Comic_Select, it goes to the room before changing the variable BG to 0.
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: 964
Joined: February 19th, 2011, 1:44 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:07 am

Buck_7 wrote:Hey, actually, It's almost exactly similar!!

The only difference is that the GoToMenu obecjt has an error in it. When you go to Comic_Select, it goes to the room before changing the variable BG to 0.

Well, the most important difference is that the entire interface was simplified to 1 spritesheet.

If you have icons that will all be displayed at the exact same time and you know it will always be so, it's best to simplify things and attach them to one sprite.

Another difference is the mechanism of changing Frames and cutting off functionality whenever Page reaches a certain limit, so that the variable doesn't go ape and so that you don't have to delete and re-create objects which always causes issues.

I would've gone the extra mile and use SPRINTF to generate the page name to load, but that requires a C/C++ Driving License to be understandable. ;P It would allow the user to forget about a whole lot of If statements though...

EDIT: Oh yeah, before I forget. Buck? Don't use Start Animating in step. It's a CPU-consuming Action that re-starts each frame. Setting a frame is much better. It'd be even better if it was wrapped in a frame checker not to switch frames for no reason, but I really didn't feel like adding extra code to it. ;P
Last edited by Foxi4 on February 10th, 2012, 12:11 am, edited 1 time in total.
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Buck_7 » February 10th, 2012, 12:10 am

Oh, I see. I like it when you guys help, cause I get to see your super efficient code.


Foxi4 wrote:
Buck_7 wrote:What does that mean? Your's is probably better than mine i'm guessing.

It's the intentions that count.

I just thought that nobody's going to help him since the Forum doesn't get much traffic anymore.


I just wanted to practice my abilities to explain. 8-)
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: 964
Joined: February 19th, 2011, 1:44 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:14 am

Buck_7 wrote:Oh, I see. I like it when you guys help, cause I get to see your super efficient code.


I was a beginner once, like you... and then I took a C/C++ tutorial to the knee and started being a smart-ass.

:lol:
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby MEGAMAN X » February 10th, 2012, 12:25 am

Thanks for the help everyone! It works perfectly now!
If anyone has a favorite comic strips that they would like for me to put into the application I will. Also, if anyone knows a good website where I could find a lot of comic strips, please post the name. Thanks

Foxi, I think you need a bar of soap, so you can clean your mouth out. :lol:
The reason I think up things that no one in their right mind would think up, is because
I'm not in my right mind....
MEGAMAN X
 
Posts: 103
Joined: January 29th, 2012, 1:09 am
Location: Elliston, Va. USA

Re: NEED HELP CREATING THE "DS COMICS PAGE"

Postby Foxi4 » February 10th, 2012, 12:34 am

That... is exactly what my girlfriend's mum told me once, to the word. XD
Current Projects:

FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%
Foxi4
 
Posts: 1114
Joined: December 31st, 2010, 3:25 am

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron