Duke4.net Forums: Unity Build Engine Port - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unity Build Engine Port

#1

Hey,

I don't know if this has been done already, but I fixed up my old C# XNA build engine port, and got everything working in Unity, and put it up on my GitHub. Here it is if its useful to anyone. In the video I incorrectly say I used the original build engine code, I used Jonof's port as a base for the original port. Again I'm just uploading it, if its useful to anyone. This only includes the classic renderer. The logic behind only using the classic renderer, the software rasterizer consumes far less battery on mobile devices. You can move around Ken's game, and open sliding doors.

All code uses safe code(no pointers), means it should run on all Unity platforms.

The Code:
Mostly the same from Jonof/the original build engine. However I designed the engine to support multiple map files, all board logic resides in its own class, rather then globally defined in the engine.



https://github.com/j...nityBuildEngine

-Justin

This post has been edited by icecoldduke: 08 November 2019 - 11:38 AM

9

User is online   Radar 100 Watts 

  • Zionist Shill

#2

Dude that's amazing. Is this able to support duke3d.grp yet?
0

#3

Yes it can load Duke3D maps, however none of the gamelogic is ported over. I want to use this as a base to make a small mobile game off of.
1

#4

Video 2 of the build engine unity port

Quick question does anyone know how to load streamingassets, in Unity on Android/WebGL?



This post has been edited by icecoldduke: 09 November 2019 - 03:24 PM

1

User is offline   Tea Monster 

  • Polymancer

#5

So, what can you actually do with this?
0

#6

View PostTea Monster, on 09 November 2019 - 04:21 PM, said:

So, what can you actually do with this?

I'm looking forward to making a small game with it that can work on all platforms.

The advantage of having build work in Unity is, Unity can handle all the platform, networking, input and audio code on multiple different platforms, and build just renders the levels and the sprites.
3

User is online   MusicallyInspired 

  • Buy Mage's Initiation!

#7

So it's kind of like what Bethesda did to put Doom and Doom II on the Switch (they also run inside Unity)?

This post has been edited by MusicallyInspired: 09 November 2019 - 05:55 PM

0

#8

View Posticecoldduke, on 09 November 2019 - 05:31 PM, said:

I'm looking forward to making a small game with it that can work on all platforms.

The advantage of having build work in Unity is, Unity can handle all the platform, networking, input and audio code on multiple different platforms, and build just renders the levels and the sprites.


Cool! Does this mean multiplayer as well!?
0

#9

View PostMusicallyInspired, on 09 November 2019 - 05:55 PM, said:

So it's kind of like what Bethesda did to put Doom and Doom II on the Switch (they also run inside Unity)?

Exactly right.


View PostThe Battlelord, on 09 November 2019 - 06:19 PM, said:

Cool! Does this mean multiplayer as well!?

Yeah I did a small multiplayer test, it works fine. Basically each sector and sprite is a gameobject, and the engine takes care of the replication.
1

User is offline   Zaxx 

#10

I think I'll get excited about the project you're going to start next week that also won't have any kind of practical purpose for the community. Megatextures for Duke 3D, here I come!

Don't get me wrong, what you're doing could be cool as shit if you'd just stick with one thing before moving on to something completely different.

This post has been edited by Zaxx: 10 November 2019 - 09:29 AM

0

User is online   Phredreeke 

#11

when do we get on-the-fly 3d conversion of sprites for VR headsets?
1

#12

For those wanting to try out a simple demo, content the same as the video above, but got WebGL working.

http://realvectormat...ower/index.html

https://i.ibb.co/37Q7Qhd/image.png

This post has been edited by icecoldduke: 10 November 2019 - 10:07 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #13

View Posticecoldduke, on 08 November 2019 - 11:18 AM, said:

Hey,

I don't know if this has been done already, but I fixed up my old C# XNA build engine port, and got everything working in Unity, and put it up on my GitHub. Here it is if its useful to anyone. In the video I incorrectly say I used the original build engine code, I used Jonof's port as a base for the original port. Again I'm just uploading it, if its useful to anyone. This only includes the classic renderer. The logic behind only using the classic renderer, the software rasterizer consumes far less battery on mobile devices. You can move around Ken's game, and open sliding doors.

All code uses safe code(no pointers), means it should run on all Unity platforms.

The Code:
Mostly the same from Jonof/the original build engine. However I designed the engine to support multiple map files, all board logic resides in its own class, rather then globally defined in the engine.



https://github.com/j...nityBuildEngine

-Justin

Cool proof of concept. A friend was joking recently that after those botched Doom ports someone should show them how it's done with Build.

I'm curious about your battery life claim. In our HTTKC testing, Polymost was by far a better conserver of battery life than running the software renderer on the CPU.

View PostRadar 100 Watts, on 08 November 2019 - 12:12 PM, said:

Dude that's amazing. Is this able to support duke3d.grp yet?

Amazing is not the right word:

View Posticecoldduke, on 09 November 2019 - 05:31 PM, said:

I'm looking forward to making a small game with it that can work on all platforms.

The advantage of having build work in Unity is, Unity can handle all the platform, networking, input and audio code on multiple different platforms, and build just renders the levels and the sprites.

That isn't actually an advantage over anything EDuke32 has today. Between SDL and ENet, all of these needs are handled the same or better as Unity (better = completely free, less overhead). Unity can provide "networking" in that you give it a packet and it transmits the data over the Internet on any platform, but it can't magically add networking logic to your code which is the actual hard part. It can expose audio buffers for you to give samples, or even a rudimentary mixer, but you still need your own audio logic, or else if you offload functionality you'll get something potentially inaccurate/undesirable like BloodGDX's original audio.
3

#14

View PostHendricks266, on 10 November 2019 - 11:24 AM, said:

Cool proof of concept

Thanks :).

View PostHendricks266, on 10 November 2019 - 11:24 AM, said:

I'm curious about your battery life claim. In our HTTKC testing, Polymost was by far a better conserver of battery life than running the software renderer on the CPU.

I'll run some tests and get back to you.

View PostHendricks266, on 10 November 2019 - 11:24 AM, said:

That isn't actually an advantage over anything EDuke32 has today. Between SDL and ENet, all of these needs are handled the same or better as Unity (better = completely free, less overhead). Unity can provide "networking" in that you give it a packet and it transmits the data over the Internet on any platform, but it can't magically add networking logic to your code which is the actual hard part. It can expose audio buffers for you to give samples, or even a rudimentary mixer, but you still need your own audio logic, or else if you offload functionality you'll get something potentially inaccurate/undesirable like BloodGDX's original audio.

I don't need to mix the audio myself, in the demo above, I have 3d spatial audio by just setting the listener on the player gameobject and 3d audio emitter on various gamesprites that are bound to all of the gameobjects in the world. Even though the game renders into a 2D texture, the I get spacial audio because I'm moving the gameobjects around, even though visually it doesn't matter. That's all I need for my purposes and it works well enough.

As far as setting up networking, for my game I'm not going to assume all sectors can move. Instead only sectors that have sector effectors will have replicated game objects, which solves a lot of problems. Sprites work just fine as well.

Using Unity as a base, is in my opinion a great way forward. I have Android, WebGL, IOS, Xbox One, Windows, Mac, PS4 platform support, and the foundation of that support has been used in quite a few shipped titles. For my purposes putting my game on more platforms, without really any work, is something I'm heavily interested in.

This post has been edited by icecoldduke: 10 November 2019 - 11:55 AM

1

User is offline   Hendricks266 

  • Weaponized Autism

  #15

View Posticecoldduke, on 10 November 2019 - 11:46 AM, said:

I don't need to mix the audio myself, in the demo above, I have 3d spatial audio by just setting the listener on the player gameobject and 3d audio emitter on various gamesprites that are bound to all of the gameobjects in the world. Even though the game renders into a 2D texture, the I get spacial audio because I'm moving the gameobjects around, even though visually it doesn't matter. That's all I need for my purposes and it works well enough.

True, if you're making your own thing the provided audio could probably give you plenty to work with.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options