Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Levels #6

Open
adamz01h opened this issue Nov 5, 2017 · 25 comments
Open

New Levels #6

adamz01h opened this issue Nov 5, 2017 · 25 comments

Comments

@adamz01h
Copy link
Owner

adamz01h commented Nov 5, 2017

New Levels
Since the Addon has most issues fixed. I am looking for some help creating some more levels.
- Cataclysm Sulfuron Spire - Created by Andy1210

  • Mists of Pandaria
  • Warlords of Draenor
  • Legion
  • Battle for Azeroth
@ZombieProtectionAgency
Copy link
Contributor

The addon appears to support an admin tool that may have been used to create levels.

I assume it was either a developer tool that was manually added or a separate addon. It would be pretty neat if we could find it or recreate it.

@adamz01h
Copy link
Owner Author

Where in the code based did you see that? Could you share that?

@Andy1210
Copy link
Collaborator

I have decrypted the levels, I think I will try to create an editor later when I will have time :)

@Andy1210
Copy link
Collaborator

sneek peak :)
image

@ZombieProtectionAgency
Copy link
Contributor

@adamz01h The code base makes references to a peggle editor command + object. I did some digging but I haven't been able to find a version of it online yet.

@Andy1210 That looks pretty awesome! Are you going to go simple and just give a brick selector + placement tool or are you going to wire up more advanced features like automatic lines/curves?

@Andy1210
Copy link
Collaborator

@ZombieProtectionAgency I think the editor was only an in-house stuff at PopCap, I mean I almost sure :)
I'm not sure yet how will I do the editor, automatic lines/curves would be awesome, I will try to do it :)
Also I will have to deal with the animated bricks as well, which will be hard, cuz as you can see here on the top right corner:
image

all the animated bricks are in the same coordinates. So I have to figure it out how to deal with them in the editor. Maybe I will need to add some kind of animation generator, and the existing ones should also be edited somehow of course. Difficult but at the end I will do it somehow :D

@Andy1210
Copy link
Collaborator

new sneek peak
image

the first version is almost ready, few days and it will be ok. (first version wont have any automatic curves/lines etc, only manual one-by-one edit)

@Andy1210
Copy link
Collaborator

Andy1210 commented Mar 29, 2019

https://github.com/Andy1210/wow_peggle
I will create a PR when my first custom level is done. You can try lvl 13 in the current state if you want.
Be careful! I did changes to the config/game progress saving to allow us to extend the game with new levels. So if you start this new version it will reset your progress (talents/levels/scores etc)
But the good news is that you can now edit the config manually, since the progress data is not encoded anymore :)
Also I will share the editor in the near future (in few days), its working now, I made the lvl 13 with that.
The editor is written in js with react, not a Lua addon of course :)

@Andy1210
Copy link
Collaborator

image
image

@adamz01h
Copy link
Owner Author

Awesome work on this! I was able to load the development version and the level works great! Looking forward to the level editor tool.

@Andy1210
Copy link
Collaborator

Andy1210 commented Mar 31, 2019

The editor is ready. I will write a documentation or something but the basics:

  1. open the Levels.lua (thats available only in my fork, you didn't merge my PR yet, EDIT: you did merge it few minutes before I posted my comment :D)
  2. with the select background button you can open the background which should be a TARGA (TGA), because that is the one which is used by the addon. You can have only one background, so you have to open always the proper image (from the addon's images folder for the existing ones)
  3. you can create new levels, you can add every type of blocks.
  4. you can specify animations as well, there is a checkbox to preview the animations (its turned off by default)
  5. the animations are not really straight forward to handle, but if you try the options, you will see how will it look like. Its using the same logic/calculations etc what is used by the game, so the preview is pretty accurate (except the animation speed, that is depending a bit on the performance of your computer/browser) but its not a big deal I think

shortcuts:

  • you can select blocks with the move tool with the left mouse button
  • also you are able to drag the blocks by holding the left mouse button and moving the mouse (:D)
  • you can move the blocks also with keyboard with the arrow keys (0.1px/keypress) hold down ctrl for 1px/keypress
  • hold down shift key to rotate blocks with keyboard left and right arrow keys
  • you can zoom with mouse wheel
  • you can pan the canvas by holding the right mouse button and moving the mouse
  • you can undo/redo actions with ctrl+z and ctrl+y, only block related actions.

When you save the level, you can override the original Levels.lua. For background the game will always try to load the appropriate bg##.tga and bg##_thumb.tga,
(when you put new image files, you have to restart the game, its not enough to reload the ui, I learned it after 1 hour of struggling with it :D)

So basically other than putting two tga images to the images folder and saving the Levels.lua file, you don't have to do anything else. I made the game to automatically use the new levels, we don't have to edit the game for this :)

Try it out pls, and tell me if you would like to change something, or if you have any suggestions, ideas etc.

https://peggle.andy1210.dev/

PS: oh and its automatically saving everything what you are doing in the editor to local storage, so if you refresh the page, you wont lose your progress. If you want to reset the editor by making every progress lost you have to click on the reset editor button in the bottom right corner :)

@adamz01h
Copy link
Owner Author

Playing around with it now, how/where did you get the background for Sulfuron Spire? it looks like popcap made it and fits soo well. Awesome job, im floored on how much you achieved in such a short time.

@Andy1210
Copy link
Collaborator

My girlfriend took the screenshot in game and I just changed a bit the color of it to make it similar to the others :)

@Andy1210
Copy link
Collaborator

We got the pictures for the future levels already :) Except for Draenor, there we don't know what should we put.

@adamz01h
Copy link
Owner Author

adamz01h commented Mar 31, 2019

I got that one!
image
Hellfire Citadel made it from a loading screen.

@adamz01h
Copy link
Owner Author

I create a level and when I load it. Swatter reports:
Date: 2019-03-31 16:53:40
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\Peggle\Peggle.lua line 3033:
attempt to concatenate field '?' (a nil value)
Debug:
[C]: ?
Peggle\Peggle.lua:3033: SpawnBrick()
Peggle\Peggle.lua:1513:
Peggle\Peggle.lua:1399
Peggle\Peggle.lua:6125:
Peggle\Peggle.lua:612

Here is my generated Levels.lua
Levels.txt

@Andy1210
Copy link
Collaborator

Damn
change the following line
{69,0,1,421.1,279.6,14021,0,0,0,0,0,0},
to
{69,0,1,421.1,279.6,140021,0,0,0,0,0,0},

I'm going to fix the editor in few mins :)

@Andy1210
Copy link
Collaborator

Andy1210 commented Mar 31, 2019

thx for the report, I have fixed the editor. Reload the page, and then modify the rotation of the selected block from this picture from 21 to something else and then back to 21 just to save it with the correct values.

image

The rotation is set as three digits in the game, and I made the editor like that when you rotate the blocks, but I forgot to add this logic to the placement, and you probably placed the item directly as rotated to 21deg. And unfortunately the editor saved it as 21 instead of 021 :)
It shouldn't happen anymore, I added this logic there as well.

@Andy1210
Copy link
Collaborator

Also here are our level ideas (screenshots) for Pandaria, Legion, and BfA

The_Gate_of_the_Setting_Sun_Pandaria
The_Wound_BfA
Tomb_of_Sargeras_Legion

@adamz01h
Copy link
Owner Author

That fixed it! Is there a way to keep track of the number of bricks on a map? Official levels have like 90 - 110 pegs per map. It would be nice to track that. Otherwise great work!

@Andy1210
Copy link
Collaborator

That's a good idea, I will add it later

@adamz01h
Copy link
Owner Author

adamz01h commented Apr 1, 2019

How did you create the thumbnail for lvl 13?

@Andy1210
Copy link
Collaborator

Andy1210 commented Apr 1, 2019

I tok a screenshot from the editor

@Andy1210
Copy link
Collaborator

Andy1210 commented Apr 5, 2019

I have added the block counter, you can find it on the top right corner in the heading of the level :)

@adamz01h
Copy link
Owner Author

adamz01h commented Apr 8, 2019

Awesome saw that got really busy with life thanks for the update. Also block "snapping" by holding control or something would be cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants