Maidens of the Kaleidoscope

~Hakurei Shrine~ => Rika and Nitori's Garage Experiments => Topic started by: anonl on July 17, 2010, 10:38:00 AM

Title: Danmaku Time (shmup engine) [v1.2] (update: 2010-08-19)
Post by: anonl on July 17, 2010, 10:38:00 AM
Shmup engine, created from scratch in a week. Released: July 25th 2010

Updates via twitter:
@danmakutime (http://twitter.com/danmakutime)

==Download==

v1.2 released:
DOWNLOAD (http://code.google.com/p/danmakutime/downloads/list) | Manual (http://code.google.com/p/danmakutime/wiki/Manual)

You need to install Java 6 (http://java.com) if you don't have it already.

==Technical Info==

Programming language: Java (J2SE 6)
Scripting Language: Lua (LuaJ-1.0.3)
Rendering: OpenGL (JOGL)
Image format: PNG
Audio format: Ogg Vorbis
Title: Re: Danmaku Time (new shmup engine)
Post by: KomeijiKoishi on July 17, 2010, 10:41:33 AM
How 'bout finishing Touhou DS first?

But nice to see something like this anyway.
Title: Re: Danmaku Time (new shmup engine)
Post by: Dizzy H. "Muffin" Muffin on July 17, 2010, 09:33:09 PM
Heh. Okay, good luck. Is it going to be open-source?
Title: Re: Danmaku Time (new shmup engine)
Post by: Stuffman on July 17, 2010, 10:52:11 PM
Ew, java.

Well if it can keep a decent framerate I won't complain.
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 18, 2010, 07:24:50 AM
Heh. Okay, good luck. Is it going to be open-source?
yes (http://code.google.com/p/danmakutime/)

Title: Re: Danmaku Time (new shmup engine)
Post by: Demonbman on July 18, 2010, 07:27:45 AM
I'm up for testing this if its ok with ya.
Title: Re: Danmaku Time (new shmup engine)
Post by: P♂ zeal on July 18, 2010, 01:39:43 PM
it'd be nice if you'd program in the BGM pausing when you pause, so if people want music sync in a level/spellcard  it doesnt get ruined it they pause.
Title: Re: Danmaku Time (new shmup engine)
Post by: Dizzy H. "Muffin" Muffin on July 18, 2010, 08:09:37 PM
it'd be nice if you'd program in the BGM pausing when you pause, so if people want music sync in a level/spellcard  it doesnt get ruined it they pause.
This. Harder than diamond.
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 19, 2010, 10:04:50 AM
10000 bullet render test: http://www.youtube.com/watch?v=47A9ZO7FvBM (http://www.youtube.com/watch?v=47A9ZO7FvBM)

Of course there's hardly any scripting, no collision detection, etc. but right now I'm happy with the performance.

EDIT: Working on the player script now. I'm in need of some default graphics/music/sound that's not ripped from a commercial game.
Title: Re: Danmaku Time (new shmup engine)
Post by: Dizzy H. "Muffin" Muffin on July 19, 2010, 08:24:42 PM
At this stage of the game you can probably get away with just drawing little triangles. Also, http://www.freesound.org/
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 20, 2010, 05:19:11 PM
it'd be nice if you'd program in the BGM pausing when you pause, so if people want music sync in a level/spellcard  it doesnt get ruined it they pause.
done :)

Working on the rest of the audio code now.

EDIT: audio code finished
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 21, 2010, 08:50:47 PM
Collision detection & handling implemented  :toot:

Day 3 progress video (http://www.youtube.com/watch?v=SS9MUbnj2Qg)

EDIT: Day 4 finished
- Collision detection bug fixes
- New collision node types: line segment & axis-aligned rectangle
- Advanced text rendering (fontName,fontStyle,fontSize,color,anchor,outlineColor,outlineSize,underline)
- Hitbox displays when focused
- Enemies can drop items
- Enemies explode
- Graze counter

Day 4 progress video (http://www.youtube.com/watch?v=CQmyOrJl1hk)

Title: Re: Danmaku Time (new shmup engine)
Post by: Dizzy H. "Muffin" Muffin on July 23, 2010, 04:15:43 AM
Okay, about hitboxes and the like -- How much of this is customizable?
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 23, 2010, 06:32:23 AM
Okay, about hitboxes and the like -- How much of this is customizable?
Pretty much everything.

You first define a number of collision types, and which of these types collide with which others:
Code: (lua) [Select]
    --Setup collision matrix
    local colMatrix = ColMatrix.new()
    playerColType = colMatrix:newColType()
    playerGrazeColType = colMatrix:newColType()
    playerItemColType = colMatrix:newColType()
    playerShotColType = colMatrix:newColType()
    itemColType = colMatrix:newColType()
    enemyColType = colMatrix:newColType()
    enemyShotColType = colMatrix:newColType()

    --player gets collision events from enemyColType and enemyShotColType
    colMatrix:setColliding(playerColType, enemyColType)
    colMatrix:setColliding(playerColType, enemyShotColType)

    --player graze gets collision events from enemyColType and enemyShotColType
    colMatrix:setColliding(playerGrazeColType, enemyColType)
    colMatrix:setColliding(playerGrazeColType, enemyShotColType)

    --item gets collision events from hitting the player's item hitbox
    colMatrix:setColliding(itemColType, playerItemColType)

    --player shots and enemies both get collision events from hitting each other
    colMatrix:setColliding2(playerShotColType, enemyColType)

(Note that setColliding doesn't necessarily give both objects collision events, it only passes events to the first argument of the function. setColliding2 changes the colMatrix so both objects get events.)

Then you just add the kinds of nodes you want to your objects:

Code: (lua) [Select]
    --main player hitbox: a circle with radius 2.0
    player:setColNode(0, playerColType, CircleColNode.new(2.0))
    --player graze hitbox: a circle with radius 10.0
    player:setColNode(1, playerGrazeColType, CircleColNode.new(10.0))
    --player item pickup hitbox: a rectangle with relative position (-12, -20) and size (24, 40)
    player:setColNode(2, playerItemColType, RectColNode.new(-12, -20, 24, 40))
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 23, 2010, 09:22:16 PM
Day 5 finished:
- Title screen / main menu
- Items (point/power/bomb/life/fullRestore)
- Item autocollect line
- Boss characters with spellcards and lifebar

Day 5 progress video (http://www.youtube.com/watch?v=8jmLz1pZxVg)
Title: Re: Danmaku Time (new shmup engine)
Post by: GenericTouhouFailure on July 23, 2010, 11:38:44 PM
Holyhellthisisfast.png
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 24, 2010, 09:03:41 PM
Day 6 finished:
- global reset (for restart game & return to title options)
- player invincible for a short time after getting hit
- boss indicator sprite
- pause function is now scriptable
- sound engine changeable from config file (choose between hard sync and smooth playback)
- scrolling backgrounds
- boss dialog

Day 6 progress video (http://www.youtube.com/watch?v=WXx0adViFcs)
Title: Re: Danmaku Time (new shmup engine)
Post by: Lord Phantasm Satori on July 25, 2010, 02:04:35 AM
holy crap! I guess you aren't the procrastinating type. what language is it in?
Title: Re: Danmaku Time (new shmup engine)
Post by: Tengukami on July 25, 2010, 02:07:11 AM
holy crap! I guess you aren't the procrastinating type. what language is it in?

http://code.google.com/p/danmakutime/
Title: Re: Danmaku Time (new shmup engine)
Post by: GenericTouhouFailure on July 25, 2010, 02:16:59 AM
Mac support. You have it?
If not will it run in crossover or something?
if yes ilu
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 25, 2010, 06:49:09 AM
Mac support. You have it?
Yes, native support. (Though there may be mac-specific bugs as I don't have a mac to test on)
Title: Re: Danmaku Time (new shmup engine)
Post by: Lord Phantasm Satori on July 25, 2010, 08:09:30 AM
F**K YEAH! I actually KNOW JavaScript... (unless Java and JavaScript are two different things :()
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 25, 2010, 08:22:28 AM
F**K YEAH! I actually KNOW JavaScript... (unless Java and JavaScript are two different things :()
Javascript == ECMAscript
It's made to look like Java, but it's completely different.

I used Lua for scripting which is much more like Javascript than Java is.
Title: Re: Danmaku Time (new shmup engine)
Post by: GenericTouhouFailure on July 25, 2010, 10:46:43 AM
Yes, native support. (Though there may be mac-specific bugs as I don't have a mac to test on)
ohgod *gets ready to do shit*
Title: Re: Danmaku Time (new shmup engine)
Post by: anonl on July 25, 2010, 04:34:47 PM
v1.0 Beta released:
Downloads (http://code.google.com/p/danmakutime/downloads/list)
Scripting manual (http://code.google.com/p/danmakutime/wiki/Manual)

You need to install Java 6 (http://java.com) if you don't have it already.
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: Dizzy H. "Muffin" Muffin on July 25, 2010, 08:09:44 PM
Hmm. Possible bug: when you go above the POC, and then go below it before you've collected all the items, they stop being attracted towards you.

Also, sound isn't working on Windows 7 x64 ...
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: anonl on July 25, 2010, 08:59:57 PM
Hmm. Possible bug: when you go above the POC, and then go below it before you've collected all the items, they stop being attracted towards you.
It's easily changed, I honestly didn't realize that Touhou does it differently.


Also, sound isn't working on Windows 7 x64 ...
Probably related to there being no sound :D

I commented out this line in script/main.lua:
Code: [Select]
soundEngine:setBGM("bgm/bgm01.ogg")...which is the only sound I was using... If you remove the '--' prefix from the script file, you should at least get some background music.
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: Dizzy H. "Muffin" Muffin on July 25, 2010, 09:07:09 PM
Yeah, in the Windows games, once an item has started becoming attracted to the player, it doesn't stop until the player either collects it or dies.

And yeah, that would explain it. |3

How customizable are things like size/position of the playing field? Any plans for things like being able to "pack" a game all into one file so it's harder for people to hax it? What about storing dialogue and other text in separate text-files for ease of translation?
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: DDRMANIAC007 on July 25, 2010, 09:43:53 PM
It says to put scripts in scripts. (Which doesn't exist)
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: Lord Phantasm Satori on July 26, 2010, 06:04:06 AM
Will there be a way to pack stuff in a way so that downloaders won't need the engine?
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: GenericTouhouFailure on July 26, 2010, 09:18:41 AM
How do i run this in mac?

Edit :
java -jar Danmakutime.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
wut

Edit2: Attached some Ha ha, old chap! ogg music if people are too lazy. It loops perfectly in audacity
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: anonl on July 26, 2010, 10:14:03 AM
It says to put scripts in scripts. (Which doesn't exist)
The who, the what, the where now?

Will there be a way to pack stuff in a way so that downloaders won't need the engine?
I'm not sure what you mean... Do you want every download to contain a copy of the engine so it's self-contained, or do you not want to add the engine to reduce download size. Both are possible, and the default is to always include a copy of the engine (the engine is under 3MB compressed).

How do i run this in mac?

Edit :
java -jar Danmakutime.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
Run the "run-mac64.sh" shell script. The error message means your Java version is too old to run the code, you need to upgrade to Java 6.
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: Lord Phantasm Satori on July 26, 2010, 09:58:23 PM
you know how you would download a game and it says "powered by the (name here) engine" yet you do not need to have the engine to play it? That's what I mean. I think you can't do that with danmakufu.
Title: Re: Danmaku Time (new shmup engine) [v1.0beta released]
Post by: anonl on August 03, 2010, 12:03:07 PM
New release (v1.1):

DOWNLOAD (http://code.google.com/p/danmakutime/downloads/list) | Manual (http://code.google.com/p/danmakutime/wiki/Manual)
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: DDRMANIAC007 on August 03, 2010, 10:14:37 PM
Is there supposed to be a boss?
Also there's still no script folder.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: anonl on August 04, 2010, 12:40:12 AM
Is there supposed to be a boss?
Not really. I haven't made any real content yet, but you can press B, L and D to access my Boss, Laser and Dialog tests.

Also there's still no script folder.
res/script
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Lord Phantasm Satori on August 04, 2010, 01:07:33 AM
I never got my question answered.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Naut on August 04, 2010, 03:20:58 AM
I never got my question answered.

He answered your question. The engine exports games in .exe and .jar formats.



I'll have to dabble around in this engine a bit, looks powerful (especially with that multiplayer support), but I don't really understand the language that well. Like I said, dabbling will be done.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Sejha on August 09, 2010, 06:40:04 PM
I found there to be a little bit tooo much lag.
Perhaps it's just my machine, but even running the resolution at at 320X240, I was still unable to properly run the program.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Dizzy H. "Muffin" Muffin on August 10, 2010, 02:20:30 AM
What are your system specs?
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Sejha on August 10, 2010, 10:04:44 PM
What are your system specs?

I forget... lol.
It's oooooolllld though.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: Fujiwara no Mokou on August 14, 2010, 01:52:31 AM
This looks promising. I honestly prefer C+ but I'm open for java, if this engine is better.
Title: Re: Danmaku Time (shmup engine) [v1.1 released] (2010-08-03)
Post by: anonl on August 19, 2010, 11:56:31 AM
New release (v1.2):

(http://img825.imageshack.us/img825/8908/appletmodeeditor.th.png) (http://img825.imageshack.us/i/appletmodeeditor.png/)

DOWNLOAD (http://code.google.com/p/danmakutime/downloads/list) | Manual (http://code.google.com/p/danmakutime/wiki/Manual)
Title: Re: Danmaku Time (shmup engine) [v1.2] (update: 2010-08-19)
Post by: Suikama on August 19, 2010, 05:39:28 PM
For some reason the game doesn't appear in the actual game window, but rather it just shows on the top left corner of my screen :/
Title: Re: Danmaku Time (shmup engine) [v1.2] (update: 2010-08-19)
Post by: anonl on August 19, 2010, 06:38:44 PM
For some reason the game doesn't appear in the actual game window, but rather it just shows on the top left corner of my screen :/
That's... interesting. Are you using any special skins, docks, rainmeter etc.? Those kinds of applications can sometimes cause similar bugs. If it's not that, it'll be very hard for me to fix (a library I use is responsible for attaching the 3D view to the window).

You can put the game in fullscreen mode with Alt+Enter, which circumvents the problem.
Title: Re: Danmaku Time (shmup engine) [v1.2] (update: 2010-08-19)
Post by: Serina on August 21, 2010, 12:28:06 AM
That's a very good engine, really. You're doing a good job here!
But i'm having a problem in the 2-player mode, i can't control the two at the same time.
Anyway, really good
Title: Re: Danmaku Time (shmup engine) [v1.2] (update: 2010-08-19)
Post by: anonl on August 21, 2010, 08:06:04 AM
That's a very good engine, really. You're doing a good job here!
But i'm having a problem in the 2-player mode, i can't control the two at the same time.
Thanks.

You can't control both at the same time because of the way most keyboards work. The keys are connected to lanes and you can only press 2-3 keys on the same lane at the same time. You can try to change the player2 movement keys to WASD, and player1's fire/bomb/focus to Ctrl, Enter, Shift. Although on some keyboards even that doesn't work...