Jump to content


Photo

Ufo Remake In Java


  • Please log in to reply
25 replies to this topic

#1 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 04 May 2007 - 06:27 AM

Big Xcom enemy unknown fan here :)
I'm working on a UFO remake in java, well i will try to get the tactical
field to work first!!

I tried to do something similar in the past using c++,
though i have experience in c++, you have ALOT of work
each time writing code for trivial things, it slows down progress bigtime!!
Like eg: you want a dynamic array, then you can write a special class
for it to work etc.... and pointers, you have to always keep them in mind,
also confusing coz, sometimes you use references etc... big headache! :)

I got the maps and units working, ill add a screenshot, but
the project still needs LOOOTTTSSS of work :)

Posted Image

#2 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 04 May 2007 - 06:29 AM

Maybe there will be a UFO viewer or an editor first

#3 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 19 May 2007 - 04:16 PM

Hi there,
Currently am working on a ufo remake.
At first I would love to do a new version, in 3D and extras ....
But in the end I'ts ALOT of work, and you don't kinda know where to start,
so i decided to rewrite the game like the original, using most of the orgininal graphics, and maybe add a few features.
And also because my current version has bugs (captured commanders don't show up in alien containment!
so i have to restart the whole game).

Now UFO2000 is something similar, but i'm having a headache with c++ OMFG
I tried some code in c++ in the past, but it's at least twice more work!
And like segre says: it's harder to read code than to write code ^_^
Well using java automatically solves the portability problem as well!
and cuts down development time BIGTIME!
Anyway ALOT of respect for all the guys putting there effort in making games
like UFO2000, Xenocde, etc...

Well here is a preview of some hard work :P , about a 1 months fulltime work now i think, day in day out,
it's becomming an addication really!
Could you give me some feedback of your framerate, i want to know if the game is slow or not!
For me it's about 60-30 fps average, 30fps when roof of buildings is shown.

Running the preview:
- Make sure you have java runtime environment, most people do (at least for their netbanking :))
you can grab it from www.java.com
- Just download the zip file, and extract
it to a folder like "uforemake"
In this folder there will be a subfolder "ufo", copy ufo subfolders in here!
- Double click on uforemake.jar, if java is correctly installed it should run directly
if this doesn't work or you're having an older java version, you can go into the command prompt
and type "java -jar uforemake.jar"

Features:
- pcks & mcd loading
- maps: loading, generating radom map
- can fire guns only in aimed, and only 1 gun avail at the time
- inventory basics work
- astar pathfinding
- can walk up stairs
- doors working
- units are skinnable
- Line of fire for bullets is using LOFT templates for collision detection
- unit with the armor suit can fly
- ....

----------------------------------------------------------------------------------------------------

* 2 DO/Bugs
* ---------
* - inventory
* - map lightning
* - map los
* - explosions
* - throwing
* - items
* - cell or tile takeDamage(amount/points,type=fire/expl/gunfire)
* - largepck loading doesn't work
* - run rendering in seperate thread so we can do infinitive loop
* and take advantage of multiprocessor systems
* - randommap: buildin some rules
* - projectile: - the bullet skips during first 2 frames a bigger distance
* - hittin floor z=0 leaves a hole in the earth
* - make mapscrolling more smoother! -> increase framerate / 10 -> take framerate over 2 seconds
* - normalise all constant sizes to Tile.SX, SY SZ to allow later upgrade of resolution
*
*** Unit Stuff:
*
* - make unitskin suitable for tank etc 2x2 units
*
* Minor bugs
* ----------
* - fix cursor, throw imgage is show without box ...
* - some units cannot walk -> canwalk = false eg: floaters
* - unit cannot fall
* - when we want our unit to fall, allow it! -> last pos eg make possible!
* well with the original sometimes unit goes up the stairs and sometimes behind the stairs?!
* - clicking behind stairs gets unit to climb stairs like the original
* -> it does this: cell -16, if click next to this check if ceiling, if yes go up stairs else walk down!
* - original xcom has shadows of bullets projected on floor
* - if unit falls onto another unit it will be impassable and float above the other unit?
* so we don't have clipping when walking up stairs
* - cleanup the imports for all java files
* - if unit is moving upwards thus halfwaycell not used, keeps movestatus of previous tile instead eg fly (minor bug)
* - Unit foot dissapears when moving upwards w,nw,n
* when try to fix (no halfway method), encountered ceiling clipping with unit
* - pathfinding G scoring needs to be adjusted to weight also the timeunits
* a simple multiply will do (i guess)
* - up/down, unit is still moving sideways during up/down
* - multiple projectiles/bullets per cell would be cool!!
* - pistol should move along with displacements of unit
* problem is the unitpartmode, it is random!!
* maybe just include holdingdisplacement
* - map ispassable does't check unit blocked for -1 or +1
* - unit shoots first and then turns to direction
*

Attached Thumbnails

  • prev.png

Attached Files


Edited by mrnikosia, 19 May 2007 - 05:02 PM.


#4 Sorrow

Sorrow

    Captain

  • Forum Members
  • PipPipPipPip
  • 283 posts

Posted 19 May 2007 - 05:33 PM

"Could not find the main class. Program will exit." :(

Edited by Sorrow, 19 May 2007 - 05:44 PM.


#5 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 20 May 2007 - 08:59 AM

"Could not find the main class. Program will exit." :(


I would recommend installing the latest java JRE, on http://www.java.com
I guess that is the problem, to be honest, uforemake has only been
tested on my computer, i will try to run it by some friends later on,
to c if they have the same problem.

Thanks for the feedback, this way i can look for a solution!
Cheers

#6 Sorrow

Sorrow

    Captain

  • Forum Members
  • PipPipPipPip
  • 283 posts

Posted 20 May 2007 - 09:11 AM

Hmm...
It seems that there's no latest Java version for Win98...

#7 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 21 May 2007 - 03:17 AM

Guess win98 support is finished quicker than i thought.
Anyway I tried it on another computer and right after i installed the JRE it didn't
work by simply double-clicking on it, so i created a ".bat" file containing
"java -jar uforemake.jar" and that worked.
Double clicking worked by setting the default "open" program to java instead of winrar :)

Update uforemake:
- Experimental Line of sight
- Experimental lightsources, i cached all the tiles to 16 variations of brightness
to allow a quicker drawing, thus a better framerate, but it needs about 100megs of ram,
so am looking for other techniques :)
- Beginning implementation of explosions

#8 misiek

misiek

    Sergeant

  • Forum Members
  • PipPipPip
  • 50 posts

Posted 26 June 2007 - 11:50 AM

Nice :)

Good luck with your project and keep us informed ;)

#9 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 02 July 2007 - 02:43 PM

Nice :)

Good luck with your project and keep us informed ;)


Great! thnx

Update status:

* Timeunits implemented
* several bugfixes
* experimental accuracy algo
* map lightlevels implemented, currently huge memory hog coz it's all cached
-> dynamic lights for flares etc
* experimental explosions: it's really hard to come up with an algorithm that behaves
like the original
* enemy sightings with red indicators, unit stops when new alien spotted
* inventory, reloading weapons is working
* experimental font system
* backbuffer in video ram, faster drawing now
* priming grenades

Maybe i'm thinking about doin' open source or somethin',
if there are volunteers who like to code in java on this project, experience in JOGL?
Coz its lots of work doing it singlemanned :)

I won't release another preview since i prefer to wait until more progress is made!

Take care now, bye bye then

#10 hsbckb

hsbckb

    Sergeant

  • Forum Members
  • PipPipPip
  • 13 posts

Posted 02 July 2007 - 06:31 PM

Nice :)

Good luck with your project and keep us informed ;)


Great! thnx

Update status:

* Timeunits implemented
* several bugfixes
* experimental accuracy algo
* map lightlevels implemented, currently huge memory hog coz it's all cached
-> dynamic lights for flares etc
* experimental explosions: it's really hard to come up with an algorithm that behaves
like the original
* enemy sightings with red indicators, unit stops when new alien spotted
* inventory, reloading weapons is working
* experimental font system
* backbuffer in video ram, faster drawing now
* priming grenades

Maybe i'm thinking about doin' open source or somethin',
if there are volunteers who like to code in java on this project, experience in JOGL?
Coz its lots of work doing it singlemanned :)

I won't release another preview since i prefer to wait until more progress is made!

Take care now, bye bye then


Yes! Open-source is a very good idea.

#11 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 03 July 2007 - 12:22 PM

Yes! Open-source is a very good idea.


Aha! Are u volunteering?

#12 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 28 April 2008 - 02:34 AM

Since i don't have so much time anymore to continue this project, i plan to release the source code
under the GPL, in other words open source!!
If you did something with it contact me and show me, i'd be glad to see!

The project is coded in free java netbeans!
For the program to work ufo directory is to be created with ufo game copied in it,
i didn't include it for copyright reasons.

So, here it is!
enjoy!

Attached Files



#13 dagorkan

dagorkan

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 24 June 2008 - 02:29 PM

This looks interesting..

Has anybody tried it?

#14 dagorkan

dagorkan

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 27 June 2008 - 08:30 AM

What's wrong here?

Posted Image

I extracted your latest archive straight to the games directory, there was no ufo subdirectory so I created one and copied the Abandonia UFO:EU files into it.

Games
======uforemake
==============build
==============dist
==============lib
==============nbproject
==============src
==============ufo
=====================GEODATA
=====================GEOGRAPH
=====================MAPS
=====================etc

I couldn't start uforemake.jar in Windows Explorer so I opened dos prompt and typed what you said

BIGLETS.dat is present

Edited by dagorkan, 27 June 2008 - 08:31 AM.


#15 dagorkan

dagorkan

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 27 June 2008 - 08:43 AM

Thought it might be that the files are for the Windows 'Gold' version.

Copying the subdirectories for the DOS version into uforemake/dist/ufo/*.*

I get

Posted Image

Ufotact.pal is a file from your archive located in the main directory - ie games/uforemake/ufotact.pal

Edited by dagorkan, 27 June 2008 - 08:44 AM.


#16 mrnikosia

mrnikosia

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 03 July 2008 - 12:47 PM

Thought it might be that the files are for the Windows 'Gold' version.

Copying the subdirectories for the DOS version into uforemake/dist/ufo/*.*

I get

Posted Image

Ufotact.pal is a file from your archive located in the main directory - ie games/uforemake/ufotact.pal



Indeed, good point! i forgot to include these files! (.pal)
Here they are

Attached Files



#17 CipFem

CipFem

    Squaddie

  • Forum Members
  • PipPip
  • 1 posts

Posted 19 July 2009 - 06:29 PM

Didnt our old site have the site name of 'ufo-clan'.

Bastards i hate when compnays add extra charges on and then say 'o srry did we not mention that'...........of course ye if-you-see-Kaying didnt you moneygrabbing if-you-see-Kaywits

#18 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 27 October 2012 - 11:28 PM

I don't suppose anyone is supporting this anymore? I am interesting in pusuing a Java X-com style game and was ging to try thish out...but so far I have failed very early on.


Cheers,

Glen

#19 3llense'g

3llense'g

    Sergeant

  • Forum Members
  • PipPipPip
  • 19 posts

Posted 28 October 2012 - 12:52 AM

I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.

Edited by 3llense'g, 28 October 2012 - 01:00 AM.


#20 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 29 October 2012 - 04:59 AM

Excellent, I will set up Netbeans and try again! Glad to hear the code is "working" and that there is someone else who is intersted in Java/X-com. I hope you don't mind if I ask you a few questions later if they come up.

I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.



#21 3llense'g

3llense'g

    Sergeant

  • Forum Members
  • PipPipPip
  • 19 posts

Posted 29 October 2012 - 06:16 AM

Excellent, I will set up Netbeans and try again! Glad to hear the code is "working" and that there is someone else who is intersted in Java/X-com. I hope you don't mind if I ask you a few questions later if they come up.


I never knew about this, so thanks! It works fine for me, you just have to put any version of x-com1 into a folder called ufo inside the remake folder. :)

Edit: Ok, so .jar doesn't work, but if you have Netbeans (development suite for Java among other languages) you can open the project and run it from there.

I don't know if I can help. I was trying to figure out how to make the falling work, but didn't get far. I think I have a method to show doors even if you are on the wrong side, but we'll see. :)

#22 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 29 October 2012 - 06:59 AM

I don't know if I can help. I was trying to figure out how to make the falling work, but didn't get far. I think I have a method to show doors even if you are on the wrong side, but we'll see. :)


Oh I really just meant getting it to run at all on any level. I am an old hat at many computer languagebut just starting on Java. I have not had a chance to work on it since my initial attempt but hope to do so during my lunch break at work.

So, if you would like to "help out" with code, that is awesome but I really meant get it to the opperational level that you have achived.

#23 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 29 October 2012 - 12:17 PM


3llense'g, what JDK are you using?


#24 3llense'g

3llense'g

    Sergeant

  • Forum Members
  • PipPipPip
  • 19 posts

Posted 29 October 2012 - 01:10 PM

jdk1.7.0_05 as far as I can tell.

#25 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 30 October 2012 - 09:24 AM

I am getting this error:

ant -f C:\\JavaDemo\\UFO run
init:
deps-jar:
Updating property file: C:\JavaDemo\UFO\build\built-jar.properties
Created dir: C:\JavaDemo\UFO\build\empty
Created dir: C:\JavaDemo\UFO\build\generated-sources\ap-source-output
compile:
run:
loadFont failed file=ufo\geodata\biglets.dat msg=ufo\geodata\biglets.dat (The system cannot find the path specified)
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.Vector.elementData(Vector.java:730)
at java.util.Vector.get(Vector.java:746)
at uforemake.ImageList.get(ImageList.java:423)
at uforemake.ImageList.getImage(ImageList.java:441)
at uforemake.Font.setLetters(Font.java:69)
at uforemake.Main.<init>(Main.java:335)
at uforemake.Main.main(Main.java:1122)


Not sure where exactly I am suppose to put the "missing" files so that might be a part of it. Also I just put the "UFO-EnemyUnknown" directory inside The UFO directory I am using for the project. Any advice?

Cheers

#26 glenbricker

glenbricker

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 30 October 2012 - 09:37 AM

Ok, still not sure if I got the missing files in the right directory but I got it running now. Thanks for telling me to use Netbeans. That is a nice IDE for Java