WA Editor C# Remake (aka WASharp) -- Update Thread

The Wonderland Open Source Project

Moderator: Aryan

Post Reply
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Aryan » Mon Dec 16, 2019 9:49 am

Hello everyone,

As I told in my last post in WA Editor Updates topic, we are currently working on remaking WA Editor in C# or WASharp.
Basically, the whole intention is to port the game to another engine and also make it cross-platform. Now some of you might be wandering what the heck is C# remake, what's the point in porting to C#, till when it will be done, etc. Don't worry, be patient, here I have put forward some of the questions that you all might be having.

Q1. What the heck is C# remake?
Actually you know Blitz3D is quite old and alien technology, it is very very difficult and too old as of 2020.
Therefore, our original idea is to update the codebase to a programming language which is best suited as per modern standards and features.
We also need to update the 3D engine to something modern and cross-platform, like OpenGL.

Q2. Why you selected C# for porting Wonderland
Now there might be another question related to this in minds of C++ programmers: why not C++? Well indeed, C++ is fast and low-level, it will really make the game nice performing. However, the main problem is about time, resources and people helping. Going with C++ will require lots of time, resources, helpers and dealing with lots of trouble including rendering, delta time, memory managment etc
There are currently 1 or 2 people only involved in the remake. For such a tiny team, going with C++ is a "suicidal attempt" (sorry to be blunt)
On the other hand, C# has its own automatic memory management and simple than C++. It can be made cross-platform using Mono. Plus engines like monogame are available. Using C# with BlitzSharp3D as mid-point we can port to other engines easily. C# code can also be converted to c++. For a tiny team of ours going with C# is easy since at first we only have to copy code and refactor and other stuff (and probably more people will join the team gradually). So C# is actually a better option for us.

Q3. What's your roadmap with C# remake?
We're currently porting WA Editor to C#. There's also a project for converting classic trilogy games to C#, named WonderlandPlus.NET although its in halts right now. Here's the roadmap:
- convert all blitz code line by line into c# (blitzsharp3d)
We will convert all 10.2.0 player code and then 10.3.0, then I think we can start porting 10.3.0 editor (yes it will also be released soon). Launcher is easy
- refactor the code. Use new and human readable file formats like 'master.json' instead of 'master.dat', merge 'global.wdf' and 'display.wdf' into a single file like 'options.json'. Use XML for dialogues, scripting languages for UIs and cutscenes. Use a better and compatible format for levels (need not be human readable imo). We can also make 'playerfile.wpf' which stores save game data as 'playerfile.json' just with stars count and coins count encrypted. I think levels should now have extension 'wlvx', and cutscenes 'cutx'. I'm not sure what to do about packed adventure 'wa3' and hub 'wah' files. Should we leave the file extension same just make new file format along with extension or just allow automatic zipping up of custom adventures and hubs (will require permission from MS). Finally, should we merge editor and player to single exe? What are your opinions here?
- port to another engine gradually

Q4. What is the current progress in porting WA Editor?
Currently we are porting 10.2.0 to C#. We are working on Player currently. I assume 10.4.0 to be our first release in C#.
Here's the progress:

Code: Select all

Level
 Level - 100% done
 LevelDefine - 100% done

Shared
 ObjectsWOITypeDefine - 100% done
 ObjectsWOIType - 100% done
 MeshControl - 100% done
 Particles - 99% done
 ParticlesDefine - 100% done
 GlobalGraphicsDefine - 100% done
 GlobalGraphics - 100% done
 Content - 100% done
 MagicData - 100% done
 ConfigReader - 0% done
 Utils - 100% done
 Includes - 100% done
 Defines - 100% done

Adventures
 Commands - 100% done
 ObjectsCore - 100% done
 ObjectsEngineBase - 100% done
 ObjectsWA1 - 100% done
 ObjectsWA2 - 100% done
 ObjectsWA3 - 100% done
 ObjectsCustom - 90% done
 ObjectsDecorative - 100% done
 ObjectsDepreciated - 1% done
 ObjectsTiles - 100% done
 AdventuresCore - 100% done
 AdventuresDefine - 100% done
 Magic - 100% done

Menus
 Menu - 60% done
 MenuDefine - 100% done
 MenuDialog - 100% done
 MenuIcons - 100% done
 MenuUpdate - 100% done
 MenuCustomCutscenes - 20% done
 MenuCustomCutsceneDefines - 100% done
 MenuWA2Cutscenes - 33% done
 WA3EndInclud - 0% done

Core
 Preload - 100% done
 Sound - 100% done
 SoundDefine - 100% done
Currently, I, HumanGamer and minimus (SS01) are involved in this projects.
Everyone is welcome to help here! :)
Also we would be posting occasional screenshots highlighting developments, so stay tuned!

Any other questions?
Feel free to post here!
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Mon Dec 16, 2019 9:56 am

Here's what we have got in our screens till now: (if you don't remember, this is my blue flowers adventures where you have to plant the blue flowers :) )

Image
User avatar
rainbowmon
Rainbow Wonderlander
Posts: 194
Joined: Thu Apr 17, 2014 6:31 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by rainbowmon » Mon Dec 16, 2019 11:48 pm

Aryan wrote:
Mon Dec 16, 2019 9:49 am
Finally, should we merge editor and player to single exe? What are your opinions here?
I think that's a really good idea - it always felt redundant to have them both be separate applications, and theoretically doing this would allow for implementing a feature where testing things would be as quick and easy as Mario Maker, which I could see being a huge quality of life improvement for those who actually create levels.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Sun Dec 22, 2019 1:59 pm

Magics finally work! :-)

Image
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Tue Dec 24, 2019 2:47 pm

DP!

Ok, so finally we have a couple of objects and whole mesh creation code ready in C# remake, although we still have to complete menus, cutscenes etc so it will take a while!

BTW, I am actually here to notify you forum members about some more ideas for WA Editor (and probably targeting C# remake):
-auto updater
-redesign the logo and/or menu etc., this is not something really useful, but I think new menu design and graphics it's a good idea, especially for the logo because it doesn't look very good imo and we will have an option for people so they can revert to the original menu design if they don't like the new one.
-full custom hubs with menus etc, this will be useful for large hub projects like paradise quest and hidden realms, which they overwrite some of the basic graphics and need to have their one menus. This can be handled in a similar way like we do with wa episodes (maybe the user can switch them in the loader?). Those hubs will be stored differently than regular custom hubs, and also each hub will have separate save game slots. We can also give some kind of menu customization or play a cutscene (from .cut file) like wa1. Those can be in a new format packed (or even better compressed) and we can the loader maybe be able to unpack them, or maybe we write a separate program.
Most of the such changes have been done in currently in-development 10.3.0
-type custom stinker player name (that is already coded but not displayed, you can type a name while creating a stinker even now and even on vanilla) and also add support to dialogs to display the name (using something like [PLAYER] possibly) - DONE IN 10.3.0
-make wee stinkers use the stinker model instead and be able to be customized like regular stinkers (or we can create a separate wee stinker object that behaves the same but with the stinker model) - DONE IN 10.3.0
-make npc stinkers (and wee stinkers if we do the above) support the different death animation the player has
-make npc stinkers able to shoot magic, currently we can do that with magic shooter but it doesn't do the animation
-custom sounds/music
-add full clipboard support to the editor so the users will be able to copy/paste in dialogs, adventure titles etc. - DONE IN 10.3.0
-add different map item sizes (like 2x2, 3x2, or 8x4 but with smaller pieces etc.) and possibly the ability to have more than one map in the same adventure/hub
- we add test mode for hubs too and enhance it with features such as player not easily killed (this can also be added in vault), turn or move camera anywhere, switch directly to a level without disrupting another, directly switch adventures, see how many coins gems stars are there or left etc.
- adding number of coins, gems, gold star in editor for hubs and adventures both
- make an application that can download wa editor, archive and other stuff from archive site and update it as necessary. This way I won't have to upload archive and wa editor installer with archive separately.
A single application can download wa editor then archive and perform the installation as needed. This can also perform update work, alternatively we can also code the launcher in eg BlitzSharp3D to do that.
- make flash independent of being in memory instead of tile (1,1)
- custom hats and accessories for stinkers
- custom keys, gates colours, key cards, and also custom icons for keys, key cards and other stuff
- (suggested by cloudrac3r) making a central database in a website like my archive site which would store download URL (not the exact file due to licencing issues) and other data regarding user-made custom content like textures, icons, models etc and the game if unable to find the required custom content offline, would read the database and automatically download the content online.

What do you all think about these?
User avatar
rainbowmon
Rainbow Wonderlander
Posts: 194
Joined: Thu Apr 17, 2014 6:31 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by rainbowmon » Tue Dec 24, 2019 3:29 pm

Here's a crazy thought I just had: What if we had an entirely new function for the map item? What I mean is, in MoFI, it was just some random collectable set that, if I remember correctly, didn't actually serve much of a purpose, as it didn't really help navigate the island at all. But if it's possible to implement, maybe we could get a more in-depth map feature - one that, upon using the item, would show a zoomed out map of the actual hub/adventure, with markings of important locations (like shops), as well as the ability to zoom in and examine specific rooms more closely? If such a feature were to be implemented, it should probably work like in a Metroidvania - you can either fill it out yourself by exploring, or find something to fill in parts of it, while leaving secret areas hidden. I think it'd be a really cool feature!

As for other improvements... It occurred to me while writing this, but it'd be nice if you could press - let's say the 'e' key - to open your inventory, and then use the WASD/arrow keys to move through it and press space/enter to use the highlighted item. Alternatively, adding the ability to make custom hotkeys corresponding to item slots you use often (like the Spy-Eye) would be pretty cool, as it would allow for using items without even opening the inventory.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Tue Dec 24, 2019 4:02 pm

rainbowmon wrote:
Tue Dec 24, 2019 3:29 pm
Here's a crazy thought I just had: What if we had an entirely new function for the map item? What I mean is, in MoFI, it was just some random collectable set that, if I remember correctly, didn't actually serve much of a purpose, as it didn't really help navigate the island at all. But if it's possible to implement, maybe we could get a more in-depth map feature - one that, upon using the item, would show a zoomed out map of the actual hub/adventure, with markings of important locations (like shops), as well as the ability to zoom in and examine specific rooms more closely? If such a feature were to be implemented, it should probably work like in a Metroidvania - you can either fill it out yourself by exploring, or find something to fill in parts of it, while leaving secret areas hidden. I think it'd be a really cool feature!
This really sounds like a cool feature, indeed! :stinkyhappy:
rainbowmon wrote:
Tue Dec 24, 2019 3:29 pm
As for other improvements... It occurred to me while writing this, but it'd be nice if you could press - let's say the 'e' key - to open your inventory, and then use the WASD/arrow keys to move through it and press space/enter to use the highlighted item. Alternatively, adding the ability to make custom hotkeys corresponding to item slots you use often (like the Spy-Eye) would be pretty cool, as it would allow for using items without even opening the inventory.
Opening and navigating inventory through keyboard is a nice idea...
About using hotkeys to access well I think we should also be careful along that, since it might also cause confusions. Or maybe I'm wrong here? :roll:
User avatar
rainbowmon
Rainbow Wonderlander
Posts: 194
Joined: Thu Apr 17, 2014 6:31 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by rainbowmon » Wed Dec 25, 2019 3:08 pm

My thoughts were, if you use a certain item slot often, you could assign your own hotkey to it somehow, and then use said hotkey whenever you want to use that slot. However, that would in part probably require the same setup as customizable controls (not that that would be a bad thing, as customizable controls are always a good idea; you never know when someone will want to use a completely different control scheme they're already used to). As a means of dispelling any remaining confusion, any assigned hotkey would be shown next to the slot it's assigned to.

Edit: Oh! Also, I just thought of something. Sometime ago, I brought up controller support. You said it wasn't possible because of how old Blitz3D is, but you mentioned this remake was in the works that might allow for it... I think that saving and loading could be mapped to buttons too, but obviously you'd need a way to cycle left and right between slots. Maybe have L/R (bumpers) cycle through and ZL/ZR (triggers) save/load?
User avatar
HumanGamer
Rainbow Wonderlander
Posts: 199
Joined: Fri Apr 16, 2010 2:23 pm

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by HumanGamer » Wed Dec 25, 2019 4:36 pm

Blitz3D does support controllers. I used it for Wonderland+.NET.
WA3 Editor Tools
WOP Research
WA Map Recreation

I was previously known as cooldudepoke.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Wed Dec 25, 2019 4:45 pm

HumanGamer wrote:
Wed Dec 25, 2019 4:36 pm
Blitz3D does support controllers. I used it for Wonderland+.NET.
Ok, although I'd consider it to be added when the game is ported to another engine/monogame.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka OpenWA.NET) -- Update Thread

Post by Aryan » Thu Dec 26, 2019 3:56 am

Ok there one important note for users who use Wine to run Wonderland Games in Linux or MacOS. HumanGamer has confirmed that you cannot run the C# remake in Wine. He said that Wine couldn't load C++ and mono couldn't load C#, technically (if you can't understand what I mean, then don't worry, you are not alone :) )

He said that he has a workaround to deal with it and so we may make a separate version for Linux users. However this will only be used as a last resort as this is also problematic. If anyone has a better way then please suggest.
The remake is currently WIP so I think there's no need to worry about it right now, but this was just FYI.

Windows users need not worry about this. You all just need .NET Framework which I am sure is pre-installed in Windows 10.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Aryan » Sun Dec 29, 2019 1:21 am

Triple post!

Just to avoid confusions, and since the project is different from OpenWA, the project has been renamed from OpenWA.NET to WASharp.

You can call it WA# too.
User avatar
nasko222
Rainbow Wonderlander
Posts: 122
Joined: Sat Jul 07, 2018 1:22 pm
Location: Bulgaria

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by nasko222 » Fri Jan 03, 2020 10:12 am

nasko222 joins the modding team :stinkyhappy: :stinkyhappy:
User avatar
nasko222
Rainbow Wonderlander
Posts: 122
Joined: Sat Jul 07, 2018 1:22 pm
Location: Bulgaria

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by nasko222 » Fri Jan 03, 2020 3:00 pm

https://www.youtube.com/watch?v=HjU5IAolBGM

heres some mofi in c# remake. as speedrunner, i broke it ALOT
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Aryan » Tue Jan 07, 2020 1:46 pm

Good news!

All the base games objects are implemented. Three WA1 prototypes, magic dischargers, and talking objects are still left but they will be done. Hub menu, archive menu and some cutscenes are still left. :D
Although there's still a lot to do, like editor is not started and porting 10.3.0, but this is still a great achievement that we have reached till this point, from nothing! :)
User avatar
Kilicool64
Rainbow Wizard
Posts: 438
Joined: Fri Oct 26, 2007 3:15 pm

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Kilicool64 » Thu Jan 09, 2020 11:30 am

I didn't know the source code for WA's prototypes had also been released. Or did you reverse-engineer them?

Anyway, congrats.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Aryan » Thu Jan 09, 2020 12:26 pm

Kilicool64 wrote:
Thu Jan 09, 2020 11:30 am
I didn't know the source code for WA's prototypes had also been released. Or did you reverse-engineer them?

Anyway, congrats.
Actually no... The prototype objects are still coded, in WAE, really! There are a total of three WA1 prototype objects there in WAE.

If you want I can tell you about them. :stinkyhappy:
User avatar
Kilicool64
Rainbow Wizard
Posts: 438
Joined: Fri Oct 26, 2007 3:15 pm

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Kilicool64 » Thu Jan 09, 2020 12:36 pm

Sure, go ahead.
User avatar
Aryan
Rainbow Keeper
Posts: 374
Joined: Sun Nov 27, 2016 2:37 pm
Contact:

Re: WA Editor C# Remake (aka WASharp) -- Update Thread

Post by Aryan » Thu Jan 09, 2020 1:06 pm

Alright, here are they:

1. Key Block: I think these are the key blocks from the WA1 Prototype which MS uploaded in one of his Midnight Posts. Object Types are 80, 81, 82, 83, 84, 85, 86, 87. I don't know what are these Types for. You can figure it out using this code:

Code: Select all

Function ControlKeyBlock(i)
	GameObject(i)\TileX=Floor(GameObject(i)\X)
	GameObject(i)\TileY=Floor(GameObject(i)\Y)
	If GameObject(i)\ObjType>=84
		; Currently in Use
		GameObject(i)\Timer=GameObject(i)\Timer-1
		If GameObject(i)\Timer<=0
			; Now activate
			ActivateCommand(GameObject(i)\ObjData[0],GameObject(i)\ObjData[1],GameObject(i)\ObjData[2],GameObject(i)\ObjData[3],GameObject(i)\ObjData[4])
			If GameObject(i)\ObjType=85
				; Solid Keyblock destroyed - change floor
				LevelTileLogic(GameObject(i)\TileX,GameObject(i)\TileY)=0
			EndIf
			If GameObject(i)\ObjType=85 Or GameObject(i)\ObjType=87
				DestroyObject(i,0)
			EndIf
		EndIf
	EndIf
End Function
2. Used Item: Object type is 71. I don't know what really this is. :? Anyways, here's the code:

Code: Select all

Function CreateUsedItem(x,y,tex)
	i=CreateNewObject()
	GameObject(i)\X=x+.5
	GameObject(i)\Y=y+.5
	GameObject(i)\Z=2.0
	GameObject(i)\ModelName$="!Item"
	GameObject(i)\TextureName$="models/Icons-standard.bmp"
	GameObject(i)\Entity=CreatePickUpItemMesh(tex)
	EntityTexture GameObject(i)\Entity,IconTextureStandard
	GameObject(i)\ObjType=71
	GameObject(i)\ID=-1
	GameObject(i)\Timer=120
End Function

Function ControlUsedItem(i)
	GameObject(i)\Yaw=(GameObject(i)\Yaw+10) Mod 360
	If GameObject(i)\Timer=120
		For j=0 To 29
			k=Rand(0,360)
			AddParticle(23,GameObject(i)\X+1.8*Sin(k),GameObject(i)\Z,-GameObject(i)\Y-1.8*Cos(k),0,.4,-0.06*Sin(k),0,0.06*Cos(k),5,0,0,0,0,30,3)
		Next
	EndIf
	GameObject(i)\Timer=GameObject(i)\Timer-1
	If GameObject(i)\Timer<=0 DestroyObject(i,0)
End Function
3. PickUp Item: This looks like the WA Beta Custom Item, of which Qloof234 once posted a WOP in Other Custom Content forum of WAE. Object type is 70.
Post Reply