Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: Builderboy on January 18, 2010, 12:27:42 pm

Title: Castle Storm II
Post by: Builderboy on January 18, 2010, 12:27:42 pm
So, surprisingly, in addition to the continued work on Serenity, I have found myself unexpectedly working on a new Game!  I actualy stumbled upon the concept/implementation quite by accident, but it sure has grown!  The game is going to be a sequel to my early Java game Castle Storm, which can be found in the Greenfoot Gallery here http://greenfootgallery.org/scenarios/360.  While the original Castle Storm was a RayCaster much in the same style as Doom and Wolfenstein, this new engine is brand new, and frankly, I'm very excited about it!

It uses a combination of Rasterization and RayTracing to get much better looking floor textures, as well as allowing a true UP/DOWN direction in the maps.  Worlds can now have tiles with different height, which allows for things like multiple levels, staircases, and even moving platforms.  The game also utilizes some new Mouse Look code like in a traditional FPS, but unfortunately this only works if you download the game and play it on Greenfoot. (You would need to install greenfoot first, although I will see If i can attatch a JAR file soon).  The game will work in the applet, but you have to use the arrow keys.

The game can be found here:
http://greenfootgallery.org/scenarios/1233

And here is a screenshot for the heck of it:
(http://i199.photobucket.com/albums/aa72/builderboy2005/NewBitmapImage-5.jpg)

And I will see about getting that Jar file up...
EDIT: Ok I attached the Jar file, now you can play it without downloading Greenfoot!

Use WASD to move around, C to crouch, and Space to jump.  Mouse is used to Look around.
NOTE: If using the Jar file, you will need to calibrate the mouse in the beginning.  To do this, click in the center of the window, and then drag your mouse to the top left corner of your Computer Screen, not just the window.  Let go of your mouse, and it should snap back to the center of the window.  Press ESC to stop the simulation and free your mouse again, or press the right mouse button.
Title: Re: Castle Storm II
Post by: Hot_Dog on January 18, 2010, 01:17:43 pm
SWEET!
Title: Re: Castle Storm II
Post by: Galandros on January 18, 2010, 03:27:45 pm
Disappointed. I though it was a good castle defence game for TI-BASIC.
I have to do one myself...

I like the black lines around the objects. Will you keep it on all stuff around?
Title: Re: Castle Storm II
Post by: Builderboy on January 18, 2010, 03:40:53 pm
Lol, nope, not a castle defense, more like Doom style FPS action!

Most likely the black lines will stay, there even might be more of them on corners and edges if i can get the code working.  I also need to implement sprite display so that there can be enemies.  The occlusion is killing me x.x

The good news is that I am planning for some epic weapons that just were not possible in the original Castle storm.  Think, explosives >:D
Title: Re: Castle Storm II
Post by: Galandros on January 18, 2010, 03:56:06 pm
Lol, nope, not a castle defense, more like Doom style FPS action!

Most likely the black lines will stay, there even might be more of them on corners and edges if i can get the code working.  I also need to implement sprite display so that there can be enemies.  The occlusion is killing me x.x

The good news is that I am planning for some epic weapons that just were not possible in the original Castle storm.  Think, explosives >:D
I like explosives, too. Reminds me Worms. ^^

I am kind of obsessed with castle defence, stand ground in front of hordes of enemies, retreat until the final meter (making every centimetre count) and then fight until the end. I love when that happens. In a ~1000 units map in a game, I survived once with just 15 hurt swordsmen left.
Pushing the enemy to a trap and see it fleeing and all the chaos around is also nice.

I really need an epic defence game made by myself. *sigh*
Title: Re: Castle Storm II
Post by: simplethinker on January 18, 2010, 04:18:40 pm
Very nice Builderboy!  Is this your own 3D engine?
Title: Re: Castle Storm II
Post by: Builderboy on January 18, 2010, 04:26:33 pm
Yep, I wrote everything from scratch, using only a polygon filler and a large 20x20  matrix.
Title: Re: Castle Storm II
Post by: ztrumpet on January 18, 2010, 05:31:17 pm
Very nice!  I can't wait to see what more you do. :)
Title: Re: Castle Storm II
Post by: TIfanx1999 on January 18, 2010, 06:56:05 pm
Oh that looks really cool. It'll definitely be a winner if there are explosives... reminds me of playing Goldeneye back it the day. =D
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 18, 2010, 11:16:06 pm
Disappointed. I though it was a good castle defence game for TI-BASIC.
I have to do one myself...
Well it was not posted in "Calc projects" so...

And awesome Builderboy! I am glad you're making a sequel of the game ^^. I assume yoU,re gonna release it here when done? I think you might want to include the first in the 2nd game zip file when done, though, so ppl can play the first from here too.

I kinda liked the first, altough the only problem was that I sometimes got stuck into walls so it was a bit hard to move :(

Do you think there will be a way to be able to play with mouse without having to use Greenfoot?
Title: Re: Castle Storm II
Post by: Builderboy on January 18, 2010, 11:30:49 pm
Yeah, If you download the Jar file you should be able to play it just like an exe.  I am doing a lot of experimentation with the robot class though, so just let me know if anything goes funky with the mouse.

The movement and physics are a lot better than the original, so you shouldn't have any wall problems here :)

I will try to get Castle Storm I up on the downloads section as soon as we get our other computer up and running again.  (The original was made before i got my laptop)
Title: Re: Castle Storm II
Post by: TIfanx1999 on January 18, 2010, 11:33:44 pm
My first thought was that it might've been a calc project too. The latest forum activity box doesn't show where the topic is posted. XD I'd have to agree that it would be nice to have both games included in the finished zip.
Title: Re: Castle Storm II
Post by: Builderboy on January 18, 2010, 11:40:12 pm
Yeah, I'll upload Castle Storm 1 soon, and then when Castle Story II is finished, I'll put them together maybe :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 18, 2010, 11:43:50 pm
Yeah, If you download the Jar file you should be able to play it just like an exe.  I am doing a lot of experimentation with the robot class though, so just let me know if anything goes funky with the mouse.
Oh that's why I was asking, because mouse actually does nothing at all in jar format. clicking run does nothing at all either. It asked me to drag the mouse from center to top-left and nothing happened either after I released the mouse. Basically I had to play it from the Greenfoot website. Also, you may want to add a guide in the center for mouse calibration, because it is pretty hard to figure out at which pixel the center is exactly. It might be a good idea in the future to not force people to have to calibrate the mouse either.

The latest forum activity box doesn't show where the topic is posted.

I depends which box, though. The one on main page is like on the old board, it doesn't show the forum in which it was posted since it would make it too large, but the one on board index does.
Title: Re: Castle Storm II
Post by: Builderboy on January 18, 2010, 11:53:59 pm
It doesn't work?  Hmmm.  You actually only need to click inside the window for calibration to work, it doesn't need to be in the center.  Also calibration is 100% necessary to get the mouse control to work, there is no way around it unfortunately. :(

Were you clicking in the center of the window, or in the center of the screen?

The game should start automaticaly, so you shouldn't need to press start.  Does the button say start or pause?
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 12:02:31 am
In the center of the window, and no luck. Button said Run
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 12:04:38 am
Mmmm thats why, it is paused.  Try pressing re-set.  If the button doesn't say Pause, press it and then try again.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 12:06:25 am
I did, then i reloaded page, then even went like clicking the button like 10 times and it would get stuck to run. Nothing would start at all. Reset would reset the game, but would not fix the run button either.
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 12:09:39 am
Hmmm, let me try to reupload it.  I've seen this problem happen to me before, but a reset usually fixed it.  What does the screen say?
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 12:10:08 am
it just gets stuck on the mouse calibration instructions
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 12:15:08 am
Hmmm, well I re uploaded the game, i think it will work.  If not, I will have to do some more research...
Title: Re: Castle Storm II
Post by: bwang on January 19, 2010, 01:18:22 am
Impressive!
How does it work? Do you raycast the vertical walls and then draw in the tops of the boxes?
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 01:24:15 am
YES it worked!
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 01:39:18 am
Yay!  So note to self, trying to auto start messes with some computers.

And hi bwang.  That might have worked, except the walls are different heights and you can look up and down.  What I use I basicaly a rasterization with a matrix as the base.  It loops through the matrix, rendering the (at most) 3 polygons needed to display a tile.  1 for the tile itself (which does not need to be rendered if you are below the polygon) and then at most 2 edge polygons.  You can get an inside look into how the map is rendered by pressing z or x to see the map built row by row or tile by tile.

I was inspired a lot by the Doom engin, but scaled it back a bit from the binary space partitioning to matrices to make it both faster and easier to use. 
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 02:16:36 am
Btw, I think I noticed a glitch: I am not certainly sure if it happens this way, but when I am moving forward while constantly jumping like a kangoroo (i hold down the jump key), if I climb stairs or the like, I move incredibly fast, so much that once I think I ended up in a wall or outside the map and could no longer move/turn around. I think the game even crashed cuz reset/run would not respond either. Closing the window worked, though.
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 10:02:28 am
Yep, usualy happens when trying to jump on the waving floor section.  When the floor is just right, every frame you jump, there is a floor you can jump off of.  I though i was being clever in that when jumping and moving, you can move faster than normal, but it results in this unsightly problem :/ It'll be a simple fix.

(And I'm looking to make it that you can't kep jumping while just pressing space :P)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 01:25:51 pm
(yeah that might be a good idea, it tends to not look as professional otherwise :P)
Title: Re: Castle Storm II
Post by: Geekboy1011 on January 19, 2010, 01:38:45 pm
holycrap thats epic XD

i cant wait to see how this comes out in the end XD

(its epic when running at 15fps i cant imagain at 60 XD)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 01:41:38 pm
I don't really mind low FPS personally. Back when I was 17 I often played Unreal Tournament GOTY on a P2 350 MHz at 512x384 resolution at like 15-20 FPS at most. I get between 49 and 60 on Builderboy's game, though.
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 02:42:32 pm
Wow, you only get 15 fps?  I'm suprised because currently this game is running faster than most of my other 3d games.  On my laptop I can get up to 130 fps if I uncap the speed (currently it's capped at around 60, so your doing good dj) well I'm glad everybody is liking it :D

I'm currently thinking about how to get objects working...
Title: Re: Castle Storm II
Post by: Geekboy1011 on January 19, 2010, 02:45:24 pm
well im running it on a crappy computer that never really liked java to begin with so the fact that its running that well makes me happy XD(also i dont have a real graphics card eaither stupid dell integrated graphics "controller" :/)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 02:52:50 pm
I hate how many new prebuild computers still comes with these kind of cards. Often they are the cards that are supported the least longer by games
Title: Re: Castle Storm II
Post by: Eeems on January 19, 2010, 02:55:51 pm
I'm running it fine on my comp, it's hovering around 60 FPS. I really like it, I wish we could do something like this on the calc...
Title: Re: Castle Storm II
Post by: calc84maniac on January 19, 2010, 02:56:32 pm
I'm running it fine on my comp, it's hovering around 60 FPS. I really like it, I wish we could do something like this on the calc...
Just wait till I start a 3d engine on the Nspire :P
Title: Re: Castle Storm II
Post by: Eeems on January 19, 2010, 02:59:17 pm
lol :P
how about porting it to the 8x family after :P
or at least finishing your old one :P
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 03:02:37 pm
Well I actualy think something like this could be done on the nSpire.  The algorithem is very efficient, only 4 trig functions per frame, and depth sorting is handled in a linear fassion that uses only nested for loops :) runs in linear time! :D. Hmmm, polygon cliping might pose a problem tho, and you would need a good polygon filler.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 03:36:15 pm
I'm running it fine on my comp, it's hovering around 60 FPS. I really like it, I wish we could do something like this on the calc...
Just wait till I start a 3d engine on the Nspire :P
YES!
Title: Re: Castle Storm II
Post by: ztrumpet on January 19, 2010, 04:20:35 pm
*Thud!*
(The sound of my jaw hitting the desk)

I just tried this and I am in awe!  Wow!  It looks great!
I'm getting 61fps by the way.
Title: Re: Castle Storm II
Post by: Geekboy1011 on January 19, 2010, 04:22:12 pm
yeah its just my sucky computer thats all   its like almost 10 years old now maby more X.x
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 04:24:08 pm
Hehee ;D

Yeah, i think most will be getting around 61 FPS, as that is where i have it capped.  Unless your computer hates java like Geekboy :P
Title: Re: Castle Storm II
Post by: Builderboy on January 19, 2010, 10:56:07 pm
Alright, so I have a first version where objects are supported.  Objects are 3D objects, but are not rendered at the same time as terrain, because they are rendered in a different manner, so occlusion is difficult x.x It works most of the time in this new scenario, but there are some times where it fails.  I'm working on the problem now.

So i have updated the Jar file, and updated the Gallery!  Color is also now supported, so woot!
Title: Re: Castle Storm II
Post by: JCW on January 19, 2010, 11:05:04 pm
Incredible work!
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 19, 2010, 11:07:33 pm
Nice I will try new version soon :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 21, 2010, 09:44:48 am
Ok tried new version. Still glitchy now it seems. After calibrating, camera keeps moving up non stop even when moving mouse below. :/ It happens in both jar files uploaded.
Title: Re: Castle Storm II
Post by: Builderboy on January 21, 2010, 10:05:32 am
Hmmm, interesting.  The only cause I can think of as to why that would happen is if during calibration you didn't move your mouse to the very left top pixel?  Other than that, I am lost O.O Either that are your window was moved after calibration.  Hmmm, maybe the robot class doesn't work for all computers, or I am using it wrong.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 21, 2010, 05:46:30 pm
Wait so it needs to be moved exactly to the top left pixel? If that's the case this might be why then, but wish me luck to even be able to do such thing with precision x.x

I'll try again

EDIT: ok I realised what I was doing wrong: I had to drag cursor to the complete edge of the comp screen, not just the window x.x, my bad. It seemed to work afterward

EDIT: btw it is awesome ^^, I can't wait to see how it looks like with textures and stuff
Title: Re: Castle Storm II
Post by: ztrumpet on January 21, 2010, 06:11:38 pm
Awesome again!  I'm now getting 53 to 57 fps with spikes over 60.  But, that's with color. :)
Title: Re: Castle Storm II
Post by: Builderboy on January 21, 2010, 07:17:00 pm
Yay!  I had a feeling that might be what you were doing, the symptoms seemed familiar ;) Glad you got it to work!  As for textures, don't expect too much.  Most likely the most there will be is a checkerboard or striped floor tiles.  Textures are very hard to do fast in java, and with a new update I am preparing, it will double the amount of polygons to render.  But colors are here to stay! (Although they will be a bit more subtle :P)

And zTrumpet, thats great!  Although Color would never be a speed limiting issue :P
Title: Re: Castle Storm II
Post by: Builderboy on January 22, 2010, 04:06:27 pm
Alright, new and big update.  I have added ceilings!!  ;D Now there are things like tunnels and passegways and and upgrade to the physics engine to support the new data.  Frame Skip has also been implemented fully, and auto frame skip detection is underway.  Press 1 and 2 to increase and decrease the number of frames skipped.  You still use WASD to move, but now you can use C to crouch.  (Sorry, i wanted to use SHIFT or CTRL, but Greenfoot cannot detect these keys).
Title: Re: Castle Storm II
Post by: ztrumpet on January 22, 2010, 04:45:21 pm
Nice!  I like the passages.  Is it possible for two passages to cross over each other?

(I'm getting about 61 fps.)
Title: Re: Castle Storm II
Post by: Builderboy on January 22, 2010, 05:02:23 pm
No, every tile has a height for the floor and a height for the roof, so you can't have any 'bridges' or things that you can both walk over and under. 

And yay full fps! ^^
Title: Re: Castle Storm II
Post by: ztrumpet on January 22, 2010, 05:19:21 pm
Can you still have the moving platforms?
Title: Re: Castle Storm II
Post by: Builderboy on January 22, 2010, 05:31:46 pm
Yes, but only up and down.  Since it is tiles based, side to side is not possible.  (Unless I implement something dastardly tricky with objects O.O)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 22, 2010, 06:51:10 pm
cool to hear :), I hope you can add enemies and guns soon ^^
Title: Re: Castle Storm II
Post by: Eeems on January 22, 2010, 07:06:14 pm
well I finally tested it with mouse control, and I like it, though it does seem like you are a bit springy in it...and the camera control is a little bit jerky
Title: Re: Castle Storm II
Post by: Builderboy on January 22, 2010, 07:46:13 pm
What do you mean by Springy?  Like in the jumping?

And I am now working on smoothing the camera rotation out for you :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on January 22, 2010, 08:49:43 pm
tried new one. Are you planning to allow arrow keypresses for movement? I don't like having to move with ASDW :(, it makes it much harder to jump on small platforms x.x
Title: Re: Castle Storm II
Post by: Eeems on January 22, 2010, 09:47:21 pm
like when you jump there is a little bit of bounce
Title: Re: Castle Storm II
Post by: Builderboy on January 23, 2010, 01:52:58 am
Hmmm, I'm not sure what you mean, but I'll try to throw together some alternate control schemes and see which ones you like.

And Dj, in the finial version you will be able to specify control keys.  In the meantime though, i can implement WASD and arrows, but what key should be crouch that is close to the arrow keys?  I can't do shift or ctrl, Greenfoot doesn't have the support :(
Title: Re: Castle Storm II
Post by: ztrumpet on January 23, 2010, 07:40:32 am
Could you use 0 on the num pad?
Title: Re: Castle Storm II
Post by: Geekboy1011 on January 23, 2010, 10:42:53 am
or maby g as it is right where your hand lays when it i sin home row so it is not a very odd position :)   
Title: Re: Castle Storm II
Post by: Builderboy on January 23, 2010, 11:54:19 am
Possibly, let me check...
Title: Re: Castle Storm II
Post by: Builderboy on February 08, 2010, 07:26:20 pm
Alright, so after a couple weeks or wrestling around with code and concepts, I finaly have a workable occlusion system working!!  <(^.^<)  You may be confused, as there seemed to be a working one already, but it failed some other very basic tests when i put it under strain.  So now that i have a working occlusion system, I am working on sorting and organizing the thousands of lines of code that make this work.  Its quite a task, and I plan on doing some cleaning while i am at it, as well as adding some comments here and there.  After finishing in the variable object system, i will upload a new version to play with, and then start tackling weapons.  I have a working rayCast() method, so I am so far confident.
Title: Re: Castle Storm II
Post by: ztrumpet on February 08, 2010, 08:59:12 pm
Sounds cool!  I can't wait for you to update it! ;D
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 09, 2010, 02:25:38 am
No clue what is occlusion but cool to hear updates ^^
Title: Re: Castle Storm II
Post by: Builderboy on February 09, 2010, 10:14:27 am
Oh oops haha, forot to explain that XD.  It's where when an object, like an enemy, goes behind a wall, the wall looks like it's in front of the enemy, and you can't see all o the object because some of it is being covered by the wall.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 09, 2010, 12:48:45 pm
Oooh ok, I assume it's for enemies like ghosts, right?
Title: Re: Castle Storm II
Post by: Builderboy on February 10, 2010, 07:37:21 pm
Yeah, although i don't think there will be any ghosts in Castle Storm, I think more robots and stuff, easier to model XD

Speaking of modeling, I just wrote a script that converts Blender OBJ files into the format that my Object3D class uses, so now making 3D objects will be much much easier!  Before i had to type in every single vertex and connection by hand O.O and thats partially the reason that my models are so low detail, because it takes a looong time :P
Title: Re: Castle Storm II
Post by: Eeems on February 10, 2010, 08:36:46 pm
Yay for blender!
Title: Re: Castle Storm II
Post by: Builderboy on February 10, 2010, 08:39:26 pm
For a while there I had you shooting Suzanns XD (the blender monkey ;D) Unfortunately it does not support Color yet, I am working on it though.
Title: Re: Castle Storm II
Post by: Eeems on February 11, 2010, 12:01:59 am
Lol :p
well I can't wait to play this! Especially with blender stuff! If you want I could design something for you this weekend like an enemy or something. Btw, does it support smooth serfaces yet? Or no?
Title: Re: Castle Storm II
Post by: Builderboy on February 11, 2010, 12:26:48 am
It does not support smooth surfaces, nor will it ever, i'm sad to say :( Unfortunately Java just isn't fast enough (or I'm not knowledgeable enough :P) to do the proper shading.

As for enemies, it would be awesome if you could model some enemies!  I myself am horrible with modeling, so it would be great to get some help with that :) Just keep in mind that enemies will be machine based, and try to keep the polygon level pretty low, like from about 50 to 100 faces.  I will have to test out my engine a bit more though before i can decide on how many polygons it will be able to support.  I haven't done any optimising yet so i'm sure there is some hidden speed in there somewhere ;D
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 11, 2010, 12:41:53 am
nice does it means  some forms of textures might be supported eventually?
/me also wonders when next version will be avaliable to test
Title: Re: Castle Storm II
Post by: Eeems on February 11, 2010, 12:50:06 am
Ah ok :/
I'll need some ideas on what to do though.
I'm ok at modeling, but I can only do the more basic stuff, so tat should be good for machine based stuff.
Title: Re: Castle Storm II
Post by: Builderboy on February 11, 2010, 01:02:51 am
nice does it means  some forms of textures might be supported eventually?
/me also wonders when next version will be avaliable to test

Textures will not ever be supported unless I find some sort of unknow exploit or pixel plotting code that I was unaware of.  Anything further than plain polygons unfortunately means i have to plot pixel by pixel, which is just too slow for Java.  The most I think i will ever be able to do is simple things like Tile floors, since that is simple vector textures.

And the new version will be released as soon as I get the multi-Object system all sorted out so you can shoot your gun ^^

Ah ok :/
I'll need some ideas on what to do though.
I'm ok at modeling, but I can only do the more basic stuff, so tat should be good for machine based stuff.

Hmmmm lets see...  I know for sure I want to bring back the floating orbish robots that shoot lazers at you.  Perhaps also robots with kind of treads or something?  Hmm i'll have to do some brainstorming.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 11, 2010, 01:36:14 am
Aaah ok, I can't wait to start shooting stuff tho ^^
Title: Re: Castle Storm II
Post by: Builderboy on February 11, 2010, 03:59:03 am
And there will be plenty to shoot with in the final version >:D so far I'm planning pistol, shotgun, machine gun, rocket launcher, grenades (trip/satchel/frag), and maybe other high tech guns that shoot lasers or plasmas or whatever.

Mmm Eeems I just realized you could also try your hand at guns if you wanted :)
Title: Re: Castle Storm II
Post by: Eeems on February 11, 2010, 09:21:05 am
Hmm, ok..well just get me a list and I'll try my best.
Title: Re: Castle Storm II
Post by: Builderboy on February 13, 2010, 01:52:03 am
Ok bad news, I am stuck up at our vacation house away from any computer which means the only work I can do on this at all is cnceptual :( the soonest I can get out the new version would be moneday x.x
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 13, 2010, 02:09:00 am
ouch I hope you can resume work afterward. Does it means more serenity progress, tho?
Title: Re: Castle Storm II
Post by: Builderboy on February 13, 2010, 02:17:44 am
No calc either :( my parents get suspicious if I bring a calc when I have no homework XD
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 13, 2010, 02:45:35 am
x.x
Title: Re: Castle Storm II
Post by: Builderboy on February 18, 2010, 08:35:35 pm
Alright, the update you've all been waiting for!  Guns are now supported (Pistol only for now until I get some more models ;) ) and i have implemented a primitive form of object display.  Occlusion is at 100% for objects, but only for whole number positions, so no enemies yet.  It will be a few more days until i get in my Object Clipping routine for all objects.

For now, run around and shoot these little colored spheres out of your gun, and Press R to 'reload' (just an animation right now)
The non-mouse look code version has also been ramped up a little bit to be more playable.  It sports a gun-look feature that also allows you to look up and down.

(http://i199.photobucket.com/albums/aa72/builderboy2005/NewBitmapImage3.jpg)
Title: Re: Castle Storm II
Post by: Eeems on February 18, 2010, 08:36:38 pm
wow looks amazing!!! hmm, I wish I had the time to model some stuff for you.

hmm, I like how the mouse works now online, but I was wondering... could you change the control setup a bit? I would like to be able to strafe and to look with the mouse.
Title: Re: Castle Storm II
Post by: Builderboy on February 18, 2010, 08:41:54 pm
Look left and right you mean?  Hmmm I'm not sure how i could get that to work, unless you mean that when your mouse is on the right side of the screen you turn right and vica versa?
Title: Re: Castle Storm II
Post by: Eeems on February 18, 2010, 08:54:57 pm
hmm, umm, that would be hard to play with, I was thinking like you had before.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 18, 2010, 08:55:18 pm
oooh nice! However, I was wondering: can this engine support 2D images? If so, you could maybe use them for enemies, like in Doom or Wolfeinstein if the game starts running slow with too many 3D models in game. Otherwise I like it so far, can,t wait to try it :)

EDIT: Nice ^^ I can't wait to actually shoot stuff
Title: Re: Castle Storm II
Post by: TIfanx1999 on February 18, 2010, 09:07:09 pm
That's lookin really sweet dude! Keep up the excellent work!
Title: Re: Castle Storm II
Post by: ztrumpet on February 18, 2010, 09:08:29 pm
Awesome!  This looks really great!  Excellent job! :)
I can't wait to see more. ;D
Title: Re: Castle Storm II
Post by: Builderboy on February 18, 2010, 09:52:03 pm
Hehe thankz guys :)

hmm, umm, that would be hard to play with, I was thinking like you had before.

Well in what i had before the mouse did nothing at all O.o So i don't know what you mean.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 18, 2010, 09:52:57 pm
I think he wants to eat nethams
Title: Re: Castle Storm II
Post by: Eeems on February 18, 2010, 09:58:24 pm
Hmm? Well I thought you could look around with the mouse?
Title: Re: Castle Storm II
Post by: ztrumpet on February 18, 2010, 09:59:28 pm
Hmm? Well I thought you could look around with the mouse?
I could. Hmm...
Title: Re: Castle Storm II
Post by: Builderboy on February 18, 2010, 10:16:36 pm
Well that was in the Mouse-Look version.  There are two modes of play, mouse Look and Gun-Look.  Mouse-Look is not supported in browser, so thats why Gun-look was created in the first place.  Don'y worry, mouse look is still supported, you just need to download the Jar file.

(unless it is broken??? :O)
Title: Re: Castle Storm II
Post by: Eeems on February 18, 2010, 10:39:16 pm
Ah ok...hmm how about adding strafing to the browser version? I kind of miss it.
Title: Re: Castle Storm II
Post by: Builderboy on February 18, 2010, 11:13:37 pm
Oh yeah, good idea, I work with the Mouse-only version almost exclusively so I kind of forgot ;D
Title: Re: Castle Storm II
Post by: Eeems on February 18, 2010, 11:42:38 pm
Ah ok lol :p
well it's shaping up nicely though!
Title: Re: Castle Storm II
Post by: Builderboy on February 19, 2010, 12:21:33 pm
oooh nice! However, I was wondering: can this engine support 2D images? If so, you could maybe use them for enemies, like in Doom or Wolfeinstein if the game starts running slow with too many 3D models in game. Otherwise I like it so far, can,t wait to try it :)

Well actually the ironic thing is that I originally was going to use 2D images in the game, like in the original Castle Storm, but I quickly ran into problems.  In Doom you couldn't look up or down, you only had to have images of enemies that were straight on.  But since in Castle Storm 2 you can look around each enemy would have to have over 30 images to get smooth and good looking enemies.  I also recently figured out that scaling and displaying an image is actually slower than rendering and displaying a 3D object O.o You might have noticed slowdowns in Castle Storm 1 when there were a lot of enemies on the screen (and by a lot i mean 6).  With this new 3D system I can support much much more, and It also fits with the style of the game.  I had an early version with a 2D gun and a primitive non-rotaing enemy image.  Not only was occlusion almost impossible to fix, but the style didn't look right.  Here we had a map that was solid and plain colors, and then we have a fully textured gun and enemy.  It just didn't look right.    

Ha i guess i kinda went off on a rant, well there were many factors influencing my decision, but ultimately 3D objects are superior to 2D in most every way.  Speed, Occlusion, Rotational Smoothness, and style :)

EDIT: And in a fun fact related change of subject, I just counted them all up, and I currently have over 2000 lines of code :O
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 19, 2010, 02:49:03 pm
Wow interesting XD, this is strange how 3D can be sometimes XD, oh well I guess you will have to go for 3D then :P
Title: Re: Castle Storm II
Post by: ztrumpet on February 19, 2010, 09:53:32 pm
Awesome!  200 lines-Nice!  I can't wait to see enemies. ;D
Title: Re: Castle Storm II
Post by: DJ Omnimaga on February 21, 2010, 05:46:51 am
Since this appears to be a project that'll be going on for a while, I created you a subforum for it Builderboy.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 09, 2010, 04:27:57 am
I hope creating a sub-forum for the project didn't killed it... D:
Title: Re: Castle Storm II
Post by: Builderboy on March 09, 2010, 10:29:48 pm
 * Builderboy runs his hands through his hair *

The sad thing is that I have been working on this really really hard, but occlusion is seemingly impossible to get right.  Every time i find a solution i think works, i find something wrong with it.  And i'm starting to run out of ideas :(
Title: Re: Castle Storm II
Post by: bwang on March 09, 2010, 10:36:16 pm
What cases don't work right now?
Title: Re: Castle Storm II
Post by: Builderboy on March 09, 2010, 10:41:22 pm
Right now with the system I am using, when the object is over 4 tiles at once (over the corner where they meet) then any raised tile 2 spaces to either the right or left of the object perpendicular to the ray of the camera are clipped by the tiles behind them D:
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 09, 2010, 11:01:11 pm
that sucks x.x

Did you ask on other forums as well? Maybe some people on Greenfoot might be able to help, or general java sites?

Otherwise there might be some ppl here who could, if you posted the source
Title: Re: Castle Storm II
Post by: Builderboy on March 09, 2010, 11:05:57 pm
Mmm good idea, although greenfoot is kinda dead right now anyway :P We even got our first Troll!!!! ;D

I'll post a link to the source in a sec, although its rather large D:
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 09, 2010, 11:41:38 pm
Ouch x.x I hope he did not kill the community x.x

Title: Re: Castle Storm II
Post by: Builderboy on March 09, 2010, 11:44:49 pm
Haha no, he/she was a very laughable troll.  More like a n00b if anything else XD.  And i quote...

DIS GAYM IS TO HARD I DONT EVEN WAWTAR DRIP ON WAWL
HOW DO I SHOT WEB?
R U A REEL AVATORZ?
SUMTIEMZ I WISH I WAZ A DRAGAWNZ IN REEL LYF BUT I R HAPY WIT BEEN A CAT
I LIKEZ DIS GAYM IT MADE ME HAZ FUNZ WYL I PLAYD ITZ. GURLZ HAZ KUTIZE. MI FREND WAWNTS M
I WAZ A SUPAR SAIYAN IRL 1 TIEMZ I LUKED IN THE MEERER N I STARTED SKREEMNG THEN MY HAIR GOT ALL YELOWZ

* Builderboy Facepalms *
Title: Re: Castle Storm II
Post by: bwang on March 09, 2010, 11:46:46 pm
lol, definitely a n00b!
Title: Re: Castle Storm II
Post by: ztrumpet on March 10, 2010, 04:03:53 pm
Woah...

Good luck! I don't know how to help you, but maybe a cookie will help...
 *ZTrumpet hands Builderboy a cookie...
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 10, 2010, 10:54:15 pm
wow... to me it almost seems like it was written this way on purpose or using a generator, because even n00bs won't write this bad XD
Title: Re: Castle Storm II
Post by: Builderboy on March 10, 2010, 11:01:19 pm
And then there is a single coherent sentence on Castle Storm that is completely different than the rest ;D Lol so weird...
Title: Re: Castle Storm II
Post by: Hot_Dog on March 21, 2010, 10:55:00 am
Does Java support 3d textures?  If so, are you just implementing them later?
Title: Re: Castle Storm II
Post by: Builderboy on March 21, 2010, 11:00:02 am
Well, there is a Java3D API, but i am not using it for this game, as it involves interesting and confusing things like harware acceleration and other quirks that would break Greenfoot compatability.  This game is being written from scratch with only a polygon filler, and thats it.  ANd as such, textures are unfortunately out of the question for speed reasons :P
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 21, 2010, 02:06:57 pm
Did you thought about ditching Greenfoot completly? Some people sees using such things as a bad practice compared to writing all your routines yourself. I personally don't care how a game is ran, but it seems like Greenfoot is pretty limited, like the lack of texture support, maybe it might be best to move to straight Java?
Title: Re: Castle Storm II
Post by: Builderboy on March 21, 2010, 02:32:17 pm
It is straight java, Java3D is something separate from Java but with integration.

Besides, what if i told you to switch to assembly for the calculator because it was faster ;)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on March 21, 2010, 02:35:19 pm
Oh ok, I thought it was some sort of game making library with bloated code. I personally don't care how something is made, I just was curious if there were alternatives.

And it was just a suggestion, I didn't do like some people did with me and tell you to learn ASM every few post. I only told it once... sorry but I had to rate your post down because it was kinda provocative
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 03:01:15 pm
IT WORKS!  I Am One Can Short Of A Six Pack!!

In other news I have gotten together a kinda working demo Level for Castle Storm :) I have been working on it in secret for a while, as it is my school project ^^ The demo is definetaly not bug free, as there are display glitches, slowdowns, and even physics errors.  I got it to work in a Jar file after much hitting with a hammer, and I am proud to present the Beta for the first 4th of the 1st Level for Castle Storm :) Haha its very small, and you have no gun, have fun ;)

The new version can be found on the first page of this thread.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 03:11:00 pm
Nice ^^ I'm glad this is still alive. Can we kill stuff now?

Also I cannot find the download on website front page. I checked the download section for latest files and no Castle Storm II x.x
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 03:13:45 pm
Ooh whoops, i meant to say first.  The first page of this Thread ::)

Oh, and no killing stuff yet :P you dont get a weapon until he end of the first Level.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 03:30:00 pm
oooh ok lol thanks for claryfing :P

gonna download now :)
Title: Re: Castle Storm II
Post by: {AP} on April 18, 2010, 03:43:36 pm
I destroyed the lasers and got to a dead end so I assume that means I win, right? =)
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 03:45:27 pm
Haha yep you got as far as i had completed :)  Told you it was small :P
Title: Re: Castle Storm II
Post by: {AP} on April 18, 2010, 03:53:47 pm
Oh, and thanks for including crouch-jump. =D
It was hard to get it working, but it made it to where I didn't have to restart to see the rest of the level.
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 03:59:17 pm
Ooooh you be a cheater ;) Heh yeah i actually didn't put that in on purpose, it just naturally happened when i implemented crouching.  Its nice for testing levels tho, I can move with great speed ^^
Title: Re: Castle Storm II
Post by: {AP} on April 18, 2010, 04:03:13 pm
I just love finding every exploit I can in games. ;P

Makes me a great beta tester. ^^
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 04:05:46 pm
Ok tried it and made a video, nice so far except maybe a bug I run into at first XD

I assume LV2 is where we'll start killing everything that moves, right?

Btw I like the Doom feel of this. At the same time it reminds me old Super FX SNES games. I think if it's possible to make it run full screen, you should use a 320x240 resolution for old-skoolness :P

http://xlib.mtv-music-generator.com/castlestorm2.wmv
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 04:32:02 pm
Yep, thats the physics bug that I am trying to fix.  It was introduced when i made celings, but i'm still not quite sure how it happens.  I'll be looking into it :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 04:40:42 pm
Oh well, at least it allowed me to go explores some out-of-reach rooms like the green ones :D (altough it took a while to get used to movement on ceilings since it was backwards :P)
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 04:46:59 pm
Haha yay glitches.  DJ you silly goose, escaping to unfinished areas :P Haha for future reference, those are areas where you will have to avoid enemies, so you can get to know them before you have to fight them.  There is also a puzzle room involving platforms ^^
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 05:21:01 pm
Interesting, I assume you won't get the gun until you finished, tho? It would be fun to have a level part where you must escape enemies without being able to kill them.
Title: Re: Castle Storm II
Post by: meishe91 on April 18, 2010, 05:50:05 pm
That's really cool! What does pressing "V" do? Because it like renders the whole scene out when I do. Wasn't sure if that's supposed to happen. Anyways, great work on this :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 06:33:10 pm
It seems to render the scene slower block by block or something. X does the same thing but faster

Btw the glitch about going on ceilings is extremly hard to recreate now. I must have been lucky. Good luck builderboy fixing it x.x
Title: Re: Castle Storm II
Post by: meishe91 on April 18, 2010, 06:35:01 pm
How do you even activate that glitch? I couldn't figure it out.

By the way, did you mean "Z?" "X" didn't do it but "Z" did but that could just be me.
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 06:38:11 pm
Go near that part where you crouch to go in a small path but try jumping in front without crouching, over and over, trying to move forward walls like if you wanted to jump through the ceiling. The reason why it's hard to recreate is because when on the roof, movement keys are inverted, so the picosecond you land on the roof, you fall back down.
Title: Re: Castle Storm II
Post by: meishe91 on April 18, 2010, 06:39:35 pm
Hmmm ok, I shall try that.
Title: Re: Castle Storm II
Post by: Builderboy on April 18, 2010, 08:42:23 pm
Okay i am going to rewrite the physics code.  It was originally written for the engine that only had a floor and no roof, and then when i added roofs, i tacked on a little piece to the code, and didn't fully update it, so now i will be going on a full revamp.  get rid of these silly bugs :P
Title: Re: Castle Storm II
Post by: meishe91 on April 18, 2010, 08:50:25 pm
Sounds good. Good luck with the revamping :)
Title: Re: Castle Storm II
Post by: DJ Omnimaga on April 18, 2010, 09:09:31 pm
Okay i am going to rewrite the physics code.  It was originally written for the engine that only had a floor and no roof, and then when i added roofs, i tacked on a little piece to the code, and didn't fully update it, so now i will be going on a full revamp.  get rid of these silly bugs :P
cool to hear ^^
Title: Re: Castle Storm II
Post by: code241 on May 09, 2010, 12:14:27 pm
That's a pretty good game made from java.