Join us on Discord!
You can help CodeWalrus stay online by donating here.

Walrus Kingdom (former PocketWalrus) [PC] [Windows] [Java] [Walrus]

Started by p2, September 21, 2016, 09:23:42 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

p2

I'm actually thinking about "Walrus Kingdom" or omething like this but I'm totally not sure...
still it's gonna take weeks before I will have the first running demo, so there's still enough time for that :)

Or maybe "The Legend Of Walrii - Chapter One: The Green Fish" ^^
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

p2

As I havent used Java this much so far I guess I should just ask you guys :)
I'm thinking about creating a GUI full of buttons (one button = one tile) so the map is clickable and Walrii will walk where you click. (in addition to standard keyboard control)
Will this even work and will it slow down he rendering very much...?
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

kotu

#47
Well I don't really know Java at all but you should be able to handle clicks directly through the form's canvas  (-_(//));

*edit*

like so...
https://examples.javacodegeeks.com/desktop-java/awt/event/handle-mouse-clicks-example/

this gives you the x and y of the click.
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

aaah ok thx ;D
thats great ;D
Then I maybe can still add a scrolling effect :D
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

c4ooo

Quote from: p2 on October 17, 2016, 10:43:05 PM
As I havent used Java this much so far I guess I should just ask you guys :)
I'm thinking about creating a GUI full of buttons (one button = one tile) so the map is clickable and Walrii will walk where you click. (in addition to standard keyboard control)
Will this even work and will it slow down he rendering very much...?
Don't be insane. You have your tilemap, each frame you render each tile to the canvas :P
(Now i think i *reeeeaaaallllyy* should make a tilemapper in java tutorial :P )

Scipi

I wouldn't recommend structuring it like that, honestly. What's better to do, really, is:

1: Capture an input event. Mouse, keyboard, etc
2: Give that event to the GUI
3. If nothing in the GUI accepts the event (maybe you didn't click on any GUI elements), give the event to the game world

In your game world, if you're in a state you want to accept those mouse events, you can use the X/Y coordinate of the click plus the X/Y coordinate of the camera view to determine the tile clicked and go from there.

Quote from: p2 on October 17, 2016, 10:43:05 PM
Will this even work and will it slow down he rendering very much...?

Don't worry too much about speed at this point (actually, don't worry about it at all until you see it's going to be a problem). As much as I hate to admit, Java is a fast language (relatively speaking). And the overhead a GUI element carries isn't going to have any noticeable impact.
  • Calculators owned: TI-83+, Nspire, Nspire CX, Casio Prizm




kotu

I made a tile renderer for p2 it reaches 90fps with full 2 layer tiles using standard java (600x408)

if anyone wants the code i will have to do a couple of things to it but thats fine however i will be sticking to p2's style of his tiles image has a black border and tiles separated by black lines

:)

(-_(//));
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

I'm happy to tell you that I'm making great progress again, I'll soon have the first demo running :)
(still taking a few days as I got to work every day) ^^

I'm especially happy that I got that much help from the whole community, both support in IRC and  tutorials that were written just for me:
People I have to thank until now (in alphabetic order as I love lists that much):
I love this community <3
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

p2

setup a random map (2 layer) which is now properly displayed.  :thumbsup:
Adding scrolling + the walrus now ^^
animations are added later xD
Also I have to create a map again >.<
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

kotu

are you going to have different areas (therefore different maps) or is it just one big map?
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

p2

I will have one map object but insert different map data into it depending on the level/region later :) (like once you enter a forest path you gat a cute but annoying animation for a few seconds until you're teleported to a new map :3
(so I'm always adressing the same map object and the same functions and stuff, but overwrite some of the backgroudn data ^^

Already at 20.5KB of source files :3
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

SiphonicSugar

I think it would be really cool if you added everyone's version of Walrii into you're game.  :)
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

p2

DJ Omnimaga is creating a walrus game, too in which he actually included most of them as his game will be around collecting different types of walriis (like pokemon) iirc.
Mine is more like a classic rpg but with walriis as characters.
If I'll actually add NPCs, I'll make sure to include some nice ones :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Dream of Omnimaga

I like the new name and I'm glad to see progress :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

p2

uh right, about my progress:
map rendering is perfectly working now. right positioning of screen on the map is done (player's character centered except if close to border)
up next:

  • speeding up map rendering (only display changes)
  • key inpouts (working on that one)
  • animated tiles (have to draw them first ^^)
  • real map (only a very small part is done)
  • write letter to Nintendo for using their music from "Mother" (but their online formula wasnt working...)
    --> If refused, kindap admin's daughter
  • implement the music
  • add storyline (non-interactive part at the beginning)
  • add event-id map (to trigger interactive objects like signs, houses and NPCs)
    --> two layers: Event-id and condition-id to check an array "conditions" if the value given in the second layer is correct (binary number combines multiple booleans as separate conditions for triggering an event)
  • milk
  • eggs
  • sugar
  • lots of cooies :3
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Powered by EzPortal