Keenan Staffieri

Greenhorn
+ Follow
since Jul 22, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Keenan Staffieri

Well, the goal of this map is not to GENERATE a map, but just to scroll it and control visibility, and it works. But I want to make it faster, with some kind help from here.

I would like it if someone would help me make my program better, like faster and I need help with the following:

1) Best way to store map data array positions.
2) Fastest way to render these thingys

Screenies:
http://img431.imageshack.us/img431/7838/1ot5.png
http://img98.imageshack.us/img98/134/2ge8.png
http://img98.imageshack.us/img98/5139/3lg0.png

And also when I use transparent images it is SLOWER, a lot, drops from any high-end fps to like 30-40fps

Also does it seem slighly clucky, or flickery, i have buffering of course, but just SLIGHTLY?

Please someone help me, by running my source code and giving me recommendations, or change it and send it to me. It would be greatly apprecieated, and I'm sorry but im kinda noob at these things, but I promise ill get better if its fixed better. This program is based off Kev glass tuts, yet the actually tile algorithm and visibility controls are mine. I did use his SpriteStore and Sprite class though. But I also wonder if i am using them correctly in TileMap to store the images in only ONE memory location. I think not...

Kee-World-Ala-Tor v1.0

This program generates (stupid) random maps without corner overlay blending tiles. Yet the point of this program is to render a scrollable tile map, with visibility controls and have it be able to scale to any window resolution (works).

Features:
+ Renders a tile map based on 2D array algorithms
+ Scrollable
+ Grid on/off
+ Coord labels on/off
+ Transparent interface
+ 10 Sample Maps
+ Tile visibility controls (only tiles visible on screen are rendered) (works with any window size as well)
+ Edge of map scroll stops
+ Completely scalable interface
+ Works with any window size (within means)
+ Works with any tile texture size
+ Sync´┐Żed scrolling based on fps

Issues:
+ Slow, slow transparency performance.
+ Slow drawRect and drawString performance (Grid/coord)
+ a little flickery?
+ Other things here and there




Download link, look to right and click Download, and then you click the link at the bottom, (sorry if this is a bad way to upload).
http://storeandserve.com/download/639271/WorldGenerator.rar.html
17 years ago
but i never want to change the screenwidth ect, in tile map. i want to make it so i can use the 'setting' object in ANY class, but i guess my design is messed up since i am using the setting thingy in a class that shouldnt have to take screenwidth parameters in the constructor. any recommendations?
17 years ago
Hi,

It makes me feel inferior to ask this, but I have a question about objects in classes. Well I am working with a canvas, and I decided that I want to make a seperate object to have contructors that keeps track of screenwidth ect.

like:




i constructed it in WorldGenerator (which contains my main class)



I can refer to the setting object anywhere i want in the world generator class. BUT i cant refer to the setting object in a different TileMap class, because it cant recognize symbol because i didnt construct the object in the TileMap class:



So i guess i pretty much messed up my design...
i also tryed using things like static and public, but it feels "wrong" and, it doesnt work anyway. I even tryed to extend the WorldGenerator class, but it causes compile errors with the paramaters in the TileMap constructors.
[ December 06, 2006: Message edited by: Keenan Staffieri ]
17 years ago
you use canvas to paint for applications. you use applet for web browser. But you have to use applet if you want people to use your game on your website or someone else's immeditaly. you must use appletview to see applets offline. but canvas will paint just like applet does but possibly faster if you use openGL on canvas.
17 years ago
Ok, i got back to this, and i now use eclipse 3.2 so i dont have to use command promt to utilize the sunstance look and feel.

Well it works, and the thing actually lets me change the theme as its open, but i want to keep theme default MY WAY to ebony theme. I am having trouble setting the theme because i am not smart.

CODE:



I am viewing this for help:
https://substance.dev.java.net/docs/themes.html

I want to make the ebony theme work with CLASSIC buttons style.
17 years ago
note: i have been able to compile a different graphical project, but i cant seem to compile this one.
Hello, I am having trouble transfering a project to Eclipse 3.2. I made a new project in Eclipse, and then I copied + pasted the files individually from the other project. The file names are EXACTLY the same, yet I noticed JBuilder differs in its way of making its folders. There much be something I'm missing, because the prog applet wont compile, and when the applet comes up, it says applet not initilized and the console says this:


java.lang.ClassNotFoundException: .class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
load: class .class not found.
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: \class.class (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 9 more



Please, help, I'd like to switch to this IDE.
ok ill take a look, ill just worry about it more when the time comes i guess

now off to figuring out how to change this... theme... i want darker one
17 years ago
Ok, thank you that worked perfectly and its beutiful.

But I have a long term question for you, before i let all of you go!

Ok, how would I make this so other people could download it and be able to just simply double click on something and the program would run? Kinda like an executable shortcut but for java...

Also another question about path and letting people download it. Ok, if you have sounds,pictures,sprites,ect, that are used by the program in the classes directly, does java automaticcaly "pack" all of those things from the classes folder for other peoples do download? Or must they be included like I do in C language, give them a folder with the stuff in it.

ty
17 years ago
ok, now it says cannot create java virutal machine
i even made sure it was on mannually by opening up an applet on the net.


[ July 26, 2006: Message edited by: Keenan Staffieri ]
17 years ago
i know java doesnt compile into executable, i was just saying i saw the path for java.exe.

i typed in the stuff in the command prompt, and i says this when i try the java -cp substance.jar Swingy command. this: exception in thread "main" java.lang.NoClassDefFoundError: Swingy.

I am right in the directory of my program: C:\Practice Programs\Swingy, there are other folders in this such as classes, and classes has the substance jar file and my class file. i try this command in the command prompt in both the direct Swingy directory, and in the classes folders and it always says this. I followed my noob book about command promt but this one isnt working. Swingy compiled just fine in JBuild, AND it of course has a main.
17 years ago
Well I just added the substance to the "Required libaries" tab yet their is an excliamtion point, and I dont know what it mean and it does not say anything or why even if hoovered with mouse. I checked the help, and it said if its grey like that, i need to upgrade to JBuilder Enterprise which cost money, and i dont like that. I dont see why this is nessary, i hope i can get interfaces to work without paying anything.

http://img66.imageshack.us/my.php?image=1nd1.jpg

And also here is a sceeen of the jar file:

http://img160.imageshack.us/my.php?image=2ar3.jpg


I went to the java jre 1.5 directory and i saw a "java.exe" but i still am unclear on how to make my program executable.

ty for help.
17 years ago
I use JBuilder and the screen looks like this:
http://img126.imageshack.us/my.php?image=1dr4.jpg


These are my paths... are they ok?

and also how would i run the app with what you said, im a little confused about java because it does not make .exe like C language does. I dont know how i am supposed to run the app without compiling it in jbuilder. when i look in my project folder i there is nothing that seem like it "executes" the program in order to add that path.
[ July 25, 2006: Message edited by: Keenan Staffieri ]
17 years ago
ok, i need a little help getting this to work

ok i am following this link:
https://substance.dev.java.net/docs/getting-started.html

I have the substance.jar in my classes folder. Here is my code:




Yet, instead of showing the new substance interface, it shows the losey java one. The reason is that for some reason it cant find the class for subtance in the catch. My output box says "Subtance not found" but i dont know where the class file is, because it didnt come with one. I dont know what im support to do to make this compile and work.

ty for help.
17 years ago
Hi, I stumbled upon this this: https://substance.dev.java.net/

Because I was looking for java themes I could use for my apps. What seems odd, amd sorry for my noobishness, but I don't see a download link, and I'm confused, becase I want the Streetlight / Metal Wall Theme in the middle of the page(black).

Helpz
17 years ago