Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Munchor

Pages: 1 ... 208 209 [210] 211 212 ... 424
3136
Site Feedback and Questions / Re: Number of Downloads
« on: February 21, 2011, 07:26:23 am »
Sadly nope. Runer112 scouted for high attachment downloads earlier but I don't know where he did. Later I checked in the admin panel and it did not list the amount of downloads.

I am sure coding such thing would be possible since it's most likely stored in the database, but I don't know PHP...

In the downloads section you can view total downloads and views, but not the former in the top 10 :(

Oh I see. I'm sure there is a mod for it, I'll try Google.

3137
TI Z80 / Re: Tricross
« on: February 21, 2011, 07:24:56 am »
Nice, Tricross!

I think TI Connect is just fine, I never had problems with it unless for installing. Once you set it up, it will usually work fine.

But never install both at the same time, they collide.

3138
News / Re: Somebody set up us the bomb
« on: February 21, 2011, 07:22:34 am »
Congratulations to the new team.

A lot of Coders of Tomorrow now :D Nice, I hope this makes it better due to abuses and stuff by some of the members.

3139
There was already a news thread about this, but woah this is still spreading like crazy ;D

3140
Axe / Re: Axe - The 'Fix ' Command
« on: February 21, 2011, 07:19:02 am »
Hum, I meant the difference, in TI-Basic between Text( And Output(/Disp

3141
Axe / Re: Specific Tutorials List (Axe)
« on: February 20, 2011, 04:43:48 pm »
It's there already ;)

My bad, I misread it.

3142
Axe / Re: Specific Tutorials List (Axe)
« on: February 20, 2011, 04:43:05 pm »
My 'Fix Command' tutorial could be added too I think.

3143
Axe / Re: Axe - The 'Fix ' Command
« on: February 20, 2011, 03:36:42 pm »
Cool I guess. But isn't this, like you said, in the documentation? I don't think we should be flooding the forum with tutorials on stuff that can be easily found after a few seconds of experimenting, or merely through flipping through the commands list

But isn't this, like you said, in the documentation?

I don't really get this sentence, but when I joined Omnimaga and started learning Axe, I had to do it on the IRC and it's not easy to understand stuff. I like it to be many tutorials and guides for Axe newcomers.

3144
Axe / Axe - The 'Fix ' Command
« on: February 20, 2011, 03:22:32 pm »
Introduction

Axe has a command called 'Fix ' with many uses. It's really simple to use and everything is explained in the commands.htm included in Axe. However, this tutorial makes it simpler to understand the several options of 'Fix ' command with examples and explanation.

The Fix command is always followed by a number, and it activates a new feature or changes something, and there is always another Fix that cancels it.

Note: I'm explaining from Fix 0 to Fix 5, I'll explain the others later.

Fix 0 and Fix 1

Code: [Select]
.FIX
ClrHome
Text(0,0,"Small font
Fix 1
Text(0,10,"Big Font
Fix 0
Repeat getKey
End

Whenever, Fix 1 is called, it activates 8 pixels size font. When Fix 0 is called it makes it the default.

This is what happens when I compile and run this code:



This command is similar to the difference in TI-Basic:

Output(0,0,"TEXT
Text(10,0,"TEXT

Fix 3 and Fix 2

The Fix 3 command makes text inverted:

Code: [Select]
.FIX
ClrHome
Text(0,0,"Normal text
Fix 3
Text(0,10,"Inverted text
Fix 2
Repeat getKey
End



This is a very simple command to understand, I think.

Fix 5 and Fix 4

Now, this is one of the most important Fix's in my opinion. It lets you have text and images/sprites at the same time in the LCD.

Here's an example:

Code: [Select]
.FIX
ClrDraw
[181818FFFF181818]->Pic1
Fix 5
Pt-On(20,20,Pic1
Text(0,0,"Image and text
DispGraph
Repeat getKey
End
Fix 4

This is very useful for menus, games and most programs use it.



Conclusion

I hope you liked the tutorial, if you have any questions, comment or PM me.

Attachments

Attached is a ZIP with the three 8xp source codes and executables and the screenshots.

3145
I'd do:

Code: [Select]
        int difficultyLevel = inputScanner.nextInt();
        while (difficultyLevel<0 || difficultyLevel>1000)
        {
            System.out.println("Invalid Difficulty");
            difficultyLevel = inputScanner.nextInt();
        }
:)

The user can also be too dumb to fix the error and make a valid difficulty. But it doens't matter.

3146
Hello, I want to use java at home, and I'm trying to download eclipse right now, unless if you guys think netbeans is better :P

anyways, I suck at knowing all of these things how to install libraries and such, anyone know of a simple graphics library that can do 3D, and is easy to install?
You shouldn't be using Java for anything 3D - it's just too slow/memory-intensive for that. That's my opinion though.

well, I'm talking simple 3D, like minecraft 3D.

Even though... It's just so complicated, you shouldn't start with it, never.

3147
Code: [Select]
package randomnumbergame;

import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("Enter difficulty (from 0 to 1000): ");
        Scanner inputScanner = new Scanner(System.in);
        int difficultyLevel = inputScanner.nextInt();
        if (difficultyLevel<0 || difficultyLevel>1000)
        {
            System.out.println("Invalid Difficulty");
            sys.exit(0);
        }
        System.out.println(inputScanner.nextLine());
        Random generator = new Random();
        int randomNumber = generator.nextInt(difficultyLevel);
        boolean gotIt = false;
        while (gotIt == false)
        {
            int attemptNumber = inputScanner.nextInt();
            if (attemptNumber == randomNumber)
            {
                gotIt = true;
            }
            else
            {
                if (attemptNumber > randomNumber)
                {
                    System.out.println("The secret number is smaller... ");
                }
                else
                {
                    System.out.println("The secret number is highter... ");
                }
            }
        }
        System.out.println("You won!");
    }

}

Fixed.

3148
Code: [Select]
package randomnumbergame;

import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("Enter difficulty (from 0 to 1000): ");
        Scanner inputScanner = new Scanner(System.in);
        int difficultyLevel = inputScanner.nextInt();
        if (difficultyLevel<0 || difficultyLevel>1000)
        {
            System.out.println("Invalid Difficulty");
        }
        System.out.println(inputScanner.nextLine());
        Random generator = new Random();
        int randomNumber = generator.nextInt(difficultyLevel);
        boolean gotIt = false;
        while (gotIt == false)
        {
            int attemptNumber = inputScanner.nextInt();
            if (attemptNumber == randomNumber)
            {
                gotIt = true;
            }
            else
            {
                if (attemptNumber > randomNumber)
                {
                    System.out.println("The secret number is smaller... ");
                }
                else
                {
                    System.out.println("The secret number is highter... ");
                }
            }
        }
        System.out.println("You won!");
    }

}

Would this work, then?

3149
I'd avoid creating a scanner each and every time you need to read something - once is enough. :)

Oh yeah, I just need to call it again ;D

3150
Code: [Select]
package randomnumbergame;

import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("Enter difficulty (from 0 to 1000): ");
        Scanner difficulty = new Scanner(System.in);
        int difficultyLevel = difficulty.nextInt();
        if (difficultyLevel<0 || difficultyLevel>1000)
        {
            System.out.println("Invalid Difficulty");
        }
        System.out.println(difficulty.nextLine());
        Random generator = new Random();
        int randomNumber = generator.nextInt(difficultyLevel);
        boolean gotIt = false;
        while (gotIt == false)
        {
            Scanner attempt = new Scanner(System.in);
            int attemptNumber = attempt.nextInt();
            if (attemptNumber == randomNumber)
            {
                gotIt = true;
            }
            else
            {
                if (attemptNumber > randomNumber)
                {
                    System.out.println("The secret number is smaller... ");
                }
                else
                {
                    System.out.println("The secret number is highter... ");
                }
            }
        }
        System.out.println("You won!");
    }

}

Random Number Game :)

Pages: 1 ... 208 209 [210] 211 212 ... 424