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
  • BigOnYa @ BigOnYa:
    Or most surround sound receivers are 3 HDMI in, one HDMI out to tv, and you can select which hdmi in
    you want on the receiver.
    +1
  • K3Nv2 @ K3Nv2:
    Surround sound receiver is a good $300
  • BigOnYa @ BigOnYa:
    True, but so nice for gaming, movies.
  • K3Nv2 @ K3Nv2:
    Ancientboi is old he needs Walmart PA system
    +2
  • AncientBoi @ AncientBoi:
    Splitter @ $39 it says. I'll consider it. Thanks
  • K3Nv2 @ K3Nv2:
    Coupon makes it 30
  • K3Nv2 @ K3Nv2:
    My gaming stick can finally get use
  • K3Nv2 @ K3Nv2:
    I did see Walmart got new electric scooters now ab won't run out of juice in the middle of the parking lot
    +1
  • AncientBoi @ AncientBoi:
    :O:O:O $12. Cool
  • K3Nv2 @ K3Nv2:
    Yeah but one two ports
    +1
  • K3Nv2 @ K3Nv2:
    I'd rather spend like $15 more for double
    +1
  • K3Nv2 @ K3Nv2:
    Lol hogwarts legacy has a Arachnophobia setting to turn on
  • BigOnYa @ BigOnYa:
    I'd rather spend like $150 more for a surround receiver.
  • K3Nv2 @ K3Nv2:
    I bought the game at launch never fucked with it until recently
  • BigOnYa @ BigOnYa:
    Its fun, I like it, even tho I'm not a big harry potter fan. Like a wizard rpg. Flying around on a broomstick is cool.
  • K3Nv2 @ K3Nv2:
    Flying sucks ass on it
  • BigOnYa @ BigOnYa:
    Nuh just takes a min to get used to. I think you can upgrade or buy new broomstick also that are better.
    +1
  • K3Nv2 @ K3Nv2:
    I weirdly like inverted controls on all flying type games
  • BigOnYa @ BigOnYa:
    Prob can change it, inverted flying controls.
  • K3Nv2 @ K3Nv2:
    Only thing that annoys me is trying to find wtf to do in it
    +1
  • BigOnYa @ BigOnYa:
    Alright off to the store, later gators.
    +1
  • K3Nv2 @ K3Nv2:
    Some places amaze me were not in network with your insurance would you still like an appointment
    +1
    K3Nv2 @ K3Nv2: Some places amaze me were not in network with your insurance would you still like an appointment +1