Daedalus - no escape

For sure I can do this : I will hardcode a set of “standard” resolutions that will be added to the available fullscreen resolutions in case windowed mode is selected. It’s quite easy so it will be done for the next demo :wink:

if you don’t mind me asking, how exactly are you managing particles, sprite rendering, UI and all that stuff.

Do you use swing?

If you peek at the little icon in the upper left of the window you’ll see he’s using LWJGL. Custom code from scratch I think.

sproingie is right, this is all custom code :slight_smile:

Particles + sprites are rendered the same way with a render batch mecanism:
sprites are registered in a RenderManager which contains RenderLayers. Each layer has a set of RenderBatches which contains the sprites. When a Sprite is registered in the RenderManager, it is placed in the appropriate RenderBatch depending on its texture, blending mode, Z index and so on …
Then the layers are rendered from bottom to top, and each RenderBatch is rendered with a VBO using indices. The VBO is updated only if needed (when a sprite moves, changes color …). Each frame, the indices are updated depending on the active Sprites.
The floor is rendered a bit differently using multitexturing and VBOs that are never updated, but it integrates in the same RenderLayer/RenderBatch mecanism.

The text is rendered using a modified slick-utils TrueTypeFont class.

For the UI (menus, buttons, inputs …) I did a small widget library based on the Composite pattern ( like all the widget libraries I think … :slight_smile: ). The rendering is very basic, it uses opengl glBegin glEnd calls … but this is fast enough so I didn’t took the time to optimize it ( and there’s a good chance that I never will :slight_smile: )

I know it is custom and it uses lwjgl.

I wanted to know how he was doing all the batching and UI because I am working on my own engine stuff.

Right now I got a very fast dynamic sprite batcher that just uses VA. I am still not sure on how I want to do layering/z depth stuff.

And well UI is scary

I wanted to use display lists for UI and background stuff.

How fast is your batching?

I just did a quick test, I get 60 fps with 25000 sprites with the same texture spreaded randomly in 4 layers (meaning 4 render batches).
My laptop is an intel core I7 2630QM with a GTX 260M. The sprite was 40x40, transparent, bouncing on the screen borders and the screen resolution was 1920x1080.

I don’t know where is the bottleneck here, for sure not the fill rate as I have the same FPS with a 60x60 sprite … :slight_smile:

I don’t know if this is fast or not but this is fast enough for my game as I hardly have more than 3000 sprites displayed at the same time :slight_smile:

Can’t wait for the update link ;D

These are almost exactly the same figures and specs I get in my “engine” so it’s good to know that I’m not trivially doing something stupid to make it slower!

Cas :slight_smile:

Yeah on my desktop it gets cpu limited at around 120k+ sprites at smaller sizes and rarely gets fillrate limited.

My laptop on the other hand uses nvidia’s shitty ass optimus tech which never uses the gpu ever! So I get to test everything on integrated graphics and the biggest bottle neck is being fill rate limited. Get 18-20fps at the same test you did. So I guess only thing I need to worry about is being fillrate limited.

Funny how most laptops cpus can handle quite a bit now but have such crappy gpus that it would almost be faster using some sort of software rendering.

oups, my mistake, my GPU is not a GTX 260M but a GTX 560M … which is quite a good GPU :slight_smile:

… but anyway it’s obvious that I’m CPU limited … I did a quick profiling, and it seems that I spend most of the time in matrix transformations ( here I do a rotate and translate for each sprite ) … so I don’t know how I can optimize this …

It’s looking really good, and runs smoothly here. Great work! It’s got some nice creepy atmosphere. I guess some sort of single-player / story mode could have good potential as well (though the multiplayer / vs bots mode is a blast as well). Good luck working on this!

And consider making a paid version once you got it a bit further, it’s that good :wink:

The game looks awesome! Great work man :slight_smile:

-Pickle

Wont run for me. :frowning: (On a Mac)

Regenuluz@Medusa ~/Downloads $ java -jar daedalus-0.1.8.jar 
[launcher] - terminate (true)

Java version:

Regenuluz@Medusa ~/Downloads $ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)

Graphics card -> Intel HD Graphics 3000 512 MB

@Grunnt and Pickleninja : thanks for your comment :wink:

@Regenuluz : can you please tell me if a file .shoot/0.1.4/err.log has been created in your home folder and copy paste the content here if it is the case ? Thanks :wink:

Geez, you’re poluting my home dir! xD

java.lang.RuntimeException: java.lang.UnsupportedOperationException: Cannot change display mode
        at com.deathpat.shoot.engine.display.WindowManager.init(WindowManager.java:69)
        at com.deathpat.shoot.engine.Engine.initElements(Engine.java:122)
        at com.deathpat.shoot.GameEngine.initElements(GameEngine.java:29)
        at com.deathpat.shoot.engine.Engine.init(Engine.java:89)
        at com.deathpat.shoot.Daedalus.<init>(Daedalus.java:38)
        at com.deathpat.shoot.Daedalus.main(Daedalus.java:29)
Caused by: java.lang.UnsupportedOperationException: Cannot change display mode
        at java.awt.GraphicsDevice.setDisplayMode(GraphicsDevice.java:421)
        at org.lwjgl.opengl.MacOSXFrame$1.run(MacOSXFrame.java:84)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.opengl.MacOSXFrame.<init>(MacOSXFrame.java:81)
        at org.lwjgl.opengl.MacOSXDisplay.createWindow(MacOSXDisplay.java:105)
        at org.lwjgl.opengl.Display.createWindow(Display.java:303)
        at org.lwjgl.opengl.Display.create(Display.java:845)
        at org.lwjgl.opengl.Display.create(Display.java:754)
        at com.deathpat.shoot.engine.display.WindowManager.init(WindowManager.java:65)
        ... 5 more

lol sorry for poluting your home dir ! But I have to save the user preferences somewhere :slight_smile:

About your issue, I’ve read on different forums that there is currently a problem with the LWJGL and java 7 on mac … so I’m afraid I can’t do anything for you, we need to wait for a fix in LWJGL.
The only workaround now would be to launch the game with java 6.

haha, no problem :stuck_out_tongue: I’d most likely do the same thing xD But yeah, I’ve heard something about lwjgl being broke on osx+java7. :slight_smile:

Yes, Java 7 broke it, and the fix is not easy. Apparently there is someone working on it on behalf of Mojang but we’ve not had any concrete news for a couple of weeks.

Cas :slight_smile:

Thanks for the update Cas :wink:

I’ve found the thread talking about it on LWJGL’s forum, here it is for those interested :

www.lwjgl.org/forum/index.php/topic,4711.30.html

EDIT : I had to put the url in a code box, otherwise it is transformed into something else … weird

I was playing a match against insane AIs and at the end of the match the score screen revealed that some bots had over 100% accuracy, how is that possible? EDIT: If a single bullet hits multiple people (area of effect) can that cause the accuracy to go over 100%?

Daedalus is great load of fun though!