Homebrew DS App Studio 3D Example

RoyalCardMan

DS App Studio™ Developer
OP
Member
Joined
Aug 11, 2010
Messages
628
Trophies
0
Age
34
Location
In the middle of gun fire.
Website
www.awsomisoft.com
XP
200
Country
United States
Hi All!

As I continue the 3D functions, I will show examples of the functions.

Here is this example:

scrs1.png


Here is the download:
Download

Here is the code, but it is not usable in DS App Studio version on the site, but the new version will be released soon.

Code:
// Project Name: NDS App - AwsomiSoft - www.awsomisoft.com

// Description: this template is a very simple project it 
// contains the basic code for a DS App Studio application

// Version: 0.4.6

// whenever using 2D or 3D you must use the start2D or 2D function
start3D(256, 256);

// first, you must tell it to start the first form
startform("Form1");
wait();
endif();
// and this creates the form. To add another form, just
// do createform and in quotes the name of the form.
createform("Form1");
ÂÂÂÂÂÂ 
ÂÂÂÂÂÂ Int("zoom", 70);
ÂÂÂÂÂÂ Int("direction", 0);
ÂÂÂÂÂÂ Int("angle", 0);
ÂÂÂÂÂÂ initcamera("0", "0", "zoom", 255, 191);
ÂÂÂÂÂÂ text(0, 0, "This is a 3D example using DS App Studio!", "bottom");
ÂÂÂÂÂÂ text(0, 10, "Renderer: OpenGL", "bottom");
ÂÂÂÂÂÂ text(0, 15, "Use the arrow keys to change the zoom and direction of the camera.", "bottom");
ÂÂÂÂÂÂ loop();
ÂÂÂÂÂÂÂÂÂÂ Int("zoome", "zoom");
ÂÂÂÂÂÂÂÂÂÂ Int("angle", "+=", 1);
ÂÂÂÂÂÂÂÂÂÂ ogldrawcube("1", "1", "1", "1", "angle", cl_blue);
ÂÂÂÂÂÂÂÂÂÂ ifbuttonheld("DOWN");
ÂÂÂÂÂÂÂÂÂÂÂÂ Int("zoom", "+=", 1);
ÂÂÂÂÂÂÂÂÂÂÂÂ initcamera("0", "0", "zoom", 255, 191);
ÂÂÂÂÂÂÂÂÂÂ endif();
ÂÂÂÂÂÂÂÂÂÂ ifbuttonheld("UP");
ÂÂÂÂÂÂÂÂÂÂÂÂ Int("zoom", "-=", 1);
ÂÂÂÂÂÂÂÂÂÂÂÂ initcamera("0", "0", "zoom", 255, 191);
ÂÂÂÂÂÂÂÂÂÂ endif();
ÂÂÂÂÂÂÂÂÂÂ ifbuttonheld("LEFT");
ÂÂÂÂÂÂÂÂÂÂÂÂ Int("direction", "-=", 5);
ÂÂÂÂÂÂÂÂÂÂÂÂ initcamera("direction", "0", "zoome", 255, 191);
ÂÂÂÂÂÂÂÂÂÂ endif();
ÂÂÂÂÂÂÂÂÂÂ ifbuttonheld("RIGHT");
ÂÂÂÂÂÂÂÂÂÂÂÂ Int("direction", "+=", 5);
ÂÂÂÂÂÂÂÂÂÂÂÂ initcamera("direction", "0", "zoome", 255, 191);
ÂÂÂÂÂÂÂÂÂÂ endif();
ÂÂÂÂÂÂ endloop();
ÂÂÂÂÂÂ 
endif();

Most of the code is just the movement. It is basic stuff. I will add other things to make it simpler, but in this example you create two variables, direction and zoom, and you basically say if a button is pressed, increase or decrease the variables and make the camera adapt to those changes.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • ZeroT21 @ ZeroT21:
    some tasks like hacking wii mini consoles
  • SylverReZ @ SylverReZ:
    @ZeroT21, You running Windows XP in 2024?
  • K3Nv2 @ K3Nv2:
    Whore yourself out 12 times for $100 and go buy a pc
    +1
  • ZeroT21 @ ZeroT21:
    i got xp but running it off usb only, no way ima keep that
  • ZeroT21 @ ZeroT21:
    it gets hacked/corrupted if i just leave it online for an hour
  • SylverReZ @ SylverReZ:
    @ZeroT21, The Russians are after you lol.
  • K3Nv2 @ K3Nv2:
    Send me your ip I'll remotely fix it
  • ZeroT21 @ ZeroT21:
    @K3Nv2 my head needs fixing if I believe you
  • ZeroT21 @ ZeroT21:
    it's kinda fun watching it happen tho
  • K3Nv2 @ K3Nv2:
    It needs fixing for other things but your pc I can fix
  • ZeroT21 @ ZeroT21:
    over 300+ virus/trojians/worms after scanning, what did I do to deserve this attention lol
  • ZeroT21 @ ZeroT21:
    tho I find it funny when i receive other people's pc/laptops in this state
  • ZeroT21 @ ZeroT21:
    i wont be upgrading unless I cant run the games i want anymore
  • K3Nv2 @ K3Nv2:
    Spill water on it good excuse
  • ZeroT21 @ ZeroT21:
    @K3Nv2 that's like a valid option if someone else is paying for ya
  • K3Nv2 @ K3Nv2:
    Daddy's wallet
  • K3Nv2 @ K3Nv2:
    Ngl hogwarts legacy has good pooping music
  • OctoAori20 @ OctoAori20:
    That's uh-
  • OctoAori20 @ OctoAori20:
    That's certainly a Dairy Queen sign lmao
  • K3Nv2 @ K3Nv2:
    You should see his help wanted signs
  • OctoAori20 @ OctoAori20:
    Ugh, so many sweat-dipwads in Sploon 3 Anarchy mode tonight
  • OctoAori20 @ OctoAori20:
    I didn't know this was "Make Octo never finish Fresh Season 2024 Catalog in Splatoon 3" month, good god
    OctoAori20 @ OctoAori20: I didn't know this was "Make Octo never finish Fresh Season 2024 Catalog in Splatoon 3" month...