GithubHelp home page GithubHelp logo

udacity / ud405 Goto Github PK

View Code? Open in Web Editor NEW
172.0 49.0 335.0 15.33 MB

Code supporting the free Udacity class 2D Game Development with LibGDX.

Home Page: https://www.udacity.com/course/2d-game-development-with-libgdx--ud405

License: MIT License

Java 74.74% HTML 14.59% JavaScript 0.23% CSS 10.23% OpenEdge ABL 0.21%

ud405's Introduction

2D Game Development with LibGDX

This repository contains all the code for the free Udacity class ud405: 2D Game Development with LibGDX. These demos and exercises were designed to accompany the course, but are a fine learning resource in their own right.

You can download this code using the green "Clone or download" button at the top left.

Instructions for importing and running these projects can be found in the 1.2.01-Demo-GettingStartedWithLibGDX folder.

Issues and pull requests welcome!

ud405's People

Contributors

anthonycastelli01 avatar ianedington avatar jqueraltmo avatar jrarama avatar malcolmboyd avatar nmillward avatar nvh0412 avatar sudkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ud405's Issues

Better algorithm for 1.3.08-Solution-DrawTheCantorGasket

I know it's not really important but Wouldn't it be better using these lines

for (int i = 0; i < 9; i++) {
    if (i == 4) continue;
    punchCantorGasket(i%3 * size/3 + x, i/3 * size/3 + y, size/3, recursions - 1);
}

instead of below lines?

float newSize = size/3;

punchCantorGasket(x, y, newSize, recursions - 1);
punchCantorGasket(x + newSize, y, newSize, recursions - 1);
punchCantorGasket(x + 2 * newSize, y, newSize, recursions-1);
punchCantorGasket(x, y + newSize, newSize, recursions-1);
punchCantorGasket(x + 2 * newSize, y + newSize, newSize, recursions - 1);
punchCantorGasket(x, y + 2 * newSize, newSize, recursions - 1);
punchCantorGasket(x + newSize, y + 2 * newSize, newSize, recursions-1);
punchCantorGasket(x + 2 * newSize, y + 2 * newSize, newSize, recursions - 1);

Less verbosity and more readable.

1.3.02-Exercise-DrawAStarfield gives errors in Android Studio

Running desktop:run task gives errors Unsupported major.minor version 51.0 (Java 7)

screen shot 2015-09-27 at 9 36 24 pm

It's because Robovm requires Java 1.7+. My Android Studio was using Java 6 JRE despite JAVA_HOME being set to 1.8. I fixed following the steps below to remove 1.6 from the plist file and force Android Studio to use Java 1.8:

http://www.gamefromscratch.com/post/2014/04/03/Troubleshooting-IntelliJLibGDXRoboVMGradle-issues-on-Mac-OS.aspx

An easier fix is removing the ios project from the gradle file.

I think it could be an issue that only affects versions of Android Studio that copied settings over from a previous install.

1.3.1-Draw a Starfield

Exercise is missing an import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;

Not sure if students are supposed to add in the import themselves after the "TODO: Begin a shapeRenderer batch using ShapeType.Point"? If so, perhaps consider mentioning something about the import in the TODO?

Gradle warning doesn't runs the desktop app

Hey there,
I'm getting the following warning while executing the command gradlew desktop in the Terminal to get the output:
bootstrap class path not set in conjunction with -source 1.6
Due to this the app doesn't opens up in desktop but it does runs effectively in my Android mobile. How to solve the warning?

UPDATE: The gradlew command still doesn't work out but when I add a new Run/Debug configuration to Desktop under Gradle and set its task to desktop:run, it works perfectly!

Error with run configuration

I can run the app on my android device and on my desktop if I run from the command line using gradlew desktop:run but when I set up the run configuration I get the error message: " Could not create service of type BuildSessionScopeServices$CrossBuildFileHashCacheWrapper using BuildSessionScopeServices.createCrossBuildChecksumCache()."

Error in Instant Run / Build APK after updating to Android Studio 3.6.1

Solution was running well in android test device before updating android studio.

After updating android studio to 3.6.1

  1. Instant Run is not working - app is not loading on test device
  2. Build > Build APK is giving following error
    Build APK(s): Errors while building APK. You can find the errors in the 'Messages' view.

Desktop run doesnt work?

I can run the app on my android device and on my desktop if i run from the command line using gradlew desktop:run but when i set up the run configuration i get the error message: " Could not create service of type BuildSessionScopeServices$CrossBuildFileHashCacheWrapper using BuildSessionScopeServices.createCrossBuildChecksumCache()."

Bubble radius

In the video you say the bubble should touch the outer line at 9.8, but this code does not account for bubble radius and the bubble center is on the line of outer circle at 9.8.

This code does account for the bubble radius:
renderer.setColor(Color.RED);

    renderer.circle(WORLD_SIZE / 2, WORLD_SIZE / 2, WORLD_SIZE / 4, 64);

    // TODO: Draw a circle to indicate 9.8m/s^2


    renderer.setColor(Color.GREEN);

    // TODO: Draw a circle to hold the bubble when the phone is flat
    renderer.circle(WORLD_SIZE / 2, WORLD_SIZE / 2, WORLD_SIZE / 14, 64);



    renderer.set(ShapeType.Filled);

    // TODO: Draw the bubble
    renderer.circle(
            WORLD_SIZE / 2 - yAxis * WORLD_SIZE / (4f*9.8f) + yAxis / 9.8f / 4f * WORLD_SIZE / 4, 
            WORLD_SIZE / 2 + xAxis * WORLD_SIZE / (4f*9.8f) - xAxis / 9.8f / 4f * WORLD_SIZE / 4, 
            WORLD_SIZE/16, 
            64);

1.5.07 BALL_COUNT should be 0 at first

The extension work has already been done in the base project meaning that the program renders 10000 balls right away. Needs to be set to 0 to just render a single ball for the initialize challenge, or rewritten to have no handling for multiple balls to leave it for students to figure out.

1.3.04-Connect the Dots

Students might not know that float [] floatDots should contain entries starting at floatDots[1]. When I looked at the documentation, I didn't find this mentioned either. Might be helpful to include a note on this in the TODO for vector2ArrayToFloatArray(Array dots).

About alternative recursion method

The GitHub profile URL https://github.com/khafan is no longer in existence in DrawTheCantorGasket.java. You may remove the link from there only mentioning the username as khafan.

Line 83 of the file:

Also, I'm not able to understand this part of code where we use recursion as given by khafan user. This:

for (int i = 0; i < 9; i++) 
{
        if (i == 4) continue;
          punchCantorGasket(i%3 * newSize + x, i/3 * newSize + y, newSize, recursions);  
 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.